NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

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's gravatar image

roborelanium
1111
accept rate: 0%

edited 17 Jun '14, 13:14

aseerel4c26's gravatar image

aseerel4c26 ♦
32.6k18248554

1

The Files originates from C:\Program Files[...].

(17 Jun '14, 12:04) scai ♦

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.

(17 Jun '14, 13:16) aseerel4c26 ♦

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 ?

C:\Program Files (x86)\OSMOSIS\bin>"C:\Program Files (x86)\OSMOSIS\bin\osmosis.bat"
cze 18, 2014 12:34:43 PM org.openstreetmap.osmosis.core.Osmosis run
INFO: Osmosis Version 0.43.1
cze 18, 2014 12:34:43 PM org.java.plugin.registry.xml.ManifestParser <init>
INFO: got SAX parser factory - org.apache.xerces.jaxp.SAXParserFactoryImpl@198ee2f
cze 18, 2014 12:34:43 PM org.java.plugin.registry.xml.PluginRegistryImpl configure
INFO: configured, stopOnError=false, isValidating=true
cze 18, 2014 12:34:43 PM org.java.plugin.registry.xml.PluginRegistryImpl register
INFO: plug-in and fragment descriptors registered - 1
cze 18, 2014 12:34:43 PM org.java.plugin.standard.StandardPluginManager activatePlugin
INFO: plug-in started - org.openstreetmap.osmosis.core.plugin.Core@0.0.0.42-6-gf39a160-dirty
cze 18, 2014 12:34:43 PM org.openstreetmap.osmosis.core.Osmosis run
INFO: Preparing pipeline.
cze 18, 2014 12:34:43 PM org.openstreetmap.osmosis.core.Osmosis run
INFO: Launching pipeline execution.
cze 18, 2014 12:34:43 PM org.openstreetmap.osmosis.core.Osmosis run
INFO: Pipeline executing, waiting for completion.
cze 18, 2014 12:34:43 PM org.openstreetmap.osmosis.core.Osmosis run
INFO: Pipeline complete.
cze 18, 2014 12:34:43 PM org.openstreetmap.osmosis.core.Osmosis run
INFO: Total execution time: 665 milliseconds.

C:\Program Files (x86)\OSMOSIS\bin>cd c:/

c:\>cd C:\Program Files (x86)\OSMOSIS\bin

C:\Program Files (x86)\OSMOSIS\bin>osmosis --read-xml highways.osm --tf accept-ways highway=* --used-node --write-xml highwaysdone.osm
Files was unexpected at this time.

C:\Program Files (x86)\OSMOSIS\bin>

Thank You for help

(18 Jun '14, 06:53) roborelanium

Maybe osmosis has a bug which prevents it from running inside paths which contain spaces? Try to run it in a path without spaces.

(18 Jun '14, 07:41) scai ♦

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 ?

(18 Jun '14, 09:07) roborelanium
1

By installing/moving osmosis to a different directory, e.g. "C:\OSMOSIS" instead of "C:\Program Files (x86)\OSMOSIS".

(18 Jun '14, 09:39) scai ♦
showing 5 of 6 show 1 more comments

OK works ! But... installation of osmosis-latest.zip was giving me problems I mentioned above even after running it in c:\

After many try I run osmosis-0.43.1 and I filtered file successfully

Thanks for help good forum !

permanent link

answered 18 Jun '14, 16:38

roborelanium's gravatar image

roborelanium
1111
accept rate: 0%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×293
×252
×76
×1

question asked: 17 Jun '14, 08:58

question was seen: 13,972 times

last updated: 18 Jun '14, 16:38

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum