Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SAXParseException #6

Closed
belamu opened this issue Nov 11, 2020 · 6 comments
Closed

SAXParseException #6

belamu opened this issue Nov 11, 2020 · 6 comments

Comments

@belamu
Copy link

belamu commented Nov 11, 2020

After starting the jar with
java -jar Notes01.jar -do_notes -bbox=-22.09033,64.04443,-21.63253,64.18436 -output_gpx=notes-Reykjavik.gpx
I get the following output:

[Fatal Error] :1:50: White spaces are required between publicId and systemId.
Exception in thread "main" org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 50; White spaces are required between publicId and systemId.
        at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:257)
        at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:339)
        at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:121)
        at Notes01.process_notes_url_common(Notes01.java:1046)
        at Notes01.process_notes(Notes01.java:1092)
        at Notes01.main(Notes01.java:1605)

I use the release version from 2016-08-14.
Maybe the api changed since then?
It would be great if I could use this downloader but I am not able to fix this myself.

@SomeoneElseOSM
Copy link
Owner

I don't think it's an API problem as such, since I use a command line similar to yours every few days. My guess is that it's either the output for Reykjavik has non-US-ASCII characters in it that breaks things somehow / sometimes, or that it's a different Java or OS that's causing an issue. I've just tried your command line where I am now (Windows 10) and it works:

java -jar Notes01.jar -do_notes -bbox=-22.09033,64.04443,-21.63253,64.18436 -output_gpx=notes-Reykjavik.gpx
Notes found: 100

The Java I'm using where I am now is from https://chocolatey.org/packages/openjdk . It was checked for update yesterday and appears to be about 3 weeks old. What version of Java and what OS are you using?

@belamu
Copy link
Author

belamu commented Nov 11, 2020

Thanks for the quick feedback. I am using Fedora (Linux) with openjdk 1.8. When using with much smaller area (probably includes no notes), same problem exists:

java -jar Notes01.jar -do_notes -bbox=-22.09033,64.04443,-22.08000,64.05000 -output_gpx=notes-Reykjavik.gpx

@belamu
Copy link
Author

belamu commented Nov 11, 2020

Now I downloaded the repo, installed javac version 1.8.0_272, compiled with javac Notes01.java and ran with java Notes01 -do_fixmes -notes_closed=0 -notes_limit=1000 -do_notes -bbox=-22.09033,64.04443,-21.63253,64.18436 -output_gpx=notes-Reykjavik.gpx and it works perfectly. No idea where the change came from but maybe it's somewhere in the last 4 commitst that are newer than the last release?

@belamu
Copy link
Author

belamu commented Nov 11, 2020

When I go back to the tag v0.0.6 I get my error again. So the changes in the urls fixed the error. Hence, it would be great if you could make a new release with the current code and that should fix it.

Thanks for the quick reply that motivated me to investigate myself!

@SomeoneElseOSM
Copy link
Owner

The culprit is e422a61 , I think. My memory suggests that Java doesn't follow redirects, so an attempt to get anything from the OSM API via http will just get nothing useful.

I'd somewhat forgotten I'd created releases for this at all - next time I'm in a position to I'll create a new one.

@SomeoneElseOSM
Copy link
Owner

I've now done https://github.com/SomeoneElseOSM/Notes01/releases/tag/1.0 , which resolves this.

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

No branches or pull requests

2 participants