Modify

Opened 10 years ago

Closed 10 years ago

#9537 closed defect (fixed)

Can't read bz2 file

Reported by: naoliv Owned by: team
Priority: normal Milestone: 14.01
Component: Core Version:
Keywords: Cc:

Description

It seems that JOSM can't properly open this file: http://people.debian.org/~naoliv/misc/osm/monster.osm.bz2 (14M, 205M after decompressing)

Could not read file 'monster.osm.bz2'.
Error is:
Line 14,654 column 97: XML document structures must start and end within the same entity.
INFO: Open file: /tmp/monster.osm.bz2 (14515727 bytes)
org.openstreetmap.josm.io.IllegalDataException: Line 14,654 column 97: XML document structures must start and end within the same entity.
	at org.openstreetmap.josm.io.OsmReader.doParseDataSet(OsmReader.java:621)
	at org.openstreetmap.josm.io.OsmReader.parseDataSet(OsmReader.java:643)
	at org.openstreetmap.josm.io.OsmImporter.parseDataSet(OsmImporter.java:122)
	at org.openstreetmap.josm.io.OsmImporter.loadLayer(OsmImporter.java:112)
	at org.openstreetmap.josm.io.OsmImporter.importData(OsmImporter.java:90)
	at org.openstreetmap.josm.io.OsmBzip2Importer.importData(OsmBzip2Importer.java:24)
	at org.openstreetmap.josm.io.FileImporter.importDataHandleExceptions(FileImporter.java:68)
	at org.openstreetmap.josm.actions.OpenFileAction$OpenFileTask.importData(OpenFileAction.java:333)
	at org.openstreetmap.josm.actions.OpenFileAction$OpenFileTask.realRun(OpenFileAction.java:276)
	at org.openstreetmap.josm.gui.PleaseWaitRunnable.doRealRun(PleaseWaitRunnable.java:82)
	at org.openstreetmap.josm.gui.PleaseWaitRunnable.run(PleaseWaitRunnable.java:150)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:744)
Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[14654,97]
Message: XML document structures must start and end within the same entity.
	at com.sun.org.apache.xerces.internal.impl.XMLStreamReaderImpl.next(XMLStreamReaderImpl.java:598)
	at org.openstreetmap.josm.io.OsmReader.parseOsm(OsmReader.java:137)
	at org.openstreetmap.josm.io.OsmReader.parseRoot(OsmReader.java:112)
	at org.openstreetmap.josm.io.OsmReader.parse(OsmReader.java:98)
	at org.openstreetmap.josm.io.OsmReader.doParseDataSet(OsmReader.java:594)
	... 15 more

But it can read it if we previously decompress the file.

Attachments (0)

Change History (4)

comment:1 by simon04, 10 years ago

Confirmed. How did you create this file? When bunzip2- and bzip2-ing this file (using bzip2 1.0.6-5 from Arch Linux), JOSM is able to open it without problems.

comment:2 by naoliv, 10 years ago

It was created with pbzip2:

pbzip2 -b15vk monster.osm

Everything that I have tested is able to read it (bunzip2, pbzip2, lbunzip2, bzcat, mc, less, etc)

comment:3 by simon04, 10 years ago

Milestone: 14.01

Thanks. This was a bug of the Apache library (see https://issues.apache.org/jira/browse/COMPRESS-185) and a fix for JOSM is easy.

comment:4 by simon04, 10 years ago

Resolution: fixed
Status: newclosed

In 6634/josm:

fix #9537 - Can't read bz2 file which has been created by pbzip2

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.