New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
javax.transaction:javax.transaction-api-1.2 not compatible with Java 6 #2347
Comments
wonderful 👎 - Thanks for the report! |
Can you downgrade to JTA 1.1? We aim to keep Spring Boot Java 6 compatible but we have a few third-party libraries like this where, if you want to use them, you will need to upgrade to a later JDK. |
Wait a minute here. Hibernate 4.3 claims to be compatible with Java6 and it uses internally JTA 1.2 Maybe your project had an exclude on It's not obvious looking at the JTA spec what JDK it requires but if that does work with the dependency above then something must be wrong in either of those two jars (we use |
The exclude of
My project's pom looks like this:
|
That's not my point. My point is that without the exclude, Hibernate brings the JTA 1.2 API anyway so I am not sure to understand what would be the difference with the "regular" JTA 1.2 API. |
Apparently the difference is that |
What a pain. I prefer using the standard |
What a mess. I don't think we've chosen the wrong coordinates. The JBoss jar is really specific to hibernate. Not sure how we could fix that though. |
I understand... the standard jar usually is the better choice... In my case the following workaround will do the trick:
Not a pretty solution, but at least I'm able to use the latest version of Spring Boot. |
We'll at least add something to docs for this. Thanks for raising the issue. |
Is it possible to request to use Java 6 for 'javax.transaction:javax.transaction-api:1.2' to its maintainer if it doesn't use any Java 7 specific syntax? |
If someone stumbles upon this problem by chance, this is how you can configure your JTA dependencies with Gradle: dependencies {
compile ("org.springframework.boot:spring-boot-starter-data-jpa") {
exclude group: "javax.transaction", module: "javax.transaction-api"
}
compile "org.jboss.spec.javax.transaction:jboss-transaction-api_1.2_spec:1.0.0.Final"
} |
Updating JPA spring boot project to 1.2.1-RELEASE will cause a
java.lang.UnsupportedClassVersionError
when running with Java 6:The text was updated successfully, but these errors were encountered: