When trying to run my program with Tomcat Apache, I get the following error:
SEVERE: Mapped exception to response: 500 (Internal Server Error) java.lang.SecurityException: class "javax.persistence.PersistenceUtil"'s signer information does not match signer information of other classes in the same package at java.lang.ClassLoader.checkCerts(ClassLoader.java:806) at java.lang.ClassLoader.preDefineClass(ClassLoader.java:487) at java.lang.ClassLoader.defineClassCond(ClassLoader.java:625) at java.lang.ClassLoader.defineClass(ClassLoader.java:615) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141) at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2895) at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1173) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1681) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559) at org.odata4j.producer.jpa.JPAProducerFactory.create(JPAProducerFactory.java:32) at ......
Earlier I was getting a "java.lang.NoClassDefFoundError: javax/persistence/Persistence" error so I added the javax.persistence_2.0.5.v201212031355.jar to WEB-INF/lib.
My WEB-INF/lib looks like:
I resolved this error by removing BOTH eclipselink.jar and odata4j-core-0.7.0.jar
My WEB-INF/lib now looks like: