jta-1.0.1B.jar missing on eclipse

Project Struts2Hibernate example berada pada direktori /home/glassfish/workspace/Struts2Hibernate

File pom.xml (Struts2HibernateIntegration example from mkyong dot com)

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.mkyong.common</groupId>
<artifactId>Struts2Example</artifactId>
<packaging>war</packaging>
<version>com.mkyong.common</version>
<name>Struts2Example Maven Webapp</name>
<url>http://maven.apache.org</url>
<dependencies>

<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>

<!-- Struts 2 -->
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-core</artifactId>
<version>2.1.8</version>
</dependency>

<!-- Spring framework -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring</artifactId>
<version>2.5.6</version>
</dependency>

<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>2.5.6</version>
</dependency>

<!-- Struts 2 + Spring plugins -->
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-spring-plugin</artifactId>
<version>2.1.8</version>
</dependency>


</dependencies>
<build>
<finalName>Struts2Example</finalName>
</build>
</project>
cd /home/glassfish/workspace/Struts2Hibernate/
mvn eclipse:eclipse

Import project Struts2Hibernate
File > Import >

Klik Next

Klik Finish.

Tp koq,, pada project Struts2Hibernate ada tanda serunya🙂 merah lagi .

Emm ,, klik kanan pada project Struts2Hibernate > Build Path > Configure Build Path

Wahh ternyata ada library yang missing yakni JTA-1.0.1B.jar,,katanya se karena soal lisensi🙂,

“This happened because Spring has a transitive dependency with the Sun’s JTA classes, but the JTA jar can’t be inserted in the Maven repository because the Sun’s Binary License.”

Untuk memecahkan masalah ini, download manual aja dulu filenya disini

http://download.oracle.com/otndocs/jcp/7089-jta-1.0.1B-mr-class-oth-JSpec/

dan simpan filenya disembarang tempat🙂 ,, klo saya naruhnya di /home/glassfish/workspace/

nama filenya jta-1_0_1B-classes.zip

Lewat konsole/terminal masuk ke direktori tempat download file tadi,

cd /home/glassfish/workspace/

Terus eksekusi perintah seperti pada image di bawah ini :

OK🙂 masalah jta udah beres.

sumber :
http://www.jugpadova.it/articles/2005/11/26/maven-2-spring-and-jta-depencies

Published by

saifiahmada

Begin a big Process with a bit trying

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s