[jira] [Comment Edited] (SUREFIRE-1265) reuseForks=false fails on jdk-9-ea builds
[ https://issues.apache.org/jira/browse/SUREFIRE-1265?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15994592#comment-15994592 ] Enrico Olivelli edited comment on SUREFIRE-1265 at 5/3/17 11:33 AM: I'm really sorry Actually I have to use with Java8 to compile the whole suite mvn clean install -Dit.test=Surefire1265Java9IT Than in order to start the tests I have to use this command line: JAVA_HOME=~/dev/jdk-9 mvn verify -Dit.test=Surefire1265Java9IT but compilation fails {code} [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.5.1:testCompile (default-testCompile) on project surefire-1265: Compilation failure: Compilation failure: [ERROR] /home/diennea.lan/enrico.olivelli/dev/eolivelli/maven-surefire/surefire-integration-tests/target/Surefire1265Java9IT_shouldRunInPluginJava9/src/test/java/J9Test.java:[2,16] error: package javax.xml.ws is not visible [ERROR] (package javax.xml.ws is declared in module java.xml.ws, which is not in the module graph) [ERROR] /home/diennea.lan/enrico.olivelli/dev/eolivelli/maven-surefire/surefire-integration-tests/target/Surefire1265Java9IT_shouldRunInPluginJava9/src/test/java/J9Test.java:[18,17] error: package javax.xml.ws is not visible [ERROR] (package javax.xml.ws is declared in module java.xml.ws, which is not in the module graph) [ERROR] /home/diennea.lan/enrico.olivelli/dev/eolivelli/maven-surefire/surefire-integration-tests/target/Surefire1265Java9IT_shouldRunInPluginJava9/src/test/java/J9Test.java:[18,58] error: package javax.xml.ws is not visible [ERROR] -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.5.1:testCompile (default-testCompile) on project surefire-1265: Compilation failure {code} was (Author: eolivelli): I'm really sorry Acutally I have to use with Java8 to compile se ruite mvn clean install -Dit.test=Surefire1265Java9IT Than in order to kick the it tests in I have to use this: JAVA_HOME=~/dev/jdk-9 mvn verify -Dit.test=Surefire1265Java9IT but compilation fails {code} [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.5.1:testCompile (default-testCompile) on project surefire-1265: Compilation failure: Compilation failure: [ERROR] /home/diennea.lan/enrico.olivelli/dev/eolivelli/maven-surefire/surefire-integration-tests/target/Surefire1265Java9IT_shouldRunInPluginJava9/src/test/java/J9Test.java:[2,16] error: package javax.xml.ws is not visible [ERROR] (package javax.xml.ws is declared in module java.xml.ws, which is not in the module graph) [ERROR] /home/diennea.lan/enrico.olivelli/dev/eolivelli/maven-surefire/surefire-integration-tests/target/Surefire1265Java9IT_shouldRunInPluginJava9/src/test/java/J9Test.java:[18,17] error: package javax.xml.ws is not visible [ERROR] (package javax.xml.ws is declared in module java.xml.ws, which is not in the module graph) [ERROR] /home/diennea.lan/enrico.olivelli/dev/eolivelli/maven-surefire/surefire-integration-tests/target/Surefire1265Java9IT_shouldRunInPluginJava9/src/test/java/J9Test.java:[18,58] error: package javax.xml.ws is not visible [ERROR] -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.5.1:testCompile (default-testCompile) on project surefire-1265: Compilation failure {code} > reuseForks=false fails on jdk-9-ea builds > - > > Key: SUREFIRE-1265 > URL: https://issues.apache.org/jira/browse/SUREFIRE-1265 > Project: Maven Surefire > Issue Type: Bug > Components: Maven Surefire Plugin >Affects Versions: 2.19.1 >Reporter: Michael Musgrove >Assignee: Tibor Digana > Labels: jigsaw > Fix For: 2.20.1 > > Attachments: j9test.tar, Java9Example.zip > > > When I run any surefire test (with reuseForks=false) that uses java.sql > classes on recent jdk-9 ea builds it fails with: > [ERROR] Failed to execute goal > org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test (default-test) on > project maven-surefire-plugin-example: Execution default-test of goal > org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test failed: > java.lang.NoClassDefFoundError: java/sql/SQLException: java.sql.SQLException > -> [Help 1] > If I run it with reuseForks=true it works fine. > This problem was introduced in jdk build 9-ea+122 > (http://download.java.net/java/jdk9/changes/jdk-9+122.html) when the jigsaw > team addressed: > d20279be77d9 8154189 Deprivilege java.sql and java.sql.rowset module -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Comment Edited] (SUREFIRE-1265) reuseForks=false fails on jdk-9-ea builds
[ https://issues.apache.org/jira/browse/SUREFIRE-1265?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15994555#comment-15994555 ] Tibor Digana edited comment on SUREFIRE-1265 at 5/3/17 9:33 AM: [~eolivelli] You can use {{it.test}} property or replace **IT** with {{Surefire1265Java9IT}} in {{surefire-integration-tests/pom.xml}}. was (Author: tibor17): [~eolivelli] You can use {{it.test}} property or replace *IT* with {{Surefire1265Java9IT}} in {{surefire-integration-tests/pom.xml}}. > reuseForks=false fails on jdk-9-ea builds > - > > Key: SUREFIRE-1265 > URL: https://issues.apache.org/jira/browse/SUREFIRE-1265 > Project: Maven Surefire > Issue Type: Bug > Components: Maven Surefire Plugin >Affects Versions: 2.19.1 >Reporter: Michael Musgrove >Assignee: Tibor Digana > Labels: jigsaw > Fix For: 2.20.1 > > Attachments: j9test.tar, Java9Example.zip > > > When I run any surefire test (with reuseForks=false) that uses java.sql > classes on recent jdk-9 ea builds it fails with: > [ERROR] Failed to execute goal > org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test (default-test) on > project maven-surefire-plugin-example: Execution default-test of goal > org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test failed: > java.lang.NoClassDefFoundError: java/sql/SQLException: java.sql.SQLException > -> [Help 1] > If I run it with reuseForks=true it works fine. > This problem was introduced in jdk build 9-ea+122 > (http://download.java.net/java/jdk9/changes/jdk-9+122.html) when the jigsaw > team addressed: > d20279be77d9 8154189 Deprivilege java.sql and java.sql.rowset module -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Comment Edited] (SUREFIRE-1265) reuseForks=false fails on jdk-9-ea builds
[ https://issues.apache.org/jira/browse/SUREFIRE-1265?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15994555#comment-15994555 ] Tibor Digana edited comment on SUREFIRE-1265 at 5/3/17 9:33 AM: [~eolivelli] You can use {{it.test}} property or replace *IT* with {{Surefire1265Java9IT}} in {{surefire-integration-tests/pom.xml}}. was (Author: tibor17): [~eolivelli] You can use {{it.test}} property or replace {{*IT*}} with {{Surefire1265Java9IT}} in {{surefire-integration-tests/pom.xml}}. > reuseForks=false fails on jdk-9-ea builds > - > > Key: SUREFIRE-1265 > URL: https://issues.apache.org/jira/browse/SUREFIRE-1265 > Project: Maven Surefire > Issue Type: Bug > Components: Maven Surefire Plugin >Affects Versions: 2.19.1 >Reporter: Michael Musgrove >Assignee: Tibor Digana > Labels: jigsaw > Fix For: 2.20.1 > > Attachments: j9test.tar, Java9Example.zip > > > When I run any surefire test (with reuseForks=false) that uses java.sql > classes on recent jdk-9 ea builds it fails with: > [ERROR] Failed to execute goal > org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test (default-test) on > project maven-surefire-plugin-example: Execution default-test of goal > org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test failed: > java.lang.NoClassDefFoundError: java/sql/SQLException: java.sql.SQLException > -> [Help 1] > If I run it with reuseForks=true it works fine. > This problem was introduced in jdk build 9-ea+122 > (http://download.java.net/java/jdk9/changes/jdk-9+122.html) when the jigsaw > team addressed: > d20279be77d9 8154189 Deprivilege java.sql and java.sql.rowset module -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Comment Edited] (SUREFIRE-1265) reuseForks=false fails on jdk-9-ea builds
[ https://issues.apache.org/jira/browse/SUREFIRE-1265?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15994545#comment-15994545 ] Tibor Digana edited comment on SUREFIRE-1265 at 5/3/17 9:29 AM: [~rfscholte] Should we put {{module-info.class}} in to the jar file or artifact which uses {{IsolatedClassLoader}}? Unfortunately this would be {{surefire-booter}}. The ideal situation would be to have it in plugin's jar only and export all modules in {{module-info.java}}: module surefire.xyz { java.activation, java.xml.bind, java.xml.ws,jdk.xml.bind } Should it be imported, or optional? The whole problem is that isloated CL is used in plugin and ClassLoader does not have any API call to extend the PlatformClassLoader with all JDK modules. These modules would be nice to have as optional, means if the classes (tests) in CL need to load them on the fly. What can we do about this? was (Author: tibor17): [~rfscholte] Should be put {{module-info.class}} in to the jar file or artifact which uses {{IsolatedClassLoader}}? Unfortunately this would be {{surefire-booter}}. The ideal situation would be to have it in plugin's jar only and export all modules in {{module-info.java}}: module surefire.xyz { java.activation, java.xml.bind, java.xml.ws,jdk.xml.bind } Should it be imported, or optional? The whole problem is that isloated CL is used in plugin and ClassLoader does not have any API call to extend the PlatformClassLoader with all JDK modules. These modules would be nice to have as optional, means if the classes (tests) in CL need to load them on the fly. What can we do about this? > reuseForks=false fails on jdk-9-ea builds > - > > Key: SUREFIRE-1265 > URL: https://issues.apache.org/jira/browse/SUREFIRE-1265 > Project: Maven Surefire > Issue Type: Bug > Components: Maven Surefire Plugin >Affects Versions: 2.19.1 >Reporter: Michael Musgrove >Assignee: Tibor Digana > Labels: jigsaw > Fix For: 2.20.1 > > Attachments: j9test.tar, Java9Example.zip > > > When I run any surefire test (with reuseForks=false) that uses java.sql > classes on recent jdk-9 ea builds it fails with: > [ERROR] Failed to execute goal > org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test (default-test) on > project maven-surefire-plugin-example: Execution default-test of goal > org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test failed: > java.lang.NoClassDefFoundError: java/sql/SQLException: java.sql.SQLException > -> [Help 1] > If I run it with reuseForks=true it works fine. > This problem was introduced in jdk build 9-ea+122 > (http://download.java.net/java/jdk9/changes/jdk-9+122.html) when the jigsaw > team addressed: > d20279be77d9 8154189 Deprivilege java.sql and java.sql.rowset module -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Comment Edited] (SUREFIRE-1265) reuseForks=false fails on jdk-9-ea builds
[ https://issues.apache.org/jira/browse/SUREFIRE-1265?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15621800#comment-15621800 ] Tibor Digana edited comment on SUREFIRE-1265 at 10/31/16 10:17 AM: --- [~mmusgrov] [~zhfeng] I absolutely do not understand these jdk9 switches {{upgrade-module-path}}, {{add-exports}}, {{add-modules}}. Although need to know from you guys correct concept in Surefire, what's going on, why and what we can do about it. was (Author: tibor17): [~mmusgrov] [~zhfeng] I absolutely do not understand these jdk9 switches {{--upgrade-module-path}}, {{--add-exports}}, {{--add-modules}}. Although need to know from you guys correct concept in Surefire, what's going on, why and what we can do about it. > reuseForks=false fails on jdk-9-ea builds > - > > Key: SUREFIRE-1265 > URL: https://issues.apache.org/jira/browse/SUREFIRE-1265 > Project: Maven Surefire > Issue Type: Bug > Components: Maven Surefire Plugin >Affects Versions: 2.19.1 >Reporter: Michael Musgrove >Assignee: Tibor Digana > Labels: jigsaw > Attachments: j9test.tar > > > When I run any surefire test (with reuseForks=false) that uses java.sql > classes on recent jdk-9 ea builds it fails with: > [ERROR] Failed to execute goal > org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test (default-test) on > project maven-surefire-plugin-example: Execution default-test of goal > org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test failed: > java.lang.NoClassDefFoundError: java/sql/SQLException: java.sql.SQLException > -> [Help 1] > If I run it with reuseForks=true it works fine. > This problem was introduced in jdk build 9-ea+122 > (http://download.java.net/java/jdk9/changes/jdk-9+122.html) when the jigsaw > team addressed: > d20279be77d9 8154189 Deprivilege java.sql and java.sql.rowset module -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Comment Edited] (SUREFIRE-1265) reuseForks=false fails on jdk-9-ea builds
[ https://issues.apache.org/jira/browse/SUREFIRE-1265?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15446036#comment-15446036 ] Michael Musgrove edited comment on SUREFIRE-1265 at 8/29/16 2:36 PM: - OK agreed. I am still seeing the issue with the java.corba module which is where I first hit this issue. The attached reproducer (it replaces the previous one and adds an extra test which imports one of the classes in the java.corba module) shows the problem: bq. mvn clean test -DreuseForks=false -DchildDelegation=false fails with NoClassDefFoundError: java/sql/SQLException bq. mvn clean test -DreuseForks=false -DchildDelegation=true fails with NoClassDefFoundError: org/omg/CORBA/BAD_INV_ORDER bq. mvn clean test -DreuseForks=true -DchildDelegation=both tests pass was (Author: mmusgrov): OK agreed. I am still seeing the issue with the java.corba module which is where I first hit this issue. The attached reproducer shows the problem: bq. mvn clean test -DreuseForks=false -DchildDelegation=false fails with NoClassDefFoundError: java/sql/SQLException bq. mvn clean test -DreuseForks=false -DchildDelegation=true fails with NoClassDefFoundError: org/omg/CORBA/BAD_INV_ORDER bq. mvn clean test -DreuseForks=true -DchildDelegation= both tests pass > reuseForks=false fails on jdk-9-ea builds > - > > Key: SUREFIRE-1265 > URL: https://issues.apache.org/jira/browse/SUREFIRE-1265 > Project: Maven Surefire > Issue Type: Bug > Components: Maven Surefire Plugin >Affects Versions: 2.19.1 >Reporter: Michael Musgrove >Assignee: Tibor Digana > Labels: jigsaw > Attachments: j9test.tar > > > When I run any surefire test (with reuseForks=false) that uses java.sql > classes on recent jdk-9 ea builds it fails with: > [ERROR] Failed to execute goal > org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test (default-test) on > project maven-surefire-plugin-example: Execution default-test of goal > org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test failed: > java.lang.NoClassDefFoundError: java/sql/SQLException: java.sql.SQLException > -> [Help 1] > If I run it with reuseForks=true it works fine. > This problem was introduced in jdk build 9-ea+122 > (http://download.java.net/java/jdk9/changes/jdk-9+122.html) when the jigsaw > team addressed: > d20279be77d9 8154189 Deprivilege java.sql and java.sql.rowset module -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Comment Edited] (SUREFIRE-1265) reuseForks=false fails on jdk-9-ea builds
[ https://issues.apache.org/jira/browse/SUREFIRE-1265?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15430553#comment-15430553 ] Tibor Digana edited comment on SUREFIRE-1265 at 8/22/16 11:10 AM: -- [~mmusgrov] I have to remove the milestone 2.19.2 from this issue because of this misunderstanding. I think the surefire concept regarding {{getSuitesIterator()}} should change but not now since we do not have much time. I last time made big change which introduced communication between java processes using commands and this has emitted issue {{SUREFIRE-1255}}. So I don't want to go straight ahead with another big change in parallel. First of all I want to fix {{SUREFIRE-1255}} and mark surefire as stable a then I would change the concept of {{getSuitesIterator()}}. The problem is that this method operates with classes and the reason we are doing so is that we are filtering out classes which are not real JUnit test classes. IMHO this mechanism should be part of {{SurefireProvider}} and the main process should only filter classes on file-name level. And then we need to somehow differentiate between class which is not really annotated as test and filtered tests using {{org.junit.runner.manipulation.Filter}} because even if both result in zero tests the behavior might be different. I think we should send some command to the main process saying that this class is not a test and don't report it. To reach the goal we would need to have the commands and fully stable, which means again no reason to continue with this issue unless commands are fully working on Mac. There is another problem which needs to be solved - {{RunListener}} which is not stable and reported last time in two tickets. was (Author: tibor17): [~mmusgrov] I have to remove the milestone 2.19.2 from this issue because of this misunderstanding. I think the surefire concept regarding {{getSuitesIterator()}} should change but not now since we do not have much time. I last time made big change which introduced communication between java processes using commands and this has emitted issue {{SUREFIRE-1255}}. So I don't want to go straight ahead with another big change in parallel. First of all I want to fix {{SUREFIRE-1255}} and mark surefire as stable a then I would change the concept of {{getSuitesIterator()}}. The problem is that this method operates with classes and the reason we are doing so is that we are filtering out classes which are not real JUnit test classes. IMHO this mechanism should be part of {{SurefireProvider}} and the main process should only filter classes on file-name level. And then we need to somehow differentiate between class which is not really annotated as test and filtered tests using {{org.junit.runner.manipulation.Filter}} because even if both result in zero tests the behavior might be different. To reach the goal we would need to have the commands and fully stable, which means again no reason to continue with this issue unless commands are fully working on Mac. > reuseForks=false fails on jdk-9-ea builds > - > > Key: SUREFIRE-1265 > URL: https://issues.apache.org/jira/browse/SUREFIRE-1265 > Project: Maven Surefire > Issue Type: Bug > Components: Maven Surefire Plugin >Affects Versions: 2.19.1 >Reporter: Michael Musgrove >Assignee: Tibor Digana > Labels: jigsaw > Attachments: j9test.tar > > > When I run any surefire test (with reuseForks=false) that uses java.sql > classes on recent jdk-9 ea builds it fails with: > [ERROR] Failed to execute goal > org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test (default-test) on > project maven-surefire-plugin-example: Execution default-test of goal > org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test failed: > java.lang.NoClassDefFoundError: java/sql/SQLException: java.sql.SQLException > -> [Help 1] > If I run it with reuseForks=true it works fine. > This problem was introduced in jdk build 9-ea+122 > (http://download.java.net/java/jdk9/changes/jdk-9+122.html) when the jigsaw > team addressed: > d20279be77d9 8154189 Deprivilege java.sql and java.sql.rowset module -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Comment Edited] (SUREFIRE-1265) reuseForks=false fails on jdk-9-ea builds
[ https://issues.apache.org/jira/browse/SUREFIRE-1265?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15395962#comment-15395962 ] Robert Scholte edited comment on SUREFIRE-1265 at 7/27/16 4:47 PM: --- {noformat} Caused by: java.lang.ClassNotFoundException: java.sql.SQLException at java.net.URLClassLoader.findClass(java.base@9-ea/URLClassLoader.java:384) at java.lang.ClassLoader.loadClass(java.base@9-ea/ClassLoader.java:486) at java.lang.ClassLoader.loadClass(java.base@9-ea/ClassLoader.java:419) at org.apache.maven.surefire.booter.IsolatedClassLoader.loadClass(IsolatedClassLoader.java:97) ... 49 more {noformat} A quick view suggest that you can't find this class anymore via {{ClassLoader.getSystemClassLoader();}} Additional info: http://cr.openjdk.java.net/~mr/jigsaw/spec/api/java/lang/ClassLoader.html was (Author: rfscholte): {noformat} Caused by: java.lang.ClassNotFoundException: java.sql.SQLException at java.net.URLClassLoader.findClass(java.base@9-ea/URLClassLoader.java:384) at java.lang.ClassLoader.loadClass(java.base@9-ea/ClassLoader.java:486) at java.lang.ClassLoader.loadClass(java.base@9-ea/ClassLoader.java:419) at org.apache.maven.surefire.booter.IsolatedClassLoader.loadClass(IsolatedClassLoader.java:97) ... 49 more {noformat} A quick view suggest that you can't find this class anymore via {{ ClassLoader.getSystemClassLoader(); }} > reuseForks=false fails on jdk-9-ea builds > - > > Key: SUREFIRE-1265 > URL: https://issues.apache.org/jira/browse/SUREFIRE-1265 > Project: Maven Surefire > Issue Type: Bug > Components: Maven Surefire Plugin >Affects Versions: 2.19.1 >Reporter: Michael Musgrove > Labels: jigsaw > Attachments: j9test.tar > > > When I run any surefire test (with reuseForks=false) that uses java.sql > classes on recent jdk-9 ea builds it fails with: > [ERROR] Failed to execute goal > org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test (default-test) on > project maven-surefire-plugin-example: Execution default-test of goal > org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test failed: > java.lang.NoClassDefFoundError: java/sql/SQLException: java.sql.SQLException > -> [Help 1] > If I run it with reuseForks=true it works fine. > This problem was introduced in jdk build 9-ea+122 > (http://download.java.net/java/jdk9/changes/jdk-9+122.html) when the jigsaw > team addressed: > d20279be77d9 8154189 Deprivilege java.sql and java.sql.rowset module -- This message was sent by Atlassian JIRA (v6.3.4#6332)