java - Missing artifact javax.transaction:jta:jar:1.0.1B ( Issue was different as you may see the resolution is different)

ID : 274500

viewed : 31

Tags : javaspringhibernatetransactionsstruts2java





Top 5 Answer for java - Missing artifact javax.transaction:jta:jar:1.0.1B ( Issue was different as you may see the resolution is different)

vote vote

99

In my case i tried example from mkyong

jsf-2.0 spring hibernate integration example

When i got the exception i searched alot i was using spring sts suit tool , and eclipse MARS with JDK 8 the solution was

I changed pom to 1.1 instead of 1.0.1B

<dependency>             <groupId>javax.transaction</groupId>             <artifactId>jta</artifactId>             <version>1.1</version> </dependency> 

And if it could not be downloaded automatically from m2 repo you should download it manualy (you can check this in the repo in folder C:\Users\pc1\.m2\repository\javax\transaction\jta\1.1\jta-1.1.jar )

and check the maven dependency in project properties it should not give you an error in the lib tab.

References : reference 1 reference 2 reference 3 reference 4 reference 5

Related issues might appear after you solve this if you are applying the tutorial:

1-http://www.mkyong.com/web-development/the-web-xml-deployment-descriptor-examples/

2-http://jonathan.lalou.free.fr/?p=2026

3-Error creating bean with name 'sessionFactory' Unable to instantiate default tuplizer [org.hibernate.tuple.entity.PojoEntityTuplizer] Tomcat error: Not Found in ExternalContext as a Resource

vote vote

84

The error in your pom.xml because you mess up different versions of Struts core and plugins.

Change

<dependency>     <groupId>org.apache.struts</groupId>     <artifactId>struts2-core</artifactId>     <version>2.3.15.2</version> </dependency> 

I don't know why do you need JTA 1.0.1B but you could change hibernate to 3.3.2 (at least, without headaches)

<dependency>     <groupId>org.hibernate</groupId>     <artifactId>hibernate</artifactId>     <version>3.3.2.ga</version> </dependency> 

it has a recommended dependency for JTA 1.1.

Create a new project from pom.xml then add source files to it.

vote vote

80

Which repository are you using?

Add the java.net Maven repository as below.

<repository>     <id>java.net</id>     <url>http://download.java.net/maven/2/</url> </repository> 
vote vote

63

This repo worked for me:

   <repository>            <id>webpublico-repository</id>                 <name>Webpublico Nexus Repository</name>                 <url>http://repository.webpublico.com.br/repository/maven-public/</url>    </repository> 
vote vote

60

some approach from Unable to resolve javax.transaction dependency

clear the .ivy/cache folder. it works, but takes very long time.

Top 3 video Explaining java - Missing artifact javax.transaction:jta:jar:1.0.1B ( Issue was different as you may see the resolution is different)







Related QUESTION?