Opened 13 years ago

Closed 10 years ago

#151 closed defect (invalid)

Report better error messages in case of SQL failure

Reported by: Immanuel Scholz Owned by: steve@…
Priority: minor Milestone:
Component: api Version:
Keywords: Cc:

Description

Once (non-reproducible :-((( ) I got this as reply from a PUT to api/0.3/way/0

1064

Error message: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near at line 1 nil

</code>


The whole log

Trying to PUT xml "<osm><segment id="0" tags="" from="657389" to="657390" /></osm>" to URL http://www.openstreetmap.org/api/0.3/segment/0
28.03.2006 14:40:47 org.apache.commons.httpclient.auth.AuthChallengeProcessor selectAuthScheme
INFO: basic authentication scheme selected
Got response code 200
got reponse 610204

28.03.2006 14:40:48 org.apache.commons.httpclient.HttpMethodBase getResponseBody
WARNUNG: Going to buffer response body of large or unknown size. Using getResponseAsStream instead is recommended.
line created successfully: [Line 0 from [Node 657389 lat:51.52913055944465 lon:-0.1504463255405426] to [Node 657390 lat:51.52871673312977 lon:-0.15083256363868713]]
Drag to draw a line segment
Drag to draw a line segment
Drag to draw a line segment
Drag to draw a line segment
Select line segments by clicking and click mode button again to create way.
Select line segments by clicking and click mode button again to create way.
mousePressed in ModeManager with currentMode=org.openstreetmap.processing.LineMode@16ad339b and overButton=true
mouse relesed in mode manager
org.openstreetmap.processing.WayMode@10e9dfready:trueSelect line segments by clicking and click mode button again to create way.
Select line segments by clicking and click mode button again to create way.
Change the properties of objects
mousePressed in ModeManager with currentMode=org.openstreetmap.processing.WayMode@10e9df and overButton=false
mouse relesed in mode manager
org.openstreetmap.processing.WayMode@10e9dfready:trueTrying to PUT xml "<?xml version='1.0' encoding='UTF-8'?>
<osm version='0.3' generator='applet'>
  <way id='0'>
    <seg id='610204' />
  </way>
</osm>
" to URL http://www.openstreetmap.org/api/0.3/way/0
Got response code 200
got reponse Error code: 
1064

Error message: 
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1

nil

28.03.2006 14:40:56 org.apache.commons.httpclient.auth.AuthChallengeProcessor selectAuthScheme
INFO: basic authentication scheme selected
28.03.2006 14:40:56 org.apache.commons.httpclient.HttpMethodBase getResponseBody
WARNUNG: Going to buffer response body of large or unknown size. Using getResponseAsStream instead is recommended.
Exception in thread "Thread-5" java.lang.NumberFormatException: For input string: "Error code: 
1064

Error message: 
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1

nil"
	at java.lang.NumberFormatException.forInputString(Unknown Source)
	at java.lang.Long.parseLong(Unknown Source)
	at java.lang.Long.parseLong(Unknown Source)
	at org.openstreetmap.client.Adapter$WayCreator.connectToServer(Adapter.java:512)
	at org.openstreetmap.client.CommandManager.execute(CommandManager.java:97)
	at org.openstreetmap.client.CommandManager$1.run(CommandManager.java:79)
	at java.lang.Thread.run(Unknown Source)
...

Change History (3)

comment:1 Changed 13 years ago by Immanuel Scholz

Priority: majorblocker

unfortunatly, it is now reproducible. It happens every time you try to PUT a new way.

comment:2 Changed 13 years ago by Immanuel Scholz

Priority: blockerminor
Summary: PUT to .../way/0 yield in strange SQL error messagesReport better error messages in case of SQL failure

seems like it was some temporary problem with mysql.

So the bug changes to "report a failure correctly"

comment:3 Changed 10 years ago by Thomas Wood

Resolution: invalid
Status: newclosed
Note: See TracTickets for help on using tickets.