I downloaded planet-latest.osm.bz2 file. Then tried to extract data using the following command.
osmosis --read-xml enableDateParsing=no file=J:\planet-latest.osm\planet-latest.osm.bz2
--bounding-box top=9.882275 bottom=5.965754 left=79.506340 right=82.02209 --write-xml
file=J:\planet-latest.osm\new.osm
But this command gives errors as in following
Aug 10, 2013 3:43:07 PM org.openstreetmap.osmosis.core.Osmosis run
INFO: Osmosis Version 0.43.1
Aug 10, 2013 3:43:07 PM org.java.plugin.registry.xml.ManifestParser <init>
INFO: got SAX parser factory - org.apache.xerces.jaxp.SAXParserFactoryImpl@15e60
1
Aug 10, 2013 3:43:07 PM org.java.plugin.registry.xml.PluginRegistryImpl configur
e
INFO: configured, stopOnError=false, isValidating=true
Aug 10, 2013 3:43:07 PM org.java.plugin.registry.xml.PluginRegistryImpl register
INFO: plug-in and fragment descriptors registered - 1
Aug 10, 2013 3:43:07 PM org.java.plugin.standard.StandardPluginManager activateP
lugin
INFO: plug-in started - [email protected]
39a160-dirty
Aug 10, 2013 3:43:07 PM org.openstreetmap.osmosis.core.Osmosis run
INFO: Preparing pipeline.
Aug 10, 2013 3:43:07 PM org.openstreetmap.osmosis.core.Osmosis run
INFO: Launching pipeline execution.
Aug 10, 2013 3:43:07 PM org.openstreetmap.osmosis.core.Osmosis run
INFO: Pipeline executing, waiting for completion.
Aug 10, 2013 3:43:18 PM org.openstreetmap.osmosis.core.pipeline.common.ActiveTas
kManager waitForCompletion
SEVERE: Thread for task 1-read-xml failed
org.openstreetmap.osmosis.core.OsmosisRuntimeException: Unable to parse xml file
J:\planet-latest.osm\planet-latest.osm.bz2. publicId=(null), systemId=(null),
lineNumber=3959, columnNumber=127.
at org.openstreetmap.osmosis.xml.v0_6.XmlReader.run(XmlReader.java:116)
at java.lang.Thread.run(Thread.java:722)
Caused by: org.xml.sax.SAXParseException; lineNumber: 3959; columnNumber: 127; X
ML document structures must start and end within the same entity.
at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Un
known Source)
at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLScanner.reportFatalError(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.endEntity(Unkno
wn Source)
at org.apache.xerces.impl.XMLDocumentScannerImpl.endEntity(Unknown Sourc
e)
at org.apache.xerces.impl.XMLEntityManager.endEntity(Unknown Source)
at org.apache.xerces.impl.XMLEntityScanner.load(Unknown Source)
at org.apache.xerces.impl.XMLEntityScanner.skipSpaces(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanAttribute(U
nknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElemen
t(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContent
Dispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Un
known Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Sour
ce)
at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:195)
at org.openstreetmap.osmosis.xml.v0_6.XmlReader.run(XmlReader.java:111)
... 1 more
Aug 10, 2013 3:43:18 PM org.openstreetmap.osmosis.core.Osmosis main
SEVERE: Execution aborted.
org.openstreetmap.osmosis.core.OsmosisRuntimeException: One or more tasks failed
.
at org.openstreetmap.osmosis.core.pipeline.common.Pipeline.waitForComple
tion(Pipeline.java:146)
at org.openstreetmap.osmosis.core.Osmosis.run(Osmosis.java:92)
at org.openstreetmap.osmosis.core.Osmosis.main(Osmosis.java:37)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Laun
cher.java:329)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.jav
a:239)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(La
uncher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:
352)
at org.codehaus.classworlds.Launcher.main(Launcher.java:47)
How do I solve this problem?