Hi All,
I'm totally new in OpenStreetMap forum. I need to do one, probably simple filtering operation in Osmosis but I'm getting this message "Files was unexpected at this time."
I'm using windows 8.1 and Java 1.7. First I installed Java 32bit but after restarting computer osmosis it didn't run. I downloaded and install Java 64 bit and after running osmosis I was able to see loading script but it looks incomplete.
I specified path to IF "%JAVACMD%"=="" set JAVACMD="C:\Program Files (x86)\Java\jre7\bin\java" but after running this line: osmosis --read-xml highways.osm --tf accept-w
ays highway=* --used-node --write-xml highwaysdone.osm
but i got this message:
C:\Users\adam.roborelanium\Desktop>"C:\Program Files (x86)\OSMOSIS\bin\osmosis.b
at"
Files was unexpected at this time.
here's all log copy.
C:\Users\adam.roborelanium\Desktop>"C:\Program Files (x86)\OSMOSIS\bin\osmosis.b
at"
cze 17, 2014 2:00:13 PM org.openstreetmap.osmosis.core.Osmosis run
INFO: Osmosis Version 0.43.1
cze 17, 2014 2:00:13 PM org.java.plugin.registry.xml.ManifestParser <init>
INFO: got SAX parser factory - org.apache.xerces.jaxp.SAXParserFactoryImpl@13d72
54
cze 17, 2014 2:00:13 PM org.java.plugin.registry.xml.PluginRegistryImpl configur
e
INFO: configured, stopOnError=false, isValidating=true
cze 17, 2014 2:00:14 PM org.java.plugin.registry.xml.PluginRegistryImpl register
INFO: plug-in and fragment descriptors registered - 1
cze 17, 2014 2:00:14 PM org.java.plugin.standard.StandardPluginManager activateP
lugin
INFO: plug-in started - org.openstreetmap.osmosis.core.plugin.Core@0.0.0.42-6-gf
39a160-dirty
cze 17, 2014 2:00:14 PM org.openstreetmap.osmosis.core.Osmosis run
INFO: Preparing pipeline.
cze 17, 2014 2:00:14 PM org.openstreetmap.osmosis.core.Osmosis run
INFO: Launching pipeline execution.
cze 17, 2014 2:00:14 PM org.openstreetmap.osmosis.core.Osmosis run
INFO: Pipeline executing, waiting for completion.
cze 17, 2014 2:00:14 PM org.openstreetmap.osmosis.core.Osmosis run
INFO: Pipeline complete.
cze 17, 2014 2:00:14 PM org.openstreetmap.osmosis.core.Osmosis run
INFO: Total execution time: 697 milliseconds.
C:\Users\adam.roborelanium\Desktop>osmosis --read-xml highways.osm --tf accept-w
ays highway=* --used-node --write-xml highwaysdone.osm
C:\Users\adam.roborelanium\Desktop>"C:\Program Files (x86)\OSMOSIS\bin\osmosis.b
at"
Files was unexpected at this time.
C:\Users\adam.roborelanium\Desktop>
Any idea, what can cause a problem ?
ps.
I put double quotes before and after %JAVACMD% but then osmosis doesn't want to start at all.
Thank You for help
asked
17 Jun '14, 08:58
roborelanium
1●1●1●1
accept rate:
0%
The Files originates from C:\Program Files[...].
Are you sure that this is a java problem and not a windows batch file problem? You were running "osmosis.bat" last. Adding to scai's comment: Try to cd into the directory C:\Program Files (x86)\OSMOSIS\bin\ and run the bat there.
Thanks a lot for answers.
I run osmosis.bat directly from the C:\Program Files (x86)\OSMOSIS\bin\ location but it's the same error. Is this what You are suggesting or I'm misunderstanding scai's "Files originates from C:\Program Files[...]" ?
In addition I tried to use OSMembrane which is using osmosis engine and it asked about the location of a batch file (I specified osmosis.bat in C:\Program Files[...]) but after running pipeline I got error too.
what am I doing wrong ?
Thank You for help
Maybe osmosis has a bug which prevents it from running inside paths which contain spaces? Try to run it in a path without spaces.
Thank you scai
I run it in C:/ path but I got following error:
'osmosis' is not recognized as an internal or external command, operable program or batch file.
or how to access path without the spaces ?
By installing/moving osmosis to a different directory, e.g. "C:\OSMOSIS" instead of "C:\Program Files (x86)\OSMOSIS".