andreaxi
andreaxi

Reputation: 931

Failed to import javax.transaction.UserTransaction

I created a new JPA project where i need to use javax.transaction.UserTransaction. While I can import javax.naming.*, javax.persistence.*, I cannot import javax.transaction.UserTransaction: the message received is the classic "The import javax.transaction.UserTransaction cannot be resolved". I'm using as jdk.1.7.0_03 and I'm from Eclipse Indigo.

Where am I wrong? Thanks, Andrea

Upvotes: 2

Views: 6664

Answers (2)

andreaxi
andreaxi

Reputation: 931

I solved my issue simply creating a Java Project for ProjectA with the javax.transaction.jar in the build path.

Upvotes: 1

Mikko Maunu
Mikko Maunu

Reputation: 42114

Importing javax.transaction.UserTransaction fails because you do not have library that contains it in your project. You need JTA API/implementation. Typically same implementation as in target the application server is used.

Upvotes: 1

Related Questions