
If I move my compiled mkgmap.jar file to a location different than dist folder and run it, I get the error below: Error at line 56, col 58 Bad file format: tanzania.osm.pbf Error parsing file Exception in thread "main" java.lang.NullPointerException at uk.me.parabola.mkgmap.combiners.FileInfo.getFileInfo(FileInfo.java:147) at uk.me.parabola.mkgmap.main.Main.endOptions(Main.java:429) at uk.me.parabola.mkgmap.CommandArgsReader.readArgs(CommandArgsReader.java:126) at uk.me.parabola.mkgmap.main.Main.main(Main.java:114) I have copied osmprotobuf.jar and protobuf.jar to the same location than mkgmap.jar, but it didn't help. Any suggestion how to fix it?

On 10/10/12 10:07, Carlos Dávila wrote:
If I move my compiled mkgmap.jar file to a location different than dist folder and run it, I get the error below:
I have copied osmprotobuf.jar and protobuf.jar to the same location than mkgmap.jar, but it didn't help.
Those are old files. You need to copy the 'lib' folder so that it is in the same folder as mkgmap.jar. The lib directory should contain the files: osmpbf-1.1.1-754a33af.jar protobuf-java-2.4.1.jar ..Steve

El 10/10/12 11:53, Steve Ratcliffe escribió:
On 10/10/12 10:07, Carlos Dávila wrote:
If I move my compiled mkgmap.jar file to a location different than dist folder and run it, I get the error below:
I have copied osmprotobuf.jar and protobuf.jar to the same location than mkgmap.jar, but it didn't help.
Those are old files.
You need to copy the 'lib' folder so that it is in the same folder as mkgmap.jar. The lib directory should contain the files:
osmpbf-1.1.1-754a33af.jar protobuf-java-2.4.1.jar
..Steve _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
There must be something else missing. Placing both jar files into /lib the error is thrown at an earlier step (14 sec vs 2 min 13 sec), and the error message is slightly different: Bad file format: ethiopia.osm.pbf Failed to read binary file ethiopia.osm.pbf Exception in thread "main" java.lang.NullPointerException at uk.me.parabola.mkgmap.combiners.FileInfo.getFileInfo(FileInfo.java:147) at uk.me.parabola.mkgmap.main.Main.endOptions(Main.java:429) at uk.me.parabola.mkgmap.CommandArgsReader.readArgs(CommandArgsReader.java:126) at uk.me.parabola.mkgmap.main.Main.main(Main.java:114)

Hi
There must be something else missing. Placing both jar files into /lib the error is thrown at an earlier step (14 sec vs 2 min 13 sec), and the error message is slightly different: Bad file format: ethiopia.osm.pbf
Oh, so are you compiling several pbf files and some work and one fails? The setup that ran for 2min 13sec was probably OK, but there is a faulty/bad pbf. If that is true, then you need to look at the individual pbf files, check that they are not zero size, too small or otherwise corrupted.
Failed to read binary file ethiopia.osm.pbf Exception in thread "main" java.lang.NullPointerException at uk.me.parabola.mkgmap.combiners.FileInfo.getFileInfo(FileInfo.java:147) at uk.me.parabola.mkgmap.main.Main.endOptions(Main.java:429)
This happens happens after all pbf files have been compiled to .img files and it means that one of the files did not compile and so the .img is missing. ..Steve

El 10/10/12 14:22, Steve Ratcliffe escribió:
Hi
There must be something else missing. Placing both jar files into /lib the error is thrown at an earlier step (14 sec vs 2 min 13 sec), and the error message is slightly different: Bad file format: ethiopia.osm.pbf
Oh, so are you compiling several pbf files and some work and one fails? The setup that ran for 2min 13sec was probably OK, but there is a faulty/bad pbf.
If that is true, then you need to look at the individual pbf files, check that they are not zero size, too small or otherwise corrupted.
Both of them failed, but the problem was in the pbf files. I reused one of my scripts and it was still pointing to old geofabrik url :-[ . Sorry for the noise.
Failed to read binary file ethiopia.osm.pbf Exception in thread "main" java.lang.NullPointerException at uk.me.parabola.mkgmap.combiners.FileInfo.getFileInfo(FileInfo.java:147) at uk.me.parabola.mkgmap.main.Main.endOptions(Main.java:429)
This happens happens after all pbf files have been compiled to .img files and it means that one of the files did not compile and so the .img is missing.
..Steve _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
-- Por favor, no me envíe documentos con extensiones .doc, .docx, .xls, .xlsx, .ppt, .pptx, .mdb, mdbx Instale LibreOffice desde http://es.libreoffice.org/descarga/ LibreOffice es libre: se puede copiar, modificar y redistribuir libremente. Gratis y totalmente legal. LibreOffice está en continuo desarrollo y no tendrá que pagar por las nuevas versiones.
participants (2)
-
Carlos Dávila
-
Steve Ratcliffe