Teimatini Marin created OWB-1258:
------------------------------------

             Summary: Java 11 - Cannot get Unsafe.defineClass
                 Key: OWB-1258
                 URL: https://issues.apache.org/jira/browse/OWB-1258
             Project: OpenWebBeans
          Issue Type: Bug
    Affects Versions: 2.0.5
            Reporter: Teimatini Marin


While trying to start a container in Java 11, as the 
sun.misc.Unsafe.defineClass has been terminally deprecated (forRemoval=true), 
the following exception is thrown:

Exception in thread "main" java.lang.IllegalStateException: Cannot get 
Unsafe.defineClass
 at 
org.apache.webbeans.proxy.AbstractProxyFactory$4.run(AbstractProxyFactory.java:814)
 at 
org.apache.webbeans.proxy.AbstractProxyFactory$4.run(AbstractProxyFactory.java:803)
 at java.base/java.security.AccessController.doPrivileged(Native Method)
 at 
org.apache.webbeans.proxy.AbstractProxyFactory.initializeUnsafe(AbstractProxyFactory.java:802)
 at 
org.apache.webbeans.proxy.AbstractProxyFactory.<init>(AbstractProxyFactory.java:93)
 at 
org.apache.webbeans.proxy.InterceptorDecoratorProxyFactory.<init>(InterceptorDecoratorProxyFactory.java:80)
 at org.apache.webbeans.config.WebBeansContext.<init>(WebBeansContext.java:157)
 at org.apache.webbeans.config.WebBeansContext.<init>(WebBeansContext.java:119)
 at org.apache.openwebbeans.se.OWBInitializer.initialize(OWBInitializer.java:86)
 at 
org.apache.openwebbeans.se.SeInitializerFacade.initialize(SeInitializerFacade.java:137)
 at com.beuwa.redwine.sensor.Main.main(Main.java:20)
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.getDeclaredMethod(Class.java:2476)
 at 
org.apache.webbeans.proxy.AbstractProxyFactory$4.run(AbstractProxyFactory.java:809)
 ... 10 more



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to