﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
12538	error trying to import a osm.pbf file that was origially crated with splitter r427	gregcrago	Don-vip	"Originally I installed JOSM v9329 and pbf plugin v31772 to import a osm.pbf that was generated with splitter r427 and I got error ""Could not read file '12390006.osm.pbf'. Error is: java.lang.IndexOutOfBoundsException: Index: 0""

input file is 10,462KB

My JOSM command line is ""java -Xmx1024M -Xms1024M -jar ""C:\Program Files (x86)\JOSM\josm-tested.jar""""

Running Windows 7 x64 with 8GB ram, java runtime ver8.0.400

I did some web searching and I found some people got around this error by using OSMOSIS

So I used ""osmconvert 12390006.osm.pbf >plymouth.osm.pbf""

The resulting file, plymouth.osm.pbf is 154,423KB (NOW 15 time LARGER)

I tried to import this file into JOSM and got this error message:

Could not read file 'plymouth.osm.pbf'. Error is: crosby.binary.file.FileFormatException: Unexpectedly long header 65536 bytes. Possibly corrupt file.

Is this OSMOSIS file too big?
Why could I not import my original osm.pbf 10KB file generated from splitter

I did see that GERD found that splitter output files are missing META DATA, and is seems like OSMOSIS adds junk META data that makes the pbf plugin happy?!

{{{
URL:http://josm.openstreetmap.de/svn/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2016-01-06 17:30:31 +0100 (Wed, 06 Jan 2016)
Build-Date:2016-01-06 16:32:31
Revision:9329
Relative:URL: ^/trunk

Identification: JOSM/1.5 (9329 en) Windows 7 64-Bit
Memory Usage: 989 MB / 989 MB (834 MB allocated, but free)
Java version: 1.8.0_40, Oracle Corporation, Java HotSpot(TM) Client VM
Dataset consistency test: No problems found

Plugins:
- pbf (31772)

Last errors/warnings:
- E: org.openstreetmap.josm.io.IllegalDataException: java.lang.IndexOutOfBoundsException: Index: 0. Cause: java.lang.IndexOutOfBoundsException: Index: 0
- E: org.openstreetmap.josm.io.IllegalDataException: crosby.binary.file.FileFormatException: Unexpectedly long header 65536 bytes. Possibly corrupt file.. Cause: crosby.binary.file.FileFormatException: Unexpectedly long header 65536 bytes. Possibly corrupt file.
- E: org.openstreetmap.josm.io.IllegalDataException: crosby.binary.file.FileFormatException: Unexpectedly long header 65536 bytes. Possibly corrupt file.. Cause: crosby.binary.file.FileFormatException: Unexpectedly long header 65536 bytes. Possibly corrupt file.
- E: org.openstreetmap.josm.io.IllegalDataException: java.lang.IndexOutOfBoundsException: Index: 0. Cause: java.lang.IndexOutOfBoundsException: Index: 0
- E: org.openstreetmap.josm.io.IllegalDataException: crosby.binary.file.FileFormatException: Unexpectedly long header 65536 bytes. Possibly corrupt file.. Cause: crosby.binary.file.FileFormatException: Unexpectedly long header 65536 bytes. Possibly corrupt file.
}}}
"	defect	closed	normal		Plugin pbf	latest	fixed	template_report	
