#15128 closed defect (fixed)
NoClassDefFoundError with java 9
Reported by: | naoliv | Owned by: | Don-vip |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Plugin kendzi3d | Version: | |
Keywords: | java9 | Cc: |
Description
When testing JOSM with java 9:
2017-08-08 21:35:58.950 GRAVE: org.openstreetmap.josm.plugins.PluginException: Um erro ocorreu com o plugin kendzi3d. Causa: java.lang.reflect.InvocationTargetException. Causa: com.google.inject.internal.util.$ComputationException: com.google.inject.internal.util.$ComputationException: java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException. Causa: com.google.inject.internal.util.$ComputationException: java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException. Causa: java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException. Causa: java.lang.ClassNotFoundException: javax.xml.bind.JAXBException org.openstreetmap.josm.plugins.PluginException: Um erro ocorreu com o plugin kendzi3d at org.openstreetmap.josm.plugins.PluginInformation.load(PluginInformation.java:329) at org.openstreetmap.josm.plugins.PluginHandler.loadPlugin(PluginHandler.java:779) at org.openstreetmap.josm.plugins.PluginHandler.loadPlugins(PluginHandler.java:862) at org.openstreetmap.josm.plugins.PluginHandler.loadLatePlugins(PluginHandler.java:901) at org.openstreetmap.josm.gui.MainApplication.loadLatePlugins(MainApplication.java:435) at org.openstreetmap.josm.gui.MainApplication.main(MainApplication.java:362) Caused by: java.lang.reflect.InvocationTargetException at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:488) at org.openstreetmap.josm.plugins.PluginInformation.load(PluginInformation.java:326) ... 5 more Caused by: com.google.inject.internal.util.$ComputationException: com.google.inject.internal.util.$ComputationException: java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException at com.google.inject.internal.util.$MapMaker$StrategyImpl.compute(MapMaker.java:553) at com.google.inject.internal.util.$MapMaker$StrategyImpl.compute(MapMaker.java:419) at com.google.inject.internal.util.$CustomConcurrentHashMap$ComputingImpl.get(CustomConcurrentHashMap.java:2041) at com.google.inject.internal.FailableCache.get(FailableCache.java:50) at com.google.inject.internal.ConstructorInjectorStore.get(ConstructorInjectorStore.java:49) at com.google.inject.internal.ConstructorBindingImpl.initialize(ConstructorBindingImpl.java:125) at com.google.inject.internal.InjectorImpl.initializeBinding(InjectorImpl.java:507) at com.google.inject.internal.AbstractBindingProcessor$Processor$1.run(AbstractBindingProcessor.java:159) at com.google.inject.internal.ProcessedBindingData.initializeBindings(ProcessedBindingData.java:44) at com.google.inject.internal.InternalInjectorCreator.initializeStatically(InternalInjectorCreator.java:122) at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:106) at com.google.inject.Guice.createInjector(Guice.java:95) at com.google.inject.Guice.createInjector(Guice.java:72) at com.google.inject.Guice.createInjector(Guice.java:62) at kendzi.josm.kendzi3d.Kendzi3DPlugin.<init>(Kendzi3DPlugin.java:82) ... 10 more Caused by: com.google.inject.internal.util.$ComputationException: java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException at com.google.inject.internal.util.$MapMaker$StrategyImpl.compute(MapMaker.java:553) at com.google.inject.internal.util.$MapMaker$StrategyImpl.compute(MapMaker.java:419) at com.google.inject.internal.util.$CustomConcurrentHashMap$ComputingImpl.get(CustomConcurrentHashMap.java:2041) at com.google.inject.internal.FailableCache.get(FailableCache.java:50) at com.google.inject.internal.MembersInjectorStore.get(MembersInjectorStore.java:65) at com.google.inject.internal.ConstructorInjectorStore.createConstructor(ConstructorInjectorStore.java:73) at com.google.inject.internal.ConstructorInjectorStore.access$000(ConstructorInjectorStore.java:28) at com.google.inject.internal.ConstructorInjectorStore$1.create(ConstructorInjectorStore.java:36) at com.google.inject.internal.ConstructorInjectorStore$1.create(ConstructorInjectorStore.java:32) at com.google.inject.internal.FailableCache$1.apply(FailableCache.java:39) at com.google.inject.internal.util.$MapMaker$StrategyImpl.compute(MapMaker.java:549) ... 24 more Caused by: java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException at java.base/java.lang.Class.getDeclaredMethods0(Native Method) at java.base/java.lang.Class.privateGetDeclaredMethods(Class.java:3139) at java.base/java.lang.Class.getDeclaredMethods(Class.java:2266) at com.google.inject.spi.InjectionPoint.getInjectionPoints(InjectionPoint.java:662) at com.google.inject.spi.InjectionPoint.forInstanceMethodsAndFields(InjectionPoint.java:356) at com.google.inject.internal.MembersInjectorStore.createWithListeners(MembersInjectorStore.java:90) at com.google.inject.internal.MembersInjectorStore.access$000(MembersInjectorStore.java:34) at com.google.inject.internal.MembersInjectorStore$1.create(MembersInjectorStore.java:42) at com.google.inject.internal.MembersInjectorStore$1.create(MembersInjectorStore.java:39) at com.google.inject.internal.FailableCache$1.apply(FailableCache.java:39) at com.google.inject.internal.util.$MapMaker$StrategyImpl.compute(MapMaker.java:549) ... 34 more Caused by: java.lang.ClassNotFoundException: javax.xml.bind.JAXBException at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:466) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:563) at org.openstreetmap.josm.plugins.PluginClassLoader.loadClass(PluginClassLoader.java:59) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:496) ... 45 more
JOSM:
Relative:URL: ^/trunk Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b Last:Changed Date: 2017-08-06 22:38:35 +0200 (Sun, 06 Aug 2017) Revision:12578 Build-Date:2017-08-07 01:32:55 URL:http://josm.openstreetmap.de/svn/trunk Identification: JOSM/1.5 (12578 pt_BR) Linux Debian GNU/Linux unstable (sid) Memory Usage: 261 MB / 3005 MB (145 MB allocated, but free) Java version: 9-Debian+0-9b181-2, Oracle Corporation, OpenJDK 64-Bit Server VM Screen: :0.0 1920x1080 Maximum Screen Size: 1920x1080 Java package: openjdk-9-jre:amd64-9~b181-2 Java ATK Wrapper package: libatk-wrapper-java:all-0.33.3-13 VM arguments: [-Dawt.useSystemAAFontSettings=on] Plugins: + AddrInterpolation (33160) + Create_grid_of_ways (32699) + FastDraw (33182) + FixAddresses (33182) + ImportImagePlugin (33372) + OpeningHoursEditor (33185) + PicLayer (33385) + SimplifyArea (33004) + apache-commons (32994) + buildings_tools (33004) + download_along (32946) + editgpx (33004) + ejml (32680) + geojson (52) + geotools (33380) + graphview (33004) + jogl (1.1.0) + jts (32699) + kendzi3d + kendzi3d-resources (0.0.1) + log4j (32699) + measurement (33088) + merge-overlap (33436) + opendata (33438) + pdfimport (33004) + photo_geotagging (33088) + poly (33004) + reverter (33088) + tageditor (33021) + tagging-preset-tester (33004) + todo (30200) + turnlanes-tagging (254) + turnrestrictions (33088) + undelete (33480)
Attachments (0)
Change History (8)
comment:1 by , 7 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:2 by , 7 years ago
mmm not so easy: http://mail.openjdk.java.net/pipermail/jigsaw-dev/2017-April/012138.html
There's no "Add-Modules" manifest attribute, so we cannot add the missing JVM option (--add-modules java.se.ee
) directly in the jar file.
The command line must be updated to add this parameter.
The plugin should still update Guice once Google supports Java 9, see https://github.com/google/guice/issues/1085
comment:5 by , 7 years ago
It's working!
Maybe it's good to add a note somewhere that people who directly runs java -jar josm-latest.jar
will also need to use --add-modules java.se.ee
?
The wiki (like "using the shell" in https://josm.openstreetmap.de/wiki/InstallNotes#LinuxBSD) and other docs will need to be updated too, I guess.
comment:6 by , 7 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Before documenting it, I'd like to see if next release of Guice will be able to run without JAXB, so that the option would not be necessary.
comment:7 by , 7 years ago
Code adapted in r13700 to support Java 10 (and not Java 11 as JAXB has been removed). Guice 4.2 has just been released with Java 9 support (finally)
Actually it's up to JOSM core to deal with this issue.