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

2009-04-29 Thread Karl Newman
On Wed, Apr 29, 2009 at 6:32 AM, Maarten Deen md...@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
___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


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

2009-04-29 Thread Maarten Deen
Karl Newman wrote:
 On Wed, Apr 29, 2009 at 6:32 AM, Maarten Deen md...@xs4all.nl 
 mailto:md...@xs4all.nl wrote:

 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.
 
 Looks like your node element is missing the required (for 0.6 files) 
 version attribute.

Ok. I downloaded the node from the api and I see the difference. I got this 
from 
one of the xapi servers. Guess they're not yet fully 0.6 compliant then.
Or is there a way of getting osmosis to disregard the fact that there is no 
version attribute?

Regards,
Maarten


___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


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

2009-04-29 Thread Karl Newman
On Wed, Apr 29, 2009 at 9:54 AM, Maarten Deen md...@xs4all.nl wrote:

 Karl Newman wrote:
  On Wed, Apr 29, 2009 at 6:32 AM, Maarten Deen md...@xs4all.nl
  mailto:md...@xs4all.nl wrote:

  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.
 
  Looks like your node element is missing the required (for 0.6 files)
  version attribute.

 Ok. I downloaded the node from the api and I see the difference. I got this
 from
 one of the xapi servers. Guess they're not yet fully 0.6 compliant then.
 Or is there a way of getting osmosis to disregard the fact that there is no
 version attribute?

 Regards,
 Maarten


Well, I know there's currently no way to make Osmosis ignore a missing
version attribute, but it's certainly possible to program that functionality
as an option. It could just create a synthetic version number (0?) for use
in the rest of the pipeline. This would likely prevent it from being
uploaded (without further manipulation, anyway). I'll leave it to others to
debate the wisdom of providing such an option for non-compliant files,
though.

Karl
___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


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

2009-04-29 Thread Maarten Deen
Karl Newman wrote:
 On Wed, Apr 29, 2009 at 9:54 AM, Maarten Deen md...@xs4all.nl 
 mailto:md...@xs4all.nl wrote:

 Ok. I downloaded the node from the api and I see the difference. I
 got this from
 one of the xapi servers. Guess they're not yet fully 0.6 compliant then.
 Or is there a way of getting osmosis to disregard the fact that
 there is no
 version attribute?
 
 Regards,
 Maarten
 
 
 Well, I know there's currently no way to make Osmosis ignore a missing 
 version attribute, but it's certainly possible to program that 
 functionality as an option. It could just create a synthetic version 
 number (0?) for use in the rest of the pipeline. This would likely 
 prevent it from being uploaded (without further manipulation, anyway). 
 I'll leave it to others to debate the wisdom of providing such an option 
 for non-compliant files, though.

I've found that osmosis will still read a (xapi) 0.6 file in 0.5 mode. It does 
complain that the version number does not match, but it reads it fine. So no 
workaround necessary.

Regards,
Maarten

___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev