2017-03-29 1 views
-1
用ローダー制約違反
import javax.xml.namespace.NamespaceContext; 
XPath xpath = XPathFactory.newInstance().newXPath(); 
xpath.setNamespaceContext(some code goes here) 

私は私のウェブアプリでjavax.xml.namespace.NamespaceContextを使用するとJBossサーバーに配備する場合、それはエラーに続いています:java.lang.LinkageErrorの:javax.xml.xpath.XPath.setNamespaceContext

javax.servlet.ServletException: java.lang.LinkageError: loader constraint violation: when resolving interface method "javax.xml.xpath.XPath.setNamespaceContext(Ljavax/xml/namespace/NamespaceContext;)V" the class loader (instance of org/jboss/classloader/spi/base/BaseClassLoader) of the current class, com/accenture/mdh/sso/util/Util, and the class loader (instance of <bootloader>) for resolved class, javax/xml/xpath/XPath, have different Class objects for the type)V used in the signature 
    org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:852) 
    org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:781) 
    org.apache.jsp.jsp.LoginConsumer_jsp._jspService(LoginConsumer_jsp.java:187) 
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) 
    javax.servlet.http.HttpServlet.service(HttpServlet.java:717) 
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:369) 
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:322) 
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:249) 
    javax.servlet.http.HttpServlet.service(HttpServlet.java:717) 
    org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96) 

インターネットで検索しましたが、WEB-INF/libにjavax.xml.namespace.NamespaceContextという矛盾するjarがあるようです。しかし、私はまだ原因を見つけることができません。本当にあなたの考えを感謝します。

+1

あなたはそれらのjarファイルの1または2を持っていますか? – efekctive

+0

同じ名前空間を持つ未使用のjar "javax.xml.stream_1.0.1.v201004272200.jar"がある。それを取り除いた後でも、私は同じエラーが出ます – Anuruddha

答えて

0

同じパッケージ名javax.xml.namespace.NamespaceContextの以下のライブラリを除いて、この問題が解決されました。

  • STAX-api.jarの
  • javax.xml.stream_1.0.1.v201004272200.jar
関連する問題