0
votes

I want to deploy a war with soap ws in java, but shows me the following error

Caused by: java.lang.LinkageError: loader constraint violation in interface itable initialization: when resolving method "$Proxy182.setElementType(Ljavax/xml/namespace/QName;)V" the class loader (instance of org/jboss/classloader/spi/base/BaseClassLoader) of the current class, $Proxy182, and the class loader (instance of org/jboss/classloader/spi/base/BaseClassLoader) for interface javax/wsdl/extensions/ExtensibilityElement have different Class objects for the type javax/xml/namespace/QName used in the signature

my web.xml:

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
  <display-name>WSLicenciaServ</display-name>
  <welcome-file-list>
    <welcome-file>index.html</welcome-file>
    <welcome-file>index.htm</welcome-file>
    <welcome-file>index.jsp</welcome-file>
    <welcome-file>default.html</welcome-file>
    <welcome-file>default.htm</welcome-file>
    <welcome-file>default.jsp</welcome-file>
  </welcome-file-list>
  <servlet>
    <display-name>WSLicenciaServ</display-name>
    <servlet-name>WSLicenciaServ</servlet-name>
    <servlet-class>app.algunDominio.webService.WSLicenciaServ</servlet-class>
  </servlet>
  <servlet-mapping>
    <servlet-name>WSLicenciaServ</servlet-name>
    <url-pattern>/WSLicenciaServ</url-pattern>
  </servlet-mapping>

</web-app>

thank you very much

1
please post the list of jars in the WEB-INF/lib directory of your appCamilo
That basically says you have two versions of javax/xml/namespace/QName class loaded by two classloaders. You have to provide your WEB-INF/lib contents to understand better.IndoKnight
edit my comments with the JARS. Thanks for your attentionuser3260663
I just delete all libraries but the error continues.user3260663
what is the version of jboss?Camilo

1 Answers

0
votes

Are you sure you need all those libs? You have many jars that might be conflicting with jboss own jars, finding which one and at the same time keeping your app from not crashing won't be easy. You could instead try isolating your deployment classloader and make your app classes override the server classes. Place a file named jboss-web.xml in your WEB-INF directory with this content:

<?xml version="1.0" encoding="UTF-8"?> 
<jboss-web>
<class-loading java2ClassLoadingCompliance="false">
   <loader-repository>
      com.example:archive=unique-archive-name
      <loader-repository-config>java2ParentDelegation=false</loader-repository-config>
   </loader-repository>
</class-loading>
</jboss-web>

com.example:archive=unique-archive-name is not really relevant as long as it's a unique name.