내가
받는다는 3.3.9
자바 1.8.0_45
TestNG를 6.8.5
나의 봄 버전 mvn clean test
를 실행하고 작동하지 것은 4.0.4.RELEASE
입니다하지만 다음 오류가 발생합니다.MVN 테스트를 받는다는 3.3.9와 자바 1.8.0_45
[ERROR] springTestContextPrepareTestInstance(com.inn.app17apr02.db.TestAuditDb) Time elapsed: 1.205 s <<< FAILURE! java.lang.IllegalStateException: Failed to load ApplicationContext Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in file [/home/ist/apache-tomcat-7.0.59/webapps/REPO/app17apr02/app17apr02/1.0/app17apr02/target/classes/applicationContext/application.xml]: Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: javax.persistence.Table.indexes()[Ljavax/persistence/Index; Caused by: java.lang.NoSuchMethodError: javax.persistence.Table.indexes()[Ljavax/persistence/Index;
나는 많은 검색과 순열을 시도했지만 성공하지 못했습니다. 다음 는
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.20</version>
<configuration>
<properties>
<property>
<name>usedefaultlisteners</name>
<value>false</value>
</property>
<property>
<name>listener</name>
<value>org.uncommons.reportng.HTMLReporter, org.uncommons.reportng.JUnitXMLReporter</value>
</property>
<property>
<name>testname</name>
<value>${project.name} TestNG tests reports</value>
</property>
</properties>
<systemProperties>
<property>
<name>org.uncommons.reportng.title</name>
<value>${project.name} TestNG Report</value>
</property>
<property>
<name>org.uncommons.reportng.stylesheet</name>
<value>/home/ist/apache-tomcat-7.0.59/webapps/REPO/app17apr02/app17apr02/1.0/app17apr02/headstart/artifacts/custom.css</value>
</property>
<property>
<name>org.uncommons.reportng.coverage-report</name>
<value>https://www.google.co.in</value>
</property>
</systemProperties>
<workingDirectory>target/</workingDirectory>
<reportsDirectory>/home/ist/apache-tomcat-7.0.59/webapps/REPO/app17apr02/app17apr02/1.0/app17apr02/headstart/sartifacts/surefire-reports</reportsDirectory>
<classpathDependencyExcludes>
<classpathDependencyExclude>org.apache.tika:tika-app</classpathDependencyExclude>
</classpathDependencyExcludes>
<forkCount>3</forkCount>
<reuseForks>true</reuseForks>
<argLine>-Xmx1024m -XX:MaxPermSize=256m</argLine>
</configuration>
<dependencies>
<dependency>
<groupId>org.hibernate.javax.persistence</groupId>
<artifactId>hibernate-jpa-2.1-api</artifactId>
<version>1.0.0.Final</version>
</dependency>
</dependencies>
</plugin>
더 자세한 정보가 필요한 경우 알려 주시기 바랍니다 치어 내 플러그인 항목입니다.
나는 많은 답변을 다른 JAP 2.x jar로 시도했다. 그래서 JPA jar의 문제이며 2.18.x, 2.19.x와 같은 다른 확실한 버전을 시도했다.
도움을 주시면 감사하겠습니다.
도 받는다는 3.0.3과 3.5.0하지만 동일한 결과와 받는다는으로 응답 2.2.1 – DnA