unmarshal error while running the OSM2NDS

classic Classic list List threaded Threaded
21 messages Options
12
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

unmarshal error while running the OSM2NDS

winslolf
Hello all

I'm trying to use the OSM2NDS tool and running into a problem.  I downloaded the OSM data using a ArcGIS plugin called "download osm data (XAPI)".  The error I'm getting looks like this  


\ways.osm' could not be unmarshalled. Maybe the file isn't valid.
        javax.xml.bind.UnmarshalException
 - with linked exception:
[org.xml.sax.SAXParseException: cvc-complex-type.3.2.2: Attribute 'xapi:planetDate' is not allowed to appear in element 'osm'.] ReaderException: Therefore the process is canceled.

Any thoughts?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: unmarshal error while running the OSM2NDS

peterseva
Hey!

This is a similar data error as

http://osm2nds.forum.52north.org/Error-with-OSM2NDS-td4639455.html#a4639463

Your OSM file contains an XML attribute which is not accepted by the following XML schema:

https://svn.52north.org/svn/geoprocessing/main/osm2nds/trunk/data/osm_v_0_6.xsd

I expect that the various OSM file generators add various attributes. In order to face this situation, I will have to change osm2nds, so it accepts any kind of OSM attributes in the osm tag.

As a short-term solution, please remove all rejected attributes.

Could you please upload your OSM file? I would like to use it as a test file.

Best wishes,
Eva

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: unmarshal error while running the OSM2NDS

winslolf
Thanks for the response!

I needed to delete two different attributes that were messing it up but as far as I can tell it seems to be working now I'll attach the OSM data I'm working with.

Thanks again!

ways.7z
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: unmarshal error while running the OSM2NDS

Marc
This post was updated on .
Hey,
I try to use OSM2nds but it doesn't work because of the following error:

2013-06-11 16:54:24 ERROR: org.n52.osm2nds.reader.ReaderException: The reading process of the file 'C:\Dokumente und Einstellungen\Administrator\Eigene Dateien\Downloads\Potsdam.osm' failed:
        The file 'C:\Dokumente und Einstellungen\Administrator\Eigene Dateien\Downloads\Potsdam.osm' could not be unmarshalled. Maybe the file isn't valid.
        javax.xml.bind.UnmarshalException
 - with linked exception:
[org.xml.sax.SAXParseException; systemId: file:/C:/Dokumente%20und%20Einstellungen/Administrator/Eigene%20Dateien/Downloads/Potsdam.osm; lineNumber: 2; columnNumber: 19; Auf Elementtyp "osm" müssen entweder Attributspezifikationen, ">" oder "/>" folgen.] ReaderException: Therefore the process is canceled.

I tried it with different Data form Geofabrik.de.
The file I use currently is generated with JOSM and saved as .osm.
Are there other elements that will not work?
Potsdam.zip


Maybe somebody can help me?

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: unmarshal error while running the OSM2NDS

peterseva
Hello Marc,

could you please post the very first lines of your OSM file?

Best wishes,
Eva
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: unmarshal error while running the OSM2NDS

Marc
Hey Eva,
the first line of the OSM-file is:


<?xml version='1.0' encoding='UTF-8'?>


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: unmarshal error while running the OSM2NDS

peterseva
Hello Marc,

I asked for the first few lines (plural form). Never mind.

Could you also post the second line because the error message mentions this.

Best wishes,
Eva
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: unmarshal error while running the OSM2NDS

Marc
Sorry!

<?xml version='1.0' encoding='UTF-8'?>
<osm version='0.6' upload='true' generator='JOSM'>
  <bounds minlat='52.3424711' minlon='12.9676437' maxlat='52.4283849' maxlon='13.1640244' origin='http://overpass-api.de/api/xapi?' />

If you have other questions that refer to my OSM-File, I uploaded my ZIP file in my first post.

Thanks.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: unmarshal error while running the OSM2NDS

peterseva
Hello Marc,

my error message with jdk1.6.0_33 is:

2013-06-13 13:12:18 ERROR: org.n52.osm2nds.reader.ReaderException: The reading process of the file 'C:\data\evp\tmp\osm2nds\Marc\Potsdam.osm' failed:
        The file 'C:\tmp\Potsdam.osm' could not be unmarshalled. Maybe the file isn't valid.
        javax.xml.bind.UnmarshalException
 - with linked exception:
[org.xml.sax.SAXParseException: cvc-complex-type.3.2.2: Attribute 'upload' is not allowed to appear in element 'osm'.] ReaderException: Therefore the process is canceled.

This message clearly says that the attribute 'upload' is not accepted by the application osm2nds. Osm2nds uses an XML schema (https://svn.52north.org/svn/geoprocessing/main/osm2nds/trunk/resources/osm_v_0_6.xsd) in order to validate the OSM file. This schema does not allow this attribute.

In the past, further attributes were identified which are part of some OSM files but which are not accepted by this application. For this reason, the application should be adapted.

In the meantime, please delete this attribute.

Best wishes,
Eva

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: unmarshal error while running the OSM2NDS

Marc
It works. Thanks a lot. Great tool. Great support!
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: unmarshal error while running the OSM2NDS

peterseva
Thanks!
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: unmarshal error while running the OSM2NDS

onoinkimono
In reply to this post by peterseva
Hey everyone,

I guess I have the same problem as Marc.


the attribute "timestamp" cannot be accepted. I get I have to delete this attribute in the .osm-file but my rather silly question here is: how do I do it? Is it enough to remove it from the first lines (as seen below)? 'Cause it reoccurs in every other line as well... Sorry, I'm quiet a beginner.

<?xml version='1.0' encoding='UTF-8'?>
<osm version="0.6" generator="osmconvert 0.7T" timestamp="2013-08-02T19:00:02Z">
        <bounds minlat="52.4" minlon="12.96" maxlat="52.43" maxlon="13.06"/>
        <node id="26910468" lat="52.4346712" lon="13.0575476" version="4" timestamp="2007-12-01T16:36:52Z" changeset="19330" uid="15518" user="IngoWo">
                <tag k="created_by" v="JOSM"/>
        </node>

...
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: unmarshal error while running the OSM2NDS

peterseva
Hello,

you only have to delete the first attribute "timestamp" which is located in the element "osm". All other timestamp attributes are accepted.

Best wishes,
Eva
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: unmarshal error while running the OSM2NDS

onoinkimono
It works! Thanks for the great support!


Von: peterseva [via 52°North - OSM2NDS Forum.] <[hidden email]>
An: onoinkimono <[hidden email]>
Gesendet: 10:25 Donnerstag, 22.August 2013
Betreff: Re: unmarshal error while running the OSM2NDS

Hello,

you only have to delete the first attribute "timestamp" which is located in the element "osm". All other timestamp attributes are accepted.

Best wishes,
Eva


If you reply to this email, your message will be added to the discussion below:
http://osm2nds.forum.52north.org/unmarshal-error-while-running-the-OSM2NDS-tp4639462p4639543.html
To unsubscribe from unmarshal error while running the OSM2NDS, click here.
NAML


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: unmarshal error while running the OSM2NDS

Michael Tausch
http://osm2nds.forum.52north.org/unmarshal-error-while-running-the-OSM2NDS-td4639462.html
Hi Eva,

first of all Merry Christmas to you!
you´ve done great work to make such a tool.

A pitty i am no GIS-Expert but i do my best to struggle through the program everytime.

For my Masterthesis i plan to use your tool to make a highway routing.

When using it the problem occurs that is described in this forum-topic:

http://osm2nds.forum.52north.org/unmarshal-error-while-running-the-OSM2NDS-td4639462.html

So the solution is written there, too but a pitty i am not able to solve it. How do i delete the attribute "timestamp" in the OSM-file? i can´t work on it properly in the text-editor and to be honest i don´t have any clue how to do it.
I am wondering: I used several OSM-Files from openstreetmaps.org and a seperated highway-shapefile from "maps without borders" and a file (Bremen.osm) about wcih a friend told me it worked with exactly this one. does it depend on the PC´s engine?

Excuse my restricted knowledge about the topic. It would be great if you could help. Thanks in advance.
Best Regards Michael
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: unmarshal error while running the OSM2NDS

peterseva
Hi Michael,

I hope you had a good holiday.

If you want to delete the timestamp attribute, you have to do something like this:

Original:
<osm version="0.6" generator="osmconvert 0.7T" timestamp="2013-08-02T19:00:02Z">

Deleted:
<osm version="0.6" generator="osmconvert 0.7T">

Does this work for you? Or which error message do you get exactly?

Best wishes,
Eva

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: unmarshal error while running the OSM2NDS

Michael Tausch
Hi Eva,

thanks for your fast answer.

I think my problem is even more basic:
The time stamp we are talking about has to be removed in the underlying OSM-File?! So at the oment i don´t have any clue how to remove the timestamp as described because i don´t know how to see the line in the way that it can be altered. Or where exactly is the time stamp- problem? (From what i´v read in the forum it seems to be this kind of problem. Maybe it´s another one. Therefore i send you the logfile)

Sorry for the probably quite stupid question but it would be great of you helping me

I send you my logfile containing error-report: Logfile_Error


Thanks a lot.

Best wishes.

Michael
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: unmarshal error while running the OSM2NDS

peterseva
Hi Michael,

Could you please attach your OSM file? If your file is too big, please delete everything except the first few lines and attach the file.

Best wishes,
Eva
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: unmarshal error while running the OSM2NDS

Michael Tausch
Hi Eva,

obviously my knowledge isn´t fairly enough to solve it. I made to modify the osm.file by the program "osm convert" but there is no real option that works. i removed outhor-information of it and the error message is  a little bit different and is talking directly about unvalid time-stamp.

so all this leads to the basic of my problem:

I don´t have a real clue about console-applications, so you told me to remove the first few lines of the osm-file to attache it. Same problem like removing the time stamp: My question is: How do i do this? Which program should i use to see the code of the osm-file and to modify it. (When opening in Editor i just see nonsense)

You see i am only a GIS-User..... a pitty no real clue about real programming-basics....

Because it is still to big: Here is the link of the example-Osm-File: https://dl.dropboxusercontent.com/u/31869650/bremen-latest.osm

I hope you are patient enough to help me..

Best Wishes Michael
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: unmarshal error while running the OSM2NDS

Michael Tausch
Hi , Finally i was able to solve the Problem: I think it was just my eprosnal one in my restricted point of view:

I convertet the original .osm-file to another resaved  file with the tool OSM-convert. After that i was able to open it with the Program " Notepad Plus-Plus". There i could remove the timestamp and saved it again and reconvertet it with OSM-convert. After that i extended the heap-size for Java and the Conversion started....

My Problem was i couldn´t open the original OSM-file with any program to modify it... it took the "trick" to convert and reconvert it and to use C++ (which i dind´t know).

So again thank you very mich for your help Eva!

Only thing is: i am wondering why many attributes are reporting mistakes during conversion-process: Turn-restrictions and height-limitations are producing mistakes.

Best Wishes

Michael
12
Loading...