我使用JPA等创建了一个简单的项目,但是使用OC4J作为服务器存在问题。

[oracle:deploy] Deployment failed for spring.

BUILD FAILED
C:\Resources\springsource\sts-3.1.0.RELEASE\plugins\org.eclipse.jst.server.generic.oc4j_1.5.206.v20090812\buildfiles\oracle.10.1.3.xml:74: Deploy error: Operation failed with error:
Error creating bean with name 'mySessionFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed;
nested exception is java.lang.NoSuchMethodError: javax.persistence.OneToMany.orphanRemoval()Z


classPath

hibernate3.jar hibernate-jpa-2.0-api-1.0.1.Final.jar javassist-3.14.0-GA.jar jstl-1.2.jar jstl-impl-1.2.jar jta-1.1.jar log4j-1.2.16。 jar ojdbc6.jar org.springframework.asm-3.0.5.RELEASE.jar org.springframework.beans-3.0.5.RELEASE.jar org.springframework.context 3.0.5.RELEASE.jar org.springframework.core-3.0。 5.RELEASE.jar org.springframework.expression-3.0.5.RELEASE.jar org.springframework.jdbc-3.0.5.RELEASE.jar org.springframework.orm-3.0.5.RELEASE.jar org.springframework.transaction- 3.0.5.RELEASE.jar spring-web-3.0.5.RELEASE.jar org.springframework.aop-3.0.5.RELEASE.jar org.springframework.aspects-3.0.5.RELEASE.jar org.springframework.context。 support-3.0.5.RELEASE.jar org.springframework.instrument-3.0.5.RELEASE.jar org.springframework.instrument.tomcat-3.0.5.RELEASE.jar org.springframework.test-3.0.5.RELEASE.jar

最佳答案

可能是以下情况:

您在类路径中的某个位置具有JPA 1.0 API jar。您需要找到并删除有问题的jar。

如果不确定,则选择哪个JAR。请在您的问题上张贴您的课程路径,以便我看看。

09-05 15:01
查看更多