JPA Console does not work after upgrading to Jakarta EE

Answered

I have a project that uses JPA/JSF/Hibernate/BeanValidation and so on, after I upgraded everything to use the Jakarta EE 8 with Wildfly 26 I'm unable to execute any query on JPA Console.

Any query on JPA Console returns the error below:

javax/transaction/SystemException
java.lang.ClassNotFoundException: javax.transaction.SystemException

If I run the same query again the error changes to:

java.lang.NoClassDefFoundError: Could not initialize class org.hibernate.jpa.boot.internal.PersistenceXmlParser

 

Any help on what could be the problem or how can I debug Intellij to show more info?

 

Thanks in advance.

0
2 comments

Check if you have this dependency in your Project:

javax.transaction:jta:1.1

If adding the dependency doesn't help (or if it's already there), a simple demo project would be helpful to better understand the nature of the issue.

You can upload the sample project to https://uploads.jetbrains.com/ and share the upload ID.

1

Thank you very much, the following dependency solves the problem for me as I'm using Wildfly.

<dependency>
    <groupId>org.jboss.spec.javax.transaction</groupId>
    <artifactId>jboss-transaction-api_1.3_spec</artifactId>
    <scope>provided</scope>
</dependency>

 

0

Please sign in to leave a comment.