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

mapsforge-poi-writer - Runtime error on OpenJDK 10 #1083

Closed
mstaniszczak opened this Issue Aug 25, 2018 · 8 comments

Comments

Projects
None yet
2 participants
@mstaniszczak

mstaniszczak commented Aug 25, 2018

Hi, running the latest available JAR file (snapshot from 20180824) I get a runtime error:

java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException
	at org.mapsforge.poi.writer.PoiWriter.<init>(PoiWriter.java:133)
	at org.mapsforge.poi.writer.PoiWriter.newInstance(PoiWriter.java:76)
	at org.mapsforge.poi.writer.osmosis.PoiWriterTask.<init>(PoiWriterTask.java:66)
	at org.mapsforge.poi.writer.osmosis.PoiWriterFactory.createTaskManagerImpl(PoiWriterFactory.java:84)
	at org.openstreetmap.osmosis.core.pipeline.common.TaskManagerFactory.createTaskManager(TaskManagerFactory.java:60)
	at org.openstreetmap.osmosis.core.pipeline.common.Pipeline.buildTasks(Pipeline.java:51)
	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 java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:564)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:330)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:238)
	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
	at org.codehaus.classworlds.Launcher.main(Launcher.java:47)
Caused by: java.lang.ClassNotFoundException: javax.xml.bind.JAXBException
	at org.java.plugin.standard.StandardPluginClassLoader.loadClass(StandardPluginClassLoader.java:330)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:499)
	... 18 more

Java version:

$ java --version
openjdk 10.0.2 2018-07-17
OpenJDK Runtime Environment (build 10.0.2+13-Ubuntu-1ubuntu0.18.04.1)
OpenJDK 64-Bit Server VM (build 10.0.2+13-Ubuntu-1ubuntu0.18.04.1, mixed mode)
@mstaniszczak

This comment has been minimized.

Show comment
Hide comment
@mstaniszczak

mstaniszczak Aug 25, 2018

Any reason to just not add:

implementation 'javax.xml.bind:jaxb-api:2.3.0'

to gradle? I'll test it in a while.

mstaniszczak commented Aug 25, 2018

Any reason to just not add:

implementation 'javax.xml.bind:jaxb-api:2.3.0'

to gradle? I'll test it in a while.

@devemux86

This comment has been minimized.

Show comment
Hide comment
@devemux86

devemux86 Aug 25, 2018

Collaborator

Just mentioned a search result with the reasons, as have not seen the issue so far. 🙂

If doesn't break experience in previous Java for users, we can add the dependency.

Does the map-writer shows similar behaviour?

Collaborator

devemux86 commented Aug 25, 2018

Just mentioned a search result with the reasons, as have not seen the issue so far. 🙂

If doesn't break experience in previous Java for users, we can add the dependency.

Does the map-writer shows similar behaviour?

@mstaniszczak

This comment has been minimized.

Show comment
Hide comment
@mstaniszczak

mstaniszczak Aug 25, 2018

Nop, but like I see map-writer not use javax.xml.bind.

mstaniszczak commented Aug 25, 2018

Nop, but like I see map-writer not use javax.xml.bind.

@devemux86

This comment has been minimized.

Show comment
Hide comment
@devemux86

devemux86 Aug 25, 2018

Collaborator

Have you tested also map-writer in your environment to be sure?

Collaborator

devemux86 commented Aug 25, 2018

Have you tested also map-writer in your environment to be sure?

@mstaniszczak

This comment has been minimized.

Show comment
Hide comment
@mstaniszczak

mstaniszczak Aug 25, 2018

Yes. I using it with https://github.com/mapsforge/mapsforge-creator, which use both, map-writer and poi-writer. map-writer woks fine without changes.

mstaniszczak commented Aug 25, 2018

Yes. I using it with https://github.com/mapsforge/mapsforge-creator, which use both, map-writer and poi-writer. map-writer woks fine without changes.

@devemux86 devemux86 added enhancement bug and removed enhancement labels Aug 25, 2018

@devemux86 devemux86 modified the milestone: 0.10.0 Aug 25, 2018

@devemux86 devemux86 added the poi label Aug 26, 2018

@devemux86

This comment has been minimized.

Show comment
Hide comment
@devemux86

devemux86 Aug 26, 2018

Collaborator

Actually need some different dependencies and change the ClassLoader in JAXBContext to make it work.

Collaborator

devemux86 commented Aug 26, 2018

Actually need some different dependencies and change the ClassLoader in JAXBContext to make it work.

@devemux86 devemux86 closed this in 44cd1ab Aug 26, 2018

@mstaniszczak

This comment has been minimized.

Show comment
Hide comment
@mstaniszczak

mstaniszczak Aug 26, 2018

I went to the BBQ last night. I wanted to check it today once again + send a PR. But I see that you already made fix for it. Thanks!

mstaniszczak commented Aug 26, 2018

I went to the BBQ last night. I wanted to check it today once again + send a PR. But I see that you already made fix for it. Thanks!

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