質問

I'm using OC4J 10.1.3.5.0 and there is a problem with jpa 2. I put hibernate-jpa-2.0-api-1.0.1.Final.jar in the class path. When deploy my app and use @OneToMany annotation in my code, I get this exception: java.lang.NoSuchMethodError:javax.persistence.OneToMany.orphanRemoval()Z

When i remove it from code, my app runs normally.

役に立ちましたか?

解決 2

OC4J_PATH\j2ee\home\lib\persistance.jar this jar file jpa 1 and loaded with server start i replaced this jar with Jpa 2 jar with the same name and my app run normally

他のヒント

You have incompatible JPA library in the classpath. The error "java.lang.NoSuchMethodError" says there is no method "orphanRemoval()" in class "javax.persistence.OneToMany". You should be able to check the library version based on the stack trace.

Check the class in OC4J deployed war file directory. Also make sure there are no conflicting libraries in the OC4J container lib directory (they would take precedence over your packaged jars).

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top