
Hi, I am compiling a custom map from OSM format, what do these error messages mean: ava.lang.NumberFormatException: null at java.lang.Integer.parseInt(Integer.java:443) at java.lang.Integer.parseInt(Integer.java:514) at uk.me.parabola.mkgmap.scan.TokenScanner.nextInt(TokenScanner.java:255) at uk.me.parabola.mkgmap.osmstyle.StyleImpl.checkVersion(StyleImpl.java:564) at uk.me.parabola.mkgmap.osmstyle.StyleImpl.<init>(StyleImpl.java:133) at uk.me.parabola.mkgmap.reader.osm.xml.Osm5MapDataSource.createConverter(Osm5MapDataSource.java:123) at uk.me.parabola.mkgmap.reader.osm.xml.Osm5MapDataSource.load(Osm5MapDataSource.java:81) at uk.me.parabola.mkgmap.main.MapMaker.loadFromFile(MapMaker.java:148) at uk.me.parabola.mkgmap.main.MapMaker.makeMap(MapMaker.java:56) at uk.me.parabola.mkgmap.main.Main$1.call(Main.java:189) at uk.me.parabola.mkgmap.main.Main$1.call(Main.java:186) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:636) -- cheers, maning ------------------------------------------------------ "Freedom is still the most radical idea of all" -N.Branden wiki: http://esambale.wikispaces.com/ blog: http://epsg4253.wordpress.com/ ------------------------------------------------------

On Wed, Aug 25, 2010 at 02:47:33PM +0800, maning sambale wrote:
Hi,
I am compiling a custom map from OSM format, what do these error messages mean: ava.lang.NumberFormatException: null at java.lang.Integer.parseInt(Integer.java:443) at java.lang.Integer.parseInt(Integer.java:514) at uk.me.parabola.mkgmap.scan.TokenScanner.nextInt(TokenScanner.java:255) at uk.me.parabola.mkgmap.osmstyle.StyleImpl.checkVersion(StyleImpl.java:564) at uk.me.parabola.mkgmap.osmstyle.StyleImpl.<init>(StyleImpl.java:133) at uk.me.parabola.mkgmap.reader.osm.xml.Osm5MapDataSource.createConverter(Osm5MapDataSource.java:123) at uk.me.parabola.mkgmap.reader.osm.xml.Osm5MapDataSource.load(Osm5MapDataSource.java:81)
Without looking at the code, it seems that the parser is expecting an XML attribute containing a (version?) number string, but it instead gets no attribute at all. It would be nice if Osm5MapDataSource.load() would catch the exception and add the source file and line number to the error message. Marko

This is interesting because I converted the data from a GDB file (of survey points) and then further edited in JOSM. Node IDs are negative because the data didn't come from the main OSM dbase. head elkNEW_PRS92.osm<?xml version='1.0' encoding='UTF-8'?> <osm version='0.6' generator='JOSM'> <node id='-34478' action='modify' timestamp='2010-08-25T06:17:10Z' visible='true' lat='7.310225' lon='122.845977'> <tag k='man_made' v='survey_point' /> <tag k='name' v='ZSI-63' /> <tag k='note' v='ZSI-63' /> </node> <node id='-34476' action='modify' timestamp='2010-08-25T06:17:10Z' visible='true' lat='7.311016' lon='122.844688'> <tag k='man_made' v='survey_point' /> <tag k='name' v='ZSI-62' /> On Wed, Aug 25, 2010 at 3:41 PM, Marko Mäkelä <marko.makela@iki.fi> wrote:
On Wed, Aug 25, 2010 at 02:47:33PM +0800, maning sambale wrote:
Hi,
I am compiling a custom map from OSM format, what do these error messages mean: ava.lang.NumberFormatException: null at java.lang.Integer.parseInt(Integer.java:443) at java.lang.Integer.parseInt(Integer.java:514) at uk.me.parabola.mkgmap.scan.TokenScanner.nextInt(TokenScanner.java:255) at uk.me.parabola.mkgmap.osmstyle.StyleImpl.checkVersion(StyleImpl.java:564) at uk.me.parabola.mkgmap.osmstyle.StyleImpl.<init>(StyleImpl.java:133) at uk.me.parabola.mkgmap.reader.osm.xml.Osm5MapDataSource.createConverter(Osm5MapDataSource.java:123) at uk.me.parabola.mkgmap.reader.osm.xml.Osm5MapDataSource.load(Osm5MapDataSource.java:81)
Without looking at the code, it seems that the parser is expecting an XML attribute containing a (version?) number string, but it instead gets no attribute at all. It would be nice if Osm5MapDataSource.load() would catch the exception and add the source file and line number to the error message.
Marko _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
-- cheers, maning ------------------------------------------------------ "Freedom is still the most radical idea of all" -N.Branden wiki: http://esambale.wikispaces.com/ blog: http://epsg4253.wordpress.com/ ------------------------------------------------------

On Wed, Aug 25, 2010 at 04:14:47PM +0800, maning sambale wrote:
This is interesting because I converted the data from a GDB file (of survey points) and then further edited in JOSM. Node IDs are negative because the data didn't come from the main OSM dbase.
I can't remember if mkgmap has trouble with negative IDs. I don't think it should. One thing that you could try is to truncate the file, to search for the trouble. Just cut everything after a </node>, add </osm> and save the truncated file under a different name. If that works, go further to the file (say, if it has 10,000 lines, go to around line 5,000 and truncate there, then at 2,500 or 7,500, and so on) until you can find the troublesome spot. Marko

Hi, On Wed, Aug 25, 2010 at 02:47:33PM +0800, maning sambale wrote:
I am compiling a custom map from OSM format, what do these error messages mean: ava.lang.NumberFormatException: null at java.lang.Integer.parseInt(Integer.java:443) at java.lang.Integer.parseInt(Integer.java:514) at uk.me.parabola.mkgmap.scan.TokenScanner.nextInt(TokenScanner.java:255) at uk.me.parabola.mkgmap.osmstyle.StyleImpl.checkVersion(StyleImpl.java:564) at uk.me.parabola.mkgmap.osmstyle.StyleImpl.<init>(StyleImpl.java:133) at uk.me.parabola.mkgmap.reader.osm.xml.Osm5MapDataSource.createConverter(Osm5MapDataSource.java:123) at uk.me.parabola.mkgmap.reader.osm.xml.Osm5MapDataSource.load(Osm5MapDataSource.java:81) at uk.me.parabola.mkgmap.main.MapMaker.loadFromFile(MapMaker.java:148) at uk.me.parabola.mkgmap.main.MapMaker.makeMap(MapMaker.java:56) at uk.me.parabola.mkgmap.main.Main$1.call(Main.java:189) at uk.me.parabola.mkgmap.main.Main$1.call(Main.java:186) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:636)
I've looked through the source code. It appears that this occurs while reading the files for a style. In particular, it's opening the file called "version" which should simply contain an integer (all of mine have 0 in them). Can you check if the version file exists and what it contains? Andrew

Dear Andrew, Thanks for this! Adding version number in style/version file works. On Wed, Aug 25, 2010 at 5:07 PM, Andrew McCarthy <me@andrewmccarthy.ie> wrote:
Hi,
On Wed, Aug 25, 2010 at 02:47:33PM +0800, maning sambale wrote:
I am compiling a custom map from OSM format, what do these error messages mean: ava.lang.NumberFormatException: null at java.lang.Integer.parseInt(Integer.java:443) at java.lang.Integer.parseInt(Integer.java:514) at uk.me.parabola.mkgmap.scan.TokenScanner.nextInt(TokenScanner.java:255) at uk.me.parabola.mkgmap.osmstyle.StyleImpl.checkVersion(StyleImpl.java:564) at uk.me.parabola.mkgmap.osmstyle.StyleImpl.<init>(StyleImpl.java:133) at uk.me.parabola.mkgmap.reader.osm.xml.Osm5MapDataSource.createConverter(Osm5MapDataSource.java:123) at uk.me.parabola.mkgmap.reader.osm.xml.Osm5MapDataSource.load(Osm5MapDataSource.java:81) at uk.me.parabola.mkgmap.main.MapMaker.loadFromFile(MapMaker.java:148) at uk.me.parabola.mkgmap.main.MapMaker.makeMap(MapMaker.java:56) at uk.me.parabola.mkgmap.main.Main$1.call(Main.java:189) at uk.me.parabola.mkgmap.main.Main$1.call(Main.java:186) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:636)
I've looked through the source code. It appears that this occurs while reading the files for a style. In particular, it's opening the file called "version" which should simply contain an integer (all of mine have 0 in them).
Can you check if the version file exists and what it contains?
Andrew _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
-- cheers, maning ------------------------------------------------------ "Freedom is still the most radical idea of all" -N.Branden wiki: http://esambale.wikispaces.com/ blog: http://epsg4253.wordpress.com/ ------------------------------------------------------
participants (3)
-
Andrew McCarthy
-
maning sambale
-
Marko Mäkelä