Getting error trying to import osm.pbf file and I have the pbf pluging

has anyone successfully imported osm.pbf maps into JOSM?
Running JOSM v3929 and have pbf plugin v31772

I get this error:

Could not read file ‘12390004.osm.pbf’. Error is: java.lang.IndexOutOfBoundsException: Index: 0

do I have to use osm.bz2 maps?

using this website to download OSM data


I was able to open rhode-island-latest.osm.pbf (7.8Mb) and hawaii-latest.osm.pbf (8.9Mb) from the Geofabrik site and all looked fine
but was unable to open larger connecticut-latest.osm.pbf (22.2Mb)

Maybe the pbf files are generally to big?

What Java system is in use? exact version? 32 or 64 bit Java?

Dif you try to start JOSM with -Xmx parameter from a commandline to increase java memory?
See and search for Xmx on that wiki page.

How much RAM in your PC available?

I downloaded JOSM from the wiki download page and it does not specify 32 or 64 bit versions. I have r9329 and the file is “josm-tested.jar”

I have 8GB RAM and about 6GB free on x64 Windows 7 and here is the command line:
java -Xmx1024M -Xms1024M -jar “C:\Program Files (x86)\JOSM\josm-tested.jar”

I tried increasing the xmx to 2048 but i get “Error occurred during initialization of VM. Could not reserve enough space”

If you can tell me how to allocate more RAM, I would like to know. Maybe I would not have to use SPLITTER to break my maps into smaller pieces, which do not seem to load in JOSM anyway.

I am using SPLITTER with option --max-nodes=50000 because JOSM has a 50000 node limit?

How big is the file you are trying to load into JOSM?

(if it’s really large) what’s the reason that you need to load such a large file? Maybe you could use some other mechanism to get the data in that you want (Overpass with a selection is one option, I’m sure there are others)?

Found a way to import .osm.pbf files produced from splitter

(i use splitter because my downloaded .osm.pbf files are too bigh for JOSM to load with the .pbf pluging installed.

take the smaller map .osm.pbf and run :

osmconvert --fake-version 12390006.osm.pbf -o=12390006-josm.osm.pbf

then you can import this file into JOSM

There is indeed only one JOSM version for downloading,

but I asked for 32bit or 64 bit version of JAVA (not JOSM) … because if I am not wrong, with 32bit Java you can only allocate RAM up to -Xmx1500M or similar.

When using 64 bit Java, you can allocate a higher value … Success?