In an eclipse maven project using spring web mvc, I am getting the following error in the Markers tab:
Archive for required library: \'D:/mypath/.m2/reposi
You should exclude JTA in your hibernate dependency.
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate</artifactId>
<version>3.2.3.ga</version>
<exclusions>
<exclusion>
<artifactId>javax.transaction</artifactId>
<groupId>jta</groupId>
</exclusion>
</exclusions>
</dependency>
After that, add the jta dependency.
<dependency>
<groupId>javax.transaction</groupId>
<artifactId>jta</artifactId>
<version>1.1</version>
</dependency>
Tried with 1.5.5 Release jar and it worked for me
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.5.RELEASE</version>
https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-parent/1.5.5.RELEASE
The problem with me was fixed by going to Build Path-> Configure Build Path-> Libraries-> Remove the jta lib
which has small cross mark on it.
I was able to successfully build my project but was getting this error even after project Refresh/Project Clean.
You can manually go to the repository specified in the error console
that is
Archive for required library: '**D:/mypath/.m2/repository/javax/transaction/jta/1.0.1B/jta-1.0.1B.jar**' in project 'DocumentManager' cannot be read or is not a valid ZIP file
Delete the JAR mentioned
Go to eclipse, right click the project and select run as->maven-install. It will download the right jar file.
To fix this issue simply.
The reason is cache info, so just refresh the information.
The maven central repository doesn't contain a jar file for the given groupId/artifactId only a pom.xml.
You are using Spring 3.2 so I suggest you simply upgrade hibernate to the most recent version (4.2.6.Final) which should have a reference to jta 1.1. Or simply include the 1.1 version in your pom which does have a jar in maven central.