开发者

jboss5 class loader problem with spring and hibernate trying to parse applicationContext.xml

I am using Jboss5 and I'm trying to utilize Hibernate and Spring to load in a spring dao. I'm getting an excepti开发者_开发百科on which seems to point to an incompatibility in jars but I'm not quite sure what is going on. I've done quite a bit of searching and I can't seem to find something specific to this besides change JBOSS versions. I am wanting to know if anyone has had any similar issues or found a way to get around this. Should I not be including the spring and hibernate jars in my ear?

Unexpected exception parsing XML document from class path resource [applicationContext.xml]; nested exception is java.lang.LinkageError: loader constraint violation: when resolving method "javax.xml.parsers.DocumentBuilder.setEntityResolver(Lorg/xml/sax/EntityResolver;)V" the class loader (instance of org/jboss/classloader/spi/base/BaseClassLoader) of the current class, org/springframework/beans/factory/xml/DefaultDocumentLoader, and the class loader (instance of ) for resolved class, javax/xml/parsers/DocumentBuilder, have different Class objects for the type org/xml/sax/EntityResolver used in the signature


You probably have a copy of one of the XML API JARs in your WAR or EAR, like Xerces, xml-apis, or something like that. This will clash (violently) with JBoss's own.

Make sure your WAR/EAR has none of its own copies of the javax.xml libraries in its lib directory.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜