开发者

The annotation PersistenceContext will not be recognized by WebSphere Application Server v7.0 runtimes

I am getting the error message in Websphere when trying to use JPA @PersistenceContext annotation.

I am using JPA 2.0 and hibernate as persistence provider, have all the required hibernate 3.5 jar files in classpath.

Why does this error message appear?

Problem description:开发者_如何学C The annotation PersistenceContext will not be recognized by WebSphere Application Server v7.0 runtimes. Set the UseEJB61FEPScanPolicy custom property to true in the MANIFEST.MF file for this module.


It looks like WebSphere perceives your application as J2EE, not Java EE 5. Check the deployment descriptor of your EAR (application.xml) and that of EJB jars, if they conform to Java EE 5.

EDIT: Your Hibernate version may also be the cause, if your WAS is not extended with the "OSGI and JPA 2 feature pack". Hibernate 3.5 implements JPA 2.0, Hibernate 3.3 — JPA 1.0 (see my other answer).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜