Closed curtis18 closed 1 year ago
looks like an issue with the libs used ViewManagerExtension
Juli 26, 2022 1:10:45 AM com.sun.xml.bind.v2.runtime.reflect.opt.Injector <clini
t>
SEVERE: null
java.security.PrivilegedActionException: java.lang.NoSuchMethodException: sun.mi
sc.Unsafe.defineClass(java.lang.String,[B,int,int,java.lang.ClassLoader,java.sec
urity.ProtectionDomain)
at java.base/java.security.AccessController.doPrivileged(AccessControlle
r.java:573)
at com.sun.xml.bind.v2.runtime.reflect.opt.Injector.<clinit>(Injector.ja
va:197)
at com.sun.xml.bind.v2.runtime.reflect.opt.AccessorInjector.prepare(Acce
ssorInjector.java:81)
at com.sun.xml.bind.v2.runtime.reflect.opt.OptimizedAccessorFactory.get(
OptimizedAccessorFactory.java:179)
at com.sun.xml.bind.v2.runtime.reflect.Accessor$FieldReflection.optimize
(Accessor.java:285)
at com.sun.xml.bind.v2.runtime.property.ArrayProperty.<init>(ArrayProper
ty.java:68)
at com.sun.xml.bind.v2.runtime.property.ArrayERProperty.<init>(ArrayERPr
operty.java:88)
at com.sun.xml.bind.v2.runtime.property.ArrayElementProperty.<init>(Arra
yElementProperty.java:100)
at com.sun.xml.bind.v2.runtime.property.ArrayElementNodeProperty.<init>(
ArrayElementNodeProperty.java:62)
at java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newIns
tance(DirectConstructorHandleAccessor.java:67)
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constru
ctor.java:499)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:
483)
at com.sun.xml.bind.v2.runtime.property.PropertyFactory.create(PropertyF
actory.java:128)
at com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.<init>(ClassBeanInfoImp
l.java:181)
at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getOrCreate(JAXBContextIm
pl.java:514)
at com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.ja
va:331)
at com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.ja
va:139)
at com.sun.xml.bind.v2.runtime.JAXBContextImpl$JAXBContextBuilder.build(
JAXBContextImpl.java:1156)
at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:
165)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(Dire
ctMethodHandleAccessor.java:104)
at java.base/java.lang.reflect.Method.invoke(Method.java:577)
at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:297)
at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:286)
at javax.xml.bind.ContextFinder.find(ContextFinder.java:409)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:721)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:662)
at org.openjump.ext.viewmanager.ViewManagerPlugIn.initialize(ViewManager
PlugIn.java:42)
at org.openjump.ext.viewmanager.ViewManagerExtension.configure(ViewManag
erExtension.java:24)
at com.vividsolutions.jump.workbench.plugin.PlugInManager.loadConfigurat
ions(PlugInManager.java:258)
at com.vividsolutions.jump.workbench.plugin.PlugInManager.load(PlugInMan
ager.java:237)
at com.vividsolutions.jump.workbench.JUMPWorkbench.main(JUMPWorkbench.ja
va:461)
at com.vividsolutions.jump.workbench.JUMPWorkbench.main(JUMPWorkbench.ja
va:396)
Caused by: java.lang.NoSuchMethodException: sun.misc.Unsafe.defineClass(java.lan
g.String,[B,int,int,java.lang.ClassLoader,java.security.ProtectionDomain)
at java.base/java.lang.Class.getMethod(Class.java:2259)
at com.sun.xml.bind.v2.runtime.reflect.opt.Injector$3.run(Injector.java:
201)
at com.sun.xml.bind.v2.runtime.reflect.opt.Injector$3.run(Injector.java:
197)
at java.base/java.security.AccessController.doPrivileged(AccessControlle
r.java:569)
... 31 more
[ERROR] 01:10:45.782 Cannot invoke "java.lang.reflect.Method.invoke(Object, Obje
ct[])" because "com.sun.xml.bind.v2.runtime.reflect.opt.Injector.defineClass" is
null
java.lang.NullPointerException: Cannot invoke "java.lang.reflect.Method.invoke(O
bject, Object[])" because "com.sun.xml.bind.v2.runtime.reflect.opt.Injector.defi
neClass" is null
at com.sun.xml.bind.v2.runtime.reflect.opt.Injector.inject(Injector.java
:311)
at com.sun.xml.bind.v2.runtime.reflect.opt.Injector.inject(Injector.java
:97)
at com.sun.xml.bind.v2.runtime.reflect.opt.AccessorInjector.prepare(Acce
ssorInjector.java:87)
at com.sun.xml.bind.v2.runtime.reflect.opt.OptimizedAccessorFactory.get(
OptimizedAccessorFactory.java:179)
at com.sun.xml.bind.v2.runtime.reflect.Accessor$FieldReflection.optimize
(Accessor.java:285)
at com.sun.xml.bind.v2.runtime.property.ArrayProperty.<init>(ArrayProper
ty.java:68)
at com.sun.xml.bind.v2.runtime.property.ArrayERProperty.<init>(ArrayERPr
operty.java:88)
at com.sun.xml.bind.v2.runtime.property.ArrayElementProperty.<init>(Arra
yElementProperty.java:100)
at com.sun.xml.bind.v2.runtime.property.ArrayElementNodeProperty.<init>(
ArrayElementNodeProperty.java:62)
at java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newIns
tance(DirectConstructorHandleAccessor.java:67)
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constru
ctor.java:499)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:
483)
at com.sun.xml.bind.v2.runtime.property.PropertyFactory.create(PropertyF
actory.java:128)
at com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.<init>(ClassBeanInfoImp
l.java:181)
at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getOrCreate(JAXBContextIm
pl.java:514)
at com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.ja
va:331)
at com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.ja
va:139)
at com.sun.xml.bind.v2.runtime.JAXBContextImpl$JAXBContextBuilder.build(
JAXBContextImpl.java:1156)
at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:
165)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(Dire
ctMethodHandleAccessor.java:104)
at java.base/java.lang.reflect.Method.invoke(Method.java:577)
at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:297)
at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:286)
at javax.xml.bind.ContextFinder.find(ContextFinder.java:409)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:721)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:662)
at org.openjump.ext.viewmanager.ViewManagerPlugIn.initialize(ViewManager
PlugIn.java:42)
at org.openjump.ext.viewmanager.ViewManagerExtension.configure(ViewManag
erExtension.java:24)
at com.vividsolutions.jump.workbench.plugin.PlugInManager.loadConfigurat
ions(PlugInManager.java:258)
at com.vividsolutions.jump.workbench.plugin.PlugInManager.load(PlugInMan
ager.java:237)
at com.vividsolutions.jump.workbench.JUMPWorkbench.main(JUMPWorkbench.ja
va:461)
at com.vividsolutions.jump.workbench.JUMPWorkbench.main(JUMPWorkbench.ja
va:396)
[INFO] 01:10:45.902 org.openjump.ext.viewmanager.ViewManagerExtension could not
be initialized
using google-foo it seems this might solve the issue https://github.com/highsource/maven-jaxb2-plugin/issues/204
Should be fixed in the last nightly-build (r5125). I did a minimal update of the jaxb libraries, sticking to 2.3.x. A deeper update will be needed sooner or later but it seems that newer versions changed package name and would need updates in the code. Also some newer versions need java 11.
works for me with in a quick test with java17/18
@curtis18 can you please test the latest snapshot https://sourceforge.net/projects/jump-pilot/files/OpenJUMP2_snapshots/OpenJUMP-Portable-20220726-r5125%5Bf61f399%5D-PLUS.zip/download
and confirm that this issue is solved? if so you may close this issue as well.
@edeso Thank you. The issue is solved and the latest snapshot works in both OpenJDK 11 and 17.
What is the requirement of the JRE version of OpenJump? Can OpenJump embed OpenJRE / OpenJDK? Thank you.
I am using OpenJDK 17 and it shows null point exception when opening OpenJump.