Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

map-writer: failed to create an XPathFactory for the default object model #303

Closed
mapsforge opened this issue Nov 6, 2014 · 9 comments
Closed

Comments

@mapsforge
Copy link
Owner

From didi...@gmail.com on April 23, 2012 18:39:59

I'm trying to create a map file with the osmosis plugin, but the result is:

$ osmosis --rx file=cities/it-bozen/it-bozen.xml --mapfile-writer file=forge-it-bozen.map
Apr 23, 2012 6:25:24 PM org.openstreetmap.osmosis.core.Osmosis run
INFO: Osmosis Version 0.40.1
Apr 23, 2012 6:25:24 PM org.openstreetmap.osmosis.core.Osmosis run
INFO: Preparing pipeline.
Apr 23, 2012 6:25:24 PM org.openstreetmap.osmosis.core.Osmosis main
SEVERE: Execution aborted.
java.lang.RuntimeException: XPathFactory#newInstance() failed to create an XPathFactory for the default object model: http://java.sun.com/jaxp/xpath/dom with the XPathFactoryConfigurationException: javax.xml.xpath.XPathFactoryConfigurationException: No XPathFctory implementation found for the object model: http://java.sun.com/jaxp/xpath/dom at javax.xml.xpath.XPathFactory.newInstance(XPathFactory.java:72)
at org.mapsforge.map.writer.OSMTagMapping.(OSMTagMapping.java:124)
at org.mapsforge.map.writer.OSMTagMapping.getInstance(OSMTagMapping.java:111)
at org.mapsforge.map.writer.OSMTagMapping.getInstance(OSMTagMapping.java:95)
at org.mapsforge.map.writer.model.MapWriterConfiguration.loadTagMappingFile(MapWriterConfiguration.java:394)
at org.mapsforge.map.writer.osmosis.MapFileWriterFactory.createTaskManagerImpl(MapFileWriterFactory.java:54)
at org.openstreetmap.osmosis.core.pipeline.common.TaskManagerFactory.createTaskManager(TaskManagerFactory.java:60)
at org.openstreetmap.osmosis.core.pipeline.common.Pipeline.buildTasks(Pipeline.java:50)
at org.openstreetmap.osmosis.core.pipeline.common.Pipeline.prepare(Pipeline.java:112)
at org.openstreetmap.osmosis.core.Osmosis.run(Osmosis.java:86)
at org.openstreetmap.osmosis.core.Osmosis.main(Osmosis.java:37)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:328)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:238)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:408)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:351)
at org.codehaus.classworlds.Launcher.main(Launcher.java:31) What version of the product are you using? On what operating system? OS: Ubuntu 12.04

$ java -version
java version "1.7.0_03"
OpenJDK Runtime Environment (IcedTea7 2.1.1pre) (7u3-2.1.1pre1-1ubuntu2)
OpenJDK 64-Bit Server VM (build 22.0-b10, mixed mode)

osmosis 0.40.1+ds1-3 (Ubuntu package)

plugin: mapsforge-map-writer-0.3.0-jar-with-dependencies.jar

I use java 7 because of another osmosis-plugin requiring it.
Any idea how I can get it working?

Original issue: http://code.google.com/p/mapsforge/issues/detail?id=303

@mapsforge
Copy link
Owner Author

From didi...@gmail.com on April 23, 2012 09:52:06

Just tried with Oracle's JRE (1.7.0_03), same result.

@mapsforge
Copy link
Owner Author

From didi...@gmail.com on April 23, 2012 10:32:32

solved. Installing the Ubuntu version of osmosis was not a good idea, although it's the same version. Somehow it's dependencies caused this problem. After removing it and it's dependencies and using a "manually installed" osmosis instead, it works.

@mapsforge
Copy link
Owner Author

From thilo.mu...@gmail.com on April 23, 2012 14:15:46

Status: Invalid

@mapsforge
Copy link
Owner Author

From gcmick...@gmail.com on April 24, 2012 02:44:42

I had a similar problem on my Debian system using Debians osmosis-package but I managed to solve it by doing this:

I checked that the package libxalan2-java was installed and then added the line "load /usr/share/java/xalan2.jar" at the end of /etc/osmosis/plexus.conf

@mapsforge
Copy link
Owner Author

From didi...@gmail.com on April 24, 2012 06:21:44

Thanks for the info!

I prefered to remove the package as the dependencies look a bit crazy to me. For example it needs libtomcat...

@mapsforge
Copy link
Owner Author

From roelfrenkema on July 08, 2012 09:48:03

comment 4 Works on Ubuntu 12.04 too. Thanks seems to be the easiest especially as xalan is installed. Just editing the config file did the trick.

@mapsforge
Copy link
Owner Author

From jjbross@gmail.com on July 08, 2012 10:54:40

Issue 307 has been merged into this issue.

@mapsforge
Copy link
Owner Author

From mithenks...@gmail.com on March 01, 2013 09:32:26

comment #4 solves the issue on Debian Testing

@mapsforge
Copy link
Owner Author

From samir.ti...@gmail.com on April 22, 2013 08:27:07

it work fine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant