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

window, openjdk 21 환경에서 startup.bat 스크립트 실행 시 에러가 발생합니다. #991

Open
engkimbs opened this issue Apr 7, 2024 · 1 comment

Comments

@engkimbs
Copy link

engkimbs commented Apr 7, 2024

window, openjdk 21 환경에서 startup.bat 스크립트 실행 시 에러가 발생합니다.

4월 07, 2024 9:39:44 오후 com.sun.xml.bind.v2.runtime.reflect.opt.Injector
SEVERE: null
java.security.PrivilegedActionException: java.lang.NoSuchMethodException: sun.misc.Unsafe.defineClass(java.lang.String,[B,int,int,java.lang.ClassLoader,java.security.ProtectionDomain)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:575)
at com.sun.xml.bind.v2.runtime.reflect.opt.Injector.(Injector.java:197)
at com.sun.xml.bind.v2.runtime.reflect.opt.AccessorInjector.prepare(AccessorInjector.java:81)
at com.sun.xml.bind.v2.runtime.reflect.opt.OptimizedAccessorFactory.get(OptimizedAccessorFactory.java:171)
at com.sun.xml.bind.v2.runtime.reflect.Accessor$FieldReflection.optimize(Accessor.java:285)
at com.sun.xml.bind.v2.runtime.property.SingleElementNodeProperty.(SingleElementNodeProperty.java:94)
at java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:62)
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:502)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:486)
at com.sun.xml.bind.v2.runtime.property.PropertyFactory.create(PropertyFactory.java:128)
at com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.(ClassBeanInfoImpl.java:181)
at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getOrCreate(JAXBContextImpl.java:514)
at com.sun.xml.bind.v2.runtime.JAXBContextImpl.(JAXBContextImpl.java:331)
at com.sun.xml.bind.v2.runtime.JAXBContextImpl.(JAXBContextImpl.java: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(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
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 scouter.server.Configure.(Configure.java:78)
at scouter.server.Logger$.(Logger.scala:153)
at scouter.server.Logger$.(Logger.scala)
at scouter.server.Logger.println(Logger.scala)
at scouter.server.Main.main(Main.java:42)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at scouter.boot.Boot.main(Boot.java:45)
Caused by: java.lang.NoSuchMethodException: sun.misc.Unsafe.defineClass(java.lang.String,[B,int,int,java.lang.ClassLoader,java.security.ProtectionDomain)
at java.base/java.lang.Class.getMethod(Class.java:2395)
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(AccessController.java:571)
... 30 more

java -cp ./boot.jar scouter.boot.Boot [./lib]
java.lang.NoClassDefFoundError: Could not initialize class scouter.server.Logger$
at scouter.server.Logger$$anonfun$1.apply$mcV$sp(Logger.scala:145)
at scouter.server.util.ThreadScala$$anon$1.run(ThreadScala.scala:12)
Caused by: java.lang.ExceptionInInitializerError: Exception java.lang.ExceptionInInitializerError [in thread "main"]
at scouter.server.Logger$.(Logger.scala:153)
at scouter.server.Logger$.(Logger.scala)
at scouter.server.Logger.println(Logger.scala)
at scouter.server.Main.main(Main.java:42)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at scouter.boot.Boot.main(Boot.java:45)
Exception in thread "main" java.lang.ExceptionInInitializerError
at scouter.server.Logger$.(Logger.scala:153)
at scouter.server.Logger$.(Logger.scala)
at scouter.server.Logger.println(Logger.scala)
at scouter.server.Main.main(Main.java:42)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at scouter.boot.Boot.main(Boot.java:45)
Caused by: java.lang.NullPointerException: Cannot invoke "java.lang.reflect.Method.invoke(Object, Object[])" because "com.sun.xml.bind.v2.runtime.reflect.opt.Injector.defineClass" 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(AccessorInjector.java:87)
at com.sun.xml.bind.v2.runtime.reflect.opt.OptimizedAccessorFactory.get(OptimizedAccessorFactory.java:171)
at com.sun.xml.bind.v2.runtime.property.SingleElementNodeProperty.(SingleElementNodeProperty.java:94)
at java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:62)
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:502)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:486)
at com.sun.xml.bind.v2.runtime.property.PropertyFactory.create(PropertyFactory.java:128)
at com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.(ClassBeanInfoImpl.java:181)
at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getOrCreate(JAXBContextImpl.java:514)
at com.sun.xml.bind.v2.runtime.JAXBContextImpl.(JAXBContextImpl.java:331)
at com.sun.xml.bind.v2.runtime.JAXBContextImpl.(JAXBContextImpl.java: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(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
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 scouter.server.Configure.(Configure.java:78)
... 7 more

어떻게 해결해야 할까요?

@lsb156
Copy link

lsb156 commented Sep 23, 2024

https://github.com/scouter-project/scouter/releases/tag/v2.20.0

  • --add-opens java.base/java.lang=ALL-UNNAMED --add-exports java.base/sun.net=ALL-UNNAMED 옵션 넣어서 실행해도 마찬가지인가요?

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

No branches or pull requests

2 participants