<div dir="ltr"><div>This is one of known issues, see for details:<br><a href="http://openjdk.java.net/projects/jigsaw/spec/issues/#module-graphs">http://openjdk.java.net/projects/jigsaw/spec/issues/#module-graphs</a><br><a href="http://openjdk.java.net/projects/jigsaw/spec/issues/#ClassFilesAsResources">http://openjdk.java.net/projects/jigsaw/spec/issues/#ClassFilesAsResources</a><br><a href="http://openjdk.java.net/projects/jigsaw/spec/issues/#PlatformClassLoader">http://openjdk.java.net/projects/jigsaw/spec/issues/#PlatformClassLoader</a><br><br></div><div>Some of this is being addressed as part upcoming jigsaw b126<br></div><div><br>--<br></div>tomaz<br><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jul 11, 2016 at 10:36 AM, Scott Stark <span dir="ltr">&lt;<a href="mailto:sstark@redhat.com" target="_blank">sstark@redhat.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">So the problem is a change in behavior of a URLClassLoader that has a null parent class loader. This seems like it is a big compatibility problem as classes defined by such a class loader only have visibility into the java.base module rather than the entire platform.<br>
<br>
The simple fix is to pass in the new ClassLoader.getPlatformClassLoader() as the URLClassLoader parent rather than null. However, this seems like what the ClassLoader should be doing itself as I would expect a lot of code will break. I&#39;ll create a bug report for the simple test case I have that shows the problem.<br>
<div class="HOEnZb"><div class="h5"><br>
----- Original Message -----<br>
From: &quot;Scott Stark&quot; &lt;<a href="mailto:sstark@redhat.com">sstark@redhat.com</a>&gt;<br>
To: <a href="mailto:wildfly-dev@lists.jboss.org">wildfly-dev@lists.jboss.org</a><br>
Sent: Monday, July 11, 2016 12:15:32 AM<br>
Subject: [wildfly-dev] common cdi-tck problem on wildfly with java 9<br>
<br>
I&#39;m looking into why the cdi-tck is failing to run on wildfly-10.1.0.Final-SNAPSHOT using java 9 and a common issue that I don&#39;t see in the Java 9 Problems &amp; Solutions FAQ is illustrated by the following exception trace. It appears that the class loader that org.arquillian.container.chameleon.ContainerLoader is using is associated with the java.base module, and thus cannot see anything but the java.base classes. Once I figure out how the class loader for java.base is being obtained I&#39;ll raise a general FAQ for the problems/solutions doc, but I thought I might be able to work around this by using the -XaddReads:java.sql=java.base to allow java.base to see java.sql, but it does not work. Similarly, -XaddExports:java.sql/java.sql=java.base does not work.<br>
<br>
Is there a check to prevent circular references or am I just not understanding how these calls change the module graph?<br>
<br>
Tests run: 4, Failures: 1, Errors: 0, Skipped: 3, Time elapsed: 1.121 sec &lt;&lt;&lt; FAILURE!<br>
arquillianBeforeSuite(org.jboss.arq_wf_test.CDITest)  Time elapsed: 0.63 sec  &lt;&lt;&lt; FAILURE!<br>
java.lang.NoClassDefFoundError: java/sql/Date<br>
        at org.yaml.snakeyaml.nodes.Tag.&lt;clinit&gt;(Tag.java:64)<br>
        at org.yaml.snakeyaml.constructor.SafeConstructor.&lt;init&gt;(SafeConstructor.java:52)<br>
        at org.yaml.snakeyaml.constructor.Constructor.&lt;init&gt;(Constructor.java:77)<br>
        at org.yaml.snakeyaml.constructor.Constructor.&lt;init&gt;(Constructor.java:64)<br>
        at org.yaml.snakeyaml.constructor.Constructor.&lt;init&gt;(Constructor.java:54)<br>
        at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(java.base@9-ea/Native Method)<br>
        at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(java.base@9-ea/NativeConstructorAccessorImpl.java:62)<br>
        at jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(java.base@9-ea/DelegatingConstructorAccessorImpl.java:45)<br>
        at java.lang.reflect.Constructor.newInstance(java.base@9-ea/Constructor.java:453)<br>
        at java.lang.Class.newInstance(java.base@9-ea/Class.java:569)<br>
        at org.arquillian.container.chameleon.ContainerLoader.loadContainers(ContainerLoader.java:71)<br>
        at org.arquillian.container.chameleon.ContainerLoader.load(ContainerLoader.java:45)<br>
        at org.arquillian.container.chameleon.ChameleonConfiguration.getConfiguredAdapter(ChameleonConfiguration.java:117)<br>
        at org.arquillian.container.chameleon.ChameleonContainer.init(ChameleonContainer.java:81)<br>
        at org.arquillian.container.chameleon.InitiateContainer.initiateChameleon(InitiateContainer.java:70)<br>
        at org.arquillian.container.chameleon.InitiateContainer.setup(InitiateContainer.java:39)<br>
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(java.base@9-ea/Native Method)<br>
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(java.base@9-ea/NativeMethodAccessorImpl.java:62)<br>
        at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(java.base@9-ea/DelegatingMethodAccessorImpl.java:43)<br>
        at java.lang.reflect.Method.invoke(java.base@9-ea/Method.java:533)<br>
        at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)<br>
        at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)<br>
        at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:145)<br>
        at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:116)<br>
        at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67)<br>
        at org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController$1.perform(ContainerLifecycleController.java:62)<br>
        at org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController$1.perform(ContainerLifecycleController.java:55)<br>
        at org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController.forEachContainer(ContainerLifecycleController.java:209)<br>
        at org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController.setupContainers(ContainerLifecycleController.java:54)<br>
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(java.base@9-ea/Native Method)<br>
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(java.base@9-ea/NativeMethodAccessorImpl.java:62)<br>
        at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(java.base@9-ea/DelegatingMethodAccessorImpl.java:43)<br>
        at java.lang.reflect.Method.invoke(java.base@9-ea/Method.java:533)<br>
        at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)<br>
        at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)<br>
        at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)<br>
        at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:145)<br>
        at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:116)<br>
        at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67)<br>
        at org.jboss.arquillian.container.test.impl.client.ContainerEventController.execute(ContainerEventController.java:85)<br>
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(java.base@9-ea/Native Method)<br>
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(java.base@9-ea/NativeMethodAccessorImpl.java:62)<br>
        at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(java.base@9-ea/DelegatingMethodAccessorImpl.java:43)<br>
        at java.lang.reflect.Method.invoke(java.base@9-ea/Method.java:533)<br>
        at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)<br>
        at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)<br>
        at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)<br>
        at org.jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:73)<br>
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(java.base@9-ea/Native Method)<br>
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(java.base@9-ea/NativeMethodAccessorImpl.java:62)<br>
        at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(java.base@9-ea/DelegatingMethodAccessorImpl.java:43)<br>
        at java.lang.reflect.Method.invoke(java.base@9-ea/Method.java:533)<br>
        at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)<br>
        at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)<br>
        at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:145)<br>
        at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:116)<br>
        at org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.beforeSuite(EventTestRunnerAdaptor.java:75)<br>
        at org.jboss.arquillian.testng.Arquillian.arquillianBeforeSuite(Arquillian.java:71)<br>
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(java.base@9-ea/Native Method)<br>
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(java.base@9-ea/NativeMethodAccessorImpl.java:62)<br>
        at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(java.base@9-ea/DelegatingMethodAccessorImpl.java:43)<br>
        at java.lang.reflect.Method.invoke(java.base@9-ea/Method.java:533)<br>
        at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:86)<br>
        at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:514)<br>
        at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:215)<br>
        at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:142)<br>
        at org.testng.SuiteRunner.privateRun(SuiteRunner.java:305)<br>
        at org.testng.SuiteRunner.run(SuiteRunner.java:268)<br>
        at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)<br>
        at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)<br>
        at org.testng.TestNG.runSuitesSequentially(TestNG.java:1244)<br>
        at org.testng.TestNG.runSuitesLocally(TestNG.java:1169)<br>
        at org.testng.TestNG.run(TestNG.java:1064)<br>
        at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:77)<br>
        at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.execute(TestNGDirectoryTestSuite.java:110)<br>
        at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:106)<br>
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(java.base@9-ea/Native Method)<br>
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(java.base@9-ea/NativeMethodAccessorImpl.java:62)<br>
        at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(java.base@9-ea/DelegatingMethodAccessorImpl.java:43)<br>
        at java.lang.reflect.Method.invoke(java.base@9-ea/Method.java:533)<br>
        at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)<br>
        at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)<br>
        at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)<br>
        at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)<br>
        at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)<br>
Caused by: java.lang.ClassNotFoundException: java.sql.Date<br>
        at java.net.URLClassLoader.findClass(java.base@9-ea/URLClassLoader.java:384)<br>
        at java.lang.ClassLoader.loadClass(java.base@9-ea/ClassLoader.java:486)<br>
        at java.lang.ClassLoader.loadClass(java.base@9-ea/ClassLoader.java:419)<br>
        ... 85 more<br>
<br>
_______________________________________________<br>
wildfly-dev mailing list<br>
<a href="mailto:wildfly-dev@lists.jboss.org">wildfly-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/wildfly-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/wildfly-dev</a><br>
_______________________________________________<br>
wildfly-dev mailing list<br>
<a href="mailto:wildfly-dev@lists.jboss.org">wildfly-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/wildfly-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/wildfly-dev</a><br>
</div></div></blockquote></div><br></div>