Uploaded image for project: 'Maven Surefire'
  1. Maven Surefire
  2. SUREFIRE-1424

javax.transaction.TransactionManager not visible with Java9

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.20.1
    • 2.21.0
    • Maven Surefire Plugin
    • None

    Description

      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

      If I run this project on the command line, I get the following:

      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)
      

      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.

      Attachments

        Issue Links

          Activity

            People

              tibordigana Tibor Digana
              snicoll Stephane Nicoll
              Votes:
              4 Vote for this issue
              Watchers:
              22 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: