You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Michael Musgrove (JIRA)" <ji...@apache.org> on 2016/08/01 16:54:20 UTC

[jira] [Commented] (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&focusedCommentId=15402394#comment-15402394 ] 

Michael Musgrove commented on SUREFIRE-1265:
--------------------------------------------

The issue is that org.apache.maven.plugin.surefire.booterclient.ForkStarter#getSuitesIterator() tries to load classes *before* forking the JVM that will run the tests but I am using the surefire argLine property to tell the modular jdk which module the missing classes belong to (in my case java.corba). This happens in surefire-booter method org.apache.maven.surefire.booter.ProviderFactory#getSuites() and the provider it uses to find the testSuites is org.apache.maven.surefire.junit4.JUnit4Provider and IsolatedClassLoader#loadClass() throws an exception if it cannot load a requested class.

> 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)