[JBoss JIRA] (WFLY-11406) Reflection exception at org.jboss.classfilewriter.ClassFile on JDK12
by Richard Opalka (Jira)
[ https://issues.jboss.org/browse/WFLY-11406?page=com.atlassian.jira.plugin... ]
Richard Opalka commented on WFLY-11406:
---------------------------------------
Proper solution to workaround these new enforcements should be
usage of Agent API (java.lang.instrument) like byteman project does it.
> Reflection exception at org.jboss.classfilewriter.ClassFile on JDK12
> --------------------------------------------------------------------
>
> Key: WFLY-11406
> URL: https://issues.jboss.org/browse/WFLY-11406
> Project: WildFly
> Issue Type: Bug
> Components: Server
> Reporter: Richard Opalka
> Assignee: Stuart Douglas
> Priority: Critical
> Labels: jdk12
> Fix For: 16.0.0.Beta1
>
>
> When running WildFly on JDK12 I'm observing this exception due to Unsafe changes in recent JDK Early Access builds:
> [0m[31m16:47:17,739 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-6) MSC000001: Failed to start service jboss.deployment.unit."ws-endpoint-example.war".IN
> <------>at org.jboss.as.server@7.0.0.CR1-SNAPSHOT//org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:151)
> <------>at org.jboss.msc@1.4.5.Final//org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1738)
> <------>at org.jboss.msc@1.4.5.Final//org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1700)
> <------>at org.jboss.msc@1.4.5.Final//org.jboss.msc.service.ServiceControllerImpl$ControllerTask.run(ServiceControllerImpl.java:1558)
> <------>at org.jboss.threads@2.3.2.Final//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
> <------>at org.jboss.threads@2.3.2.Final//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1985)
> <------>at org.jboss.threads@2.3.2.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1487)
> <------>at org.jboss.threads@2.3.2.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1378)
> <------>at java.base/java.lang.Thread.run(Thread.java:835)
> Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: WFLYEE0024: Could not configure component TestService
> <------>at org.jboss.as.ee@15.0.0.CR1-SNAPSHOT//org.jboss.as.ee.component.deployers.EEModuleConfigurationProcessor.deploy(EEModuleConfigurationProcessor.java:106)
> <------>at org.jboss.as.server@7.0.0.CR1-SNAPSHOT//org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:144)
> <------>... 8 more
> Caused by: java.lang.Error: java.lang.NoSuchFieldException: override
> <------>at org.jboss.classfilewriter@1.2.3.Final//org.jboss.classfilewriter.ClassFile$1.run(ClassFile.java:394)
> <------>at org.jboss.classfilewriter@1.2.3.Final//org.jboss.classfilewriter.ClassFile$1.run(ClassFile.java:385)
> <------>at java.base/java.security.AccessController.doPrivileged(AccessController.java:551)
> <------>at org.jboss.classfilewriter(a)1.2.3.Final//org.jboss.classfilewriter.ClassFile.<clinit>(ClassFile.java:385)
> <------>at org.jboss.invocation(a)1.5.1.Final//org.jboss.invocation.proxy.AbstractClassFactory.<init>(AbstractClassFactory.java:97)
> <------>at org.jboss.invocation(a)1.5.1.Final//org.jboss.invocation.proxy.AbstractSubclassFactory.<init>(AbstractSubclassFactory.java:87)
> <------>at org.jboss.invocation(a)1.5.1.Final//org.jboss.invocation.proxy.AbstractProxyFactory.<init>(AbstractProxyFactory.java:69)
> <------>at org.jboss.invocation(a)1.5.1.Final//org.jboss.invocation.proxy.ProxyFactory.<init>(ProxyFactory.java:256)
> <------>at org.jboss.as.ee@15.0.0.CR1-SNAPSHOT//org.jboss.as.ee.component.DefaultComponentViewConfigurator.configure(DefaultComponentViewConfigurator.java:86)
> <------>at org.jboss.as.ee@15.0.0.CR1-SNAPSHOT//org.jboss.as.ee.component.deployers.EEModuleConfigurationProcessor.deploy(EEModuleConfigurationProcessor.java:92)
> <------>... 9 more
> Caused by: java.lang.NoSuchFieldException: override
> <------>at java.base/java.lang.Class.getDeclaredField(Class.java:2410)
> <------>at org.jboss.classfilewriter@1.2.3.Final//org.jboss.classfilewriter.ClassFile$1.run(ClassFile.java:392)
> <------>... 18 more
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
5 years, 5 months
[JBoss JIRA] (WFLY-11406) Reflection exception at org.jboss.classfilewriter.ClassFile on JDK12
by Richard Opalka (Jira)
[ https://issues.jboss.org/browse/WFLY-11406?page=com.atlassian.jira.plugin... ]
Richard Opalka edited comment on WFLY-11406 at 12/4/18 3:13 AM:
----------------------------------------------------------------
After bisecting openjdk code base I identified this commit which introduced this new JDK behaviour:
https://github.com/openjdk/jdk/commit/3f0daceac06ec44186130874401a99378d0...
Since this commit it is impossible to:
A) Reflectively access fields and methods of:
* Reflection.class
* AccessibleObject.class
* ClassLoader.class
* Constructor.class
* Field.class
* Method.class
B) reflectively access fields
* Class.class -> "classLoader"
* System.class -> "security"
was (Author: ropalka):
After bisecting openjdk code base I identified this commit which introduced this new JDK behaviour:
https://github.com/openjdk/jdk/commit/3f0daceac06ec44186130874401a99378d0...
Since this commit it is impossible to:
A) Reflectively access fields and methods of:
* Reflection.class
* AccessibleObject.class
* ClassLoader.class
* Constructor.class
* Field.class
* Method.class
B) reflectively access fields
* Class.class -> "classLoader"
* System.class -> "security"
> Reflection exception at org.jboss.classfilewriter.ClassFile on JDK12
> --------------------------------------------------------------------
>
> Key: WFLY-11406
> URL: https://issues.jboss.org/browse/WFLY-11406
> Project: WildFly
> Issue Type: Bug
> Components: Server
> Reporter: Richard Opalka
> Assignee: Stuart Douglas
> Priority: Critical
> Labels: jdk12
> Fix For: 16.0.0.Beta1
>
>
> When running WildFly on JDK12 I'm observing this exception due to Unsafe changes in recent JDK Early Access builds:
> &#27;[0m&#27;[31m16:47:17,739 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-6) MSC000001: Failed to start service jboss.deployment.unit."ws-endpoint-example.war".IN
> <------>at org.jboss.as.server@7.0.0.CR1-SNAPSHOT//org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:151)
> <------>at org.jboss.msc@1.4.5.Final//org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1738)
> <------>at org.jboss.msc@1.4.5.Final//org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1700)
> <------>at org.jboss.msc@1.4.5.Final//org.jboss.msc.service.ServiceControllerImpl$ControllerTask.run(ServiceControllerImpl.java:1558)
> <------>at org.jboss.threads@2.3.2.Final//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
> <------>at org.jboss.threads@2.3.2.Final//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1985)
> <------>at org.jboss.threads@2.3.2.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1487)
> <------>at org.jboss.threads@2.3.2.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1378)
> <------>at java.base/java.lang.Thread.run(Thread.java:835)
> Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: WFLYEE0024: Could not configure component TestService
> <------>at org.jboss.as.ee@15.0.0.CR1-SNAPSHOT//org.jboss.as.ee.component.deployers.EEModuleConfigurationProcessor.deploy(EEModuleConfigurationProcessor.java:106)
> <------>at org.jboss.as.server@7.0.0.CR1-SNAPSHOT//org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:144)
> <------>... 8 more
> Caused by: java.lang.Error: java.lang.NoSuchFieldException: override
> <------>at org.jboss.classfilewriter@1.2.3.Final//org.jboss.classfilewriter.ClassFile$1.run(ClassFile.java:394)
> <------>at org.jboss.classfilewriter@1.2.3.Final//org.jboss.classfilewriter.ClassFile$1.run(ClassFile.java:385)
> <------>at java.base/java.security.AccessController.doPrivileged(AccessController.java:551)
> <------>at org.jboss.classfilewriter(a)1.2.3.Final//org.jboss.classfilewriter.ClassFile.<clinit>(ClassFile.java:385)
> <------>at org.jboss.invocation(a)1.5.1.Final//org.jboss.invocation.proxy.AbstractClassFactory.<init>(AbstractClassFactory.java:97)
> <------>at org.jboss.invocation(a)1.5.1.Final//org.jboss.invocation.proxy.AbstractSubclassFactory.<init>(AbstractSubclassFactory.java:87)
> <------>at org.jboss.invocation(a)1.5.1.Final//org.jboss.invocation.proxy.AbstractProxyFactory.<init>(AbstractProxyFactory.java:69)
> <------>at org.jboss.invocation(a)1.5.1.Final//org.jboss.invocation.proxy.ProxyFactory.<init>(ProxyFactory.java:256)
> <------>at org.jboss.as.ee@15.0.0.CR1-SNAPSHOT//org.jboss.as.ee.component.DefaultComponentViewConfigurator.configure(DefaultComponentViewConfigurator.java:86)
> <------>at org.jboss.as.ee@15.0.0.CR1-SNAPSHOT//org.jboss.as.ee.component.deployers.EEModuleConfigurationProcessor.deploy(EEModuleConfigurationProcessor.java:92)
> <------>... 9 more
> Caused by: java.lang.NoSuchFieldException: override
> <------>at java.base/java.lang.Class.getDeclaredField(Class.java:2410)
> <------>at org.jboss.classfilewriter@1.2.3.Final//org.jboss.classfilewriter.ClassFile$1.run(ClassFile.java:392)
> <------>... 18 more
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
5 years, 5 months