简体   繁体   English

部署是WS错误jboss

[英]Deploy was WS error jboss

I want to deploy a war with soap ws in java, but shows me the following error 我想在Java中用肥皂水部署战争,但显示以下错误

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 由以下原因引起:java.lang.LinkageError:接口可初始化中违反了加载器约束:在解析方法“ $ Proxy182.setElementType(Ljavax / xml / namespace / QName;)V”时,类加载器(org / jboss / classloader / spi的实例)当前类$ Proxy182的/ base / BaseClassLoader)和接口javax / wsdl / extensions / ExtensibilityElement的类加载器(org / jboss / classloader / spi / base / BaseClassLoader的实例)对于javax /类型具有不同的Class对象签名中使用的xml / namespace / QName

my web.xml: 我的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 非常感谢你

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. 您有很多jar可能与jboss自己的jar冲突,要找到哪个jar并同时防止您的应用崩溃不会很容易。 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: 将具有以下内容的名为jboss-web.xml的文件放入您的WEB-INF目录中:

<?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. com.example:archive=unique-archive-name并不重要,只要它是唯一名称即可。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM