我使用Jboss5,我試圖利用Hibernate和Spring加載春天道。我得到一個異常,似乎指出了罐子中的不兼容性,但我不太確定發生了什麼。我已經做了相當多的搜索,除了更改JBOSS版本外,我似乎無法找到與此相關的特定內容。我想知道是否有人有類似的問題或找到解決方法。我的耳朵裏是否應該包括春季和冬眠罐?jboss5彈簧和休眠嘗試解析applicationContext.xml類加載器問題
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
是的,就是這樣。我從我的pom.xml中刪除了hibernate依賴項,然後一切正常。謝謝! – Loomer 2010-10-23 23:36:21