[OSM-dev] java.lang.NumberFormatException: null error with osmosis 0.30.3

Karl Newman siliconfiend at gmail.com
Wed Apr 29 16:51:42 BST 2009


On Wed, Apr 29, 2009 at 6:32 AM, Maarten Deen <mdeen at xs4all.nl> wrote:

> I'm trying to import v0.6 osm files with osmosis 0.30.3, and I get this
> error:
>
> SEVERE: Thread for task 1-read-xml failed
> java.lang.NumberFormatException: null
>         at java.lang.Integer.parseInt(Integer.java:415)
>         at java.lang.Integer.parseInt(Integer.java:497)
>         at
>
> org.openstreetmap.osmosis.core.xml.v0_6.impl.NodeElementProcessor.begin(NodeElementProcessor.java:67)
>         at
>
> org.openstreetmap.osmosis.core.xml.v0_6.impl.OsmHandler.startElement(OsmHandler.java:91)
>         at
>
> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:501)
>         at
>
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:1359)
>         at
>
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2747)
>         at
>
> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)
>         at
>
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
>         at
>
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:807)
>         at
>
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
>         at
>
> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:107)
>         at
>
> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
>         at
>
> com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
>         at javax.xml.parsers.SAXParser.parse(SAXParser.java:395)
>         at javax.xml.parsers.SAXParser.parse(SAXParser.java:198)
>         at
> org.openstreetmap.osmosis.core.xml.v0_6.XmlReader.run(XmlReader.java:108)
>         at java.lang.Thread.run(Thread.java:619)
> Apr 29, 2009 3:28: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.waitForCompletion(Pipeline.java:146)
>         at org.openstreetmap.osmosis.core.Osmosis.run(Osmosis.java:85)
>         at org.openstreetmap.osmosis.core.Osmosis.main(Osmosis.java:30)
>
>
> Sample file that I try to import is this:
>
> <?xml version='1.0' standalone='no'?>
> <osm version='0.6' generator='xapi: OSM Extended API 2.0'
> mlns:xapi='http://www.informationfreeway.org/xapi/0.6'
> xapi:uri='/api/0.6/node[amenity=atm][bbox=3.4,50.7,7.2,53.6]'
> api:planetDate='200904241825' xapi:copyright='2009 OpenStreetMap
> contributors'
> xapi:instance='zappyHyper'>
>   <node id='30839681' lat='52.6035219' lon='4.687596' user='Maarten
> Deen'xapi:users='florisje,Maarten Deen' timestamp='2009-03-01T11:48:12Z'>
>     <tag k='addr:city' v='Heiloo'/>
>     <tag k='addr:country' v='NL'/>
>     <tag k='addr:housenumber' v='10-12'/>
>     <tag k='addr:postcode' v='1852KX'/>
>     <tag k='addr:street' v='Het Hoekstuk'/>
>     <tag k='amenity' v='atm'/>
>     <tag k='name' v='ABN AMRO'/>
>   </node>
> </osm>
>
> Any idea what is going wrong here? The same error pops up with 0.30.
>
> Regards,
> Maarten
>

Looks like your node element is missing the required (for 0.6 files)
"version" attribute.

Karl
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20090429/201c8a4d/attachment.html>


More information about the dev mailing list