maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alan Bateman (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SUREFIRE-1424) javax.transaction.TransactionManager not visible with Java9
Date Fri, 29 Sep 2017 08:44:04 GMT

    [ https://issues.apache.org/jira/browse/SUREFIRE-1424?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16185514#comment-16185514
] 

Alan Bateman commented on SUREFIRE-1424:
----------------------------------------

You shouldn't need to be concerned with the java.sql module. The only 
modules that you need to be concerned about are:

java.corba
java.transaction
java.activation
java.xml.bind
java.xml.ws
java.xml.ws.annotation

and the java.se.ee aggregator.

These modules are deprecated in Java SE and are proposed to be removed 
in a future release.

Aside from java.corba, the 5 modules shared with Java EE are standalone 
technologies, each with one or more JSRs and its own download. Each of 
these projects used to be on java.net but moved to the Java EE github 
project recently. I don't know if the move to Eclipse will change 
anything there.

In any case, each of the standalone versions can be deployed on the 
class path with JDK 9.

In time they will be deployable as modules too and this will allow them 
to be deployed on the upgrade module path (--upgrade-module-path) to 
upgrade/override the module in the run-time image with the standalone or 
Java EE module. This will actually work with all except for the 
transaction API as there are a couple of issues to sort out there before 
it can be deployed as a module.

As I understand it, the Spring folks in the JIRA issue are deploying the 
JTA JAR file on the class path. That should just work but is complicated 
by `--add-module=java.se.ee` as that will cause the java.transaction 
module to be resolved. You can't split the javax.transaction package 
between a module and the class path.

For the surefire plugin then dropping the --add-modules should be looked 
at. You'll need to do that anyway once java.se.ee goes away. If the 
plugin relies on JAXB then adding a dependency on the standalone version 
should work.

-Alan






> javax.transaction.TransactionManager not visible with Java9
> -----------------------------------------------------------
>
>                 Key: SUREFIRE-1424
>                 URL: https://issues.apache.org/jira/browse/SUREFIRE-1424
>             Project: Maven Surefire
>          Issue Type: Bug
>          Components: Maven Surefire Plugin
>    Affects Versions: 2.20.1
>         Environment: Apache Maven 3.5.0 (ff8f5e7444045639af65f6095c62210b5713f426; 2017-04-03T21:39:06+02:00)
> Maven home: /Users/snicoll/tools/maven
> Java version: 9, vendor: Oracle Corporation
> Java home: /Library/Java/JavaVirtualMachines/jdk-9.jdk/Contents/Home
> Default locale: en_BE, platform encoding: UTF-8
> OS name: "mac os x", version: "10.12.6", arch: "x86_64", family: "mac"
>            Reporter: Stephane Nicoll
>            Assignee: Tibor Digana
>
> I am trying to port Spring Boot to Java9 and I am hitting an issue that looks like Maven
specific. I've managed to trim down the problem to [a simple class that doesn't involve Spring
Boot|https://github.com/snicoll-scratches/test-jta-java9]
> If I run this project on the command line, I get the following:
> {noformat}
> Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.043 s <<<
FAILURE! - in com.example.testjtajava9.TestJtaJava9ApplicationTests
> contextLoads(com.example.testjtajava9.TestJtaJava9ApplicationTests)  Time elapsed: 0.006
s  <<< ERROR!
> java.lang.NoClassDefFoundError: javax/transaction/TransactionManager
> 	at com.example.testjtajava9.TestJtaJava9ApplicationTests.contextLoads(TestJtaJava9ApplicationTests.java:9)
> Caused by: java.lang.ClassNotFoundException: javax.transaction.TransactionManager
> 	at com.example.testjtajava9.TestJtaJava9ApplicationTests.contextLoads(TestJtaJava9ApplicationTests.java:9)
> {noformat}
> If I run that test with IntelliJ IDEA, it passes. This sample project has also a simple
Gradle build that shows it works with Gradle as well.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message