You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openwebbeans.apache.org by "Romain Manni-Bucau (JIRA)" <ji...@apache.org> on 2018/09/20 07:08:00 UTC
[jira] [Closed] (OWB-1258) Java 11 - Cannot get Unsafe.defineClass
[ https://issues.apache.org/jira/browse/OWB-1258?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Romain Manni-Bucau closed OWB-1258.
-----------------------------------
Resolution: Duplicate
Assignee: (was: Romain Manni-Bucau)
Fix Version/s: 2.0.7
> 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
> Priority: Major
> Fix For: 2.0.7
>
>
> 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)