Skip to content
This repository has been archived by the owner on Jul 24, 2021. It is now read-only.

Report better error messages in case of SQL failure #151

Closed
openstreetmap-trac opened this issue Jul 23, 2021 · 2 comments
Closed

Report better error messages in case of SQL failure #151

openstreetmap-trac opened this issue Jul 23, 2021 · 2 comments

Comments

@openstreetmap-trac
Copy link

Reporter: immanuel.scholz[at]gmx.de
[Submitted to the original trac issue database at 12.17pm, Tuesday, 28th March 2006]

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

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


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)
...
@openstreetmap-trac
Copy link
Author

Author: immanuel.scholz[at]gmx.de
[Added to the original trac issue at 5.39pm, Tuesday, 28th March 2006]

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

@openstreetmap-trac
Copy link
Author

Author: immanuel.scholz[at]gmx.de
[Added to the original trac issue at 9.57am, Wednesday, 5th April 2006]

seems like it was some temporary problem with mysql.

So the bug changes to "report a failure correctly"

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant