Has anyone experienced surefire issues when using java.sql and JDK-9?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Has anyone experienced surefire issues when using java.sql and JDK-9?

Michael Musgrove
When I run any surefire test (with reuseForks=false) that uses java.sql classes on jdk-9 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.

Has anyone seen this error yet?

I thought I would check with this list before submitting a request to the surefire team. A trivial reproducer is attached.

> tree src

├── pom.xml
└── src
    ├── main
    │   └── java
    │       └── J9Example.java
    └── test
        └── java
            └── J9Test.java

> mvn clean test -DreuseForks=false 
[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]

Mike

--
Michael Musgrove
Transactions Team
t: +44 191 243 0870

Registered in England and Wales under Company Registration No. 03798903
Directors: Michael Cunningham (US), Paul Hickey (Ireland), Matt Parson
(US), Charles Peters (US)

Michael Cunningham (US), Charles Peters (US), Matt Parson (US), Michael O'Neill(Ireland)

_______________________________________________
wildfly-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/wildfly-dev

j9test.tar (13K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Has anyone experienced surefire issues when using java.sql and JDK-9?

Michael Musgrove
I should have mentioned that this problem was introduced in jdk build 9-ea+122 (http://download.java.net/java/jdk9/changes/jdk-9+122.html) when they addressed: 

    d20279be77d9 8154189 Deprivilege java.sql and java.sql.rowset module

and I am currently testing with jdk build 9-ea+128

Mike

On Mon, Jul 25, 2016 at 10:28 AM, Michael Musgrove <[hidden email]> wrote:
When I run any surefire test (with reuseForks=false) that uses java.sql classes on jdk-9 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.

Has anyone seen this error yet?

I thought I would check with this list before submitting a request to the surefire team. A trivial reproducer is attached.

> tree src

├── pom.xml
└── src
    ├── main
    │   └── java
    │       └── J9Example.java
    └── test
        └── java
            └── J9Test.java

> mvn clean test -DreuseForks=false 
[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]

Mike

--
Michael Musgrove
Transactions Team
t: <a href="tel:%2B44%20191%20243%200870" value="+441912430870" target="_blank">+44 191 243 0870

Registered in England and Wales under Company Registration No. 03798903
Directors: Michael Cunningham (US), Paul Hickey (Ireland), Matt Parson
(US), Charles Peters (US)

Michael Cunningham (US), Charles Peters (US), Matt Parson (US), Michael O'Neill(Ireland)



--
Michael Musgrove
Transactions Team
t: +44 191 243 0870

Registered in England and Wales under Company Registration No. 03798903
Directors: Michael Cunningham (US), Paul Hickey (Ireland), Matt Parson
(US), Charles Peters (US)

Michael Cunningham (US), Charles Peters (US), Matt Parson (US), Michael O'Neill(Ireland)

_______________________________________________
wildfly-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/wildfly-dev