I am using Spring 2.0 with Hibernate 3.0/JPA and getting following error when tomcat starts up and tries to load spring file:
Caused by: org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'entityManagerFactory' defined in class path resource [com/amazon/otb/dao/hibernate/applicationContext-hibernate.xml]: Invocation of init method failed; nested exception is java.lang.LinkageError: Class org/xml/sax/Parser violates loader constraints
Caused by: java.lang.LinkageError: Class org/xml/sax/Parser violates loader constraints
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java :620)
at java.lang.ClassLoader.defineClass(ClassLoader.java :465)
at org.springframework.instrument.classloading.Abstra ctOverridingClassLoader.loadClass(AbstractOverridi ngClassLoader.java:96)
at java.lang.ClassLoader.loadClass(ClassLoader.java:2 51)
at java.lang.ClassLoader.loadClassInternal(ClassLoade r.java:319)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java :620)
at java.lang.ClassLoader.defineClass(ClassLoader.java :465)
at org.springframework.instrument.classloading.Abstra ctOverridingClassLoader.loadClass(AbstractOverridi ngClassLoader.java:96)
at java.lang.ClassLoader.loadClass(ClassLoader.java:2 51)
at java.lang.ClassLoader.loadClassInternal(ClassLoade r.java:319)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java :620)
at java.lang.ClassLoader.defineClass(ClassLoader.java :465)
at org.springframework.instrument.classloading.Abstra ctOverridingClassLoader.loadClass(AbstractOverridi ngClassLoader.java:96)
at java.lang.ClassLoader.loadClass(ClassLoader.java:2 51)
at org.xml.sax.helpers.NewInstance.newInstance(NewIns tance.java:49)
Can anyone suggest what might be missing. Also, I am not getting this error when I run unit tests, only when I deploy the application in tomcat. I am not sure if there are any conflicts with jar files or some VM options. Thanks.
|