由于Apache CXF而导致Jboss启动异常? [英] Jboss start exception due to apache CXF?

查看:157
本文介绍了由于Apache CXF而导致Jboss启动异常?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

1)

未安装可选组件 org.apache.cxf.transport.http.Servlet3ContinuationProvider $ Servlet3Continuation由于异常:org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS011054: 找不到类org.apache.cxf.transport.http.Servlet3ContinuationProvider $ Servlet3Continuation的默认构造函数

Not installing optional component org.apache.cxf.transport.http.Servlet3ContinuationProvider$Servlet3Continuation due to exception: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS011054: Could not find default constructor for class org.apache.cxf.transport.http.Servlet3ContinuationProvider$Servlet3Continuation

2) 服务类型为"org.apache.cxf.bus.factory"的类名称无效,出现"org.springframework.context.ApplicationContext,org.springframework.beans.BeansException" JBAS015893:服务类型为"org.xmlpull.v1.XmlPullParserFactory"的类名称无效,出现"org.xmlpull.mxp1.MXParser,org.xmlpull.mxp1_serializer.MXSerializer"

2) Encountered invalid class name 'org.springframework.context.ApplicationContext,org.springframework.beans.BeansException' for service type 'org.apache.cxf.bus.factory' JBAS015893: Encountered invalid class name 'org.xmlpull.mxp1.MXParser,org.xmlpull.mxp1_serializer.MXSerializer' for service type 'org.xmlpull.v1.XmlPullParserFactory'

我正在使用Jboss EAP 6.0,portlet项目包含Apache cxf和spring配置以构建REST服务. 任何人都可以对这些例外情况有所了解,我在Google上搜索并尝试关注但未成功.

I am using Jboss EAP 6.0 and portlet project contains Apache cxf and spring configurations to build REST services. Could anyone shed some light on these exceptions, I googled and tried following but not successful.

<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.0">
<deployment>
<dependencies>
        <module name="org.jboss.modules"></module>
    </dependencies>
<exclusions>
        <module name="org.jboss.ws.cxf" />
        <module name="org.apache.cxf" />
        <module name="org.jboss.ws.rs" />    
          <module name="org.jboss.resteasy.resteasy-atom-provider"/>
          <module name="org.jboss.resteasy.resteasy-cdi"/>
          <module name="org.jboss.resteasy.resteasy-jaxrs"/>
          <module name="org.jboss.resteasy.resteasy-jaxb-provider"/>
          <module name="org.jboss.resteasy.resteasy-jackson-provider"/>
          <module name="org.jboss.resteasy.resteasy-jsapi"/>
          <module name="org.jboss.resteasy.resteasy-multipart-provider"/>
          <module name="org.jboss.resteasy.resteasy-yaml-provider"/>
          <module name="org.jboss.resteasy.resteasy-jettison-provider"/>
          <module name="org.hibernate" /> 
    </exclusions>

</deployment>

我也尝试了以下(:

<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.2">
   <deployment>
     <exclude-subsystems>
        <subsystem name="resteasy" />
         <subsystem name="webservices" /> 
      </exclude-subsystems>
        <exclusions>
            <module name="org.hibernate"></module>
             <module name="org.jboss.ws.rs" />
             <module name="org.apache.cxf" />             
              <module name="org.jboss.resteasy.resteasy-atom-provider"/>
              <module name="org.jboss.resteasy.resteasy-cdi"/>
              <module name="org.jboss.resteasy.resteasy-jaxrs"/>
              <module name="org.jboss.resteasy.resteasy-jaxb-provider"/>
              <module name="org.jboss.resteasy.resteasy-jackson-provider"/>
              <module name="org.jboss.resteasy.resteasy-jsapi"/>
              <module name="org.jboss.resteasy.resteasy-multipart-provider"/>
              <module name="org.jboss.resteasy.resteasy-yaml-provider"/>
              <module name="org.jboss.resteasy.resteasy-jettison-provider"/>
              <module name="org.jboss.ws.cxf" />
        </exclusions>
        <dependencies>
            <module name="com.oracle.ojdbc14"></module>
            <module name="com.liferay.portal"></module>
            <module name="org.jboss.ironjacamar.jdbcadapters"></module>
            <module name="org.picketbox"></module>
            <module name="org.jboss.modules"></module>
        </dependencies>
    </deployment>
</jboss-deployment-structure>

推荐答案

回答这个问题可能为时已晚.

Maybe it's too late to answer this question.

但是考虑到包括我在内的其他一些人,可能还需要几分钟,我想分享一下我为解决方案所做的事情.

But by consideration of some others, including me minutes before may still need it, I'd like to share what I have done for the solution.

简而言之,由于JBoss AS7或EAP6.0附带了不同版本的Apache CXF以构建其Web服务模块,因此仍然存在版本冲突问题.

In short, it's still an issue about version conflicts as JBoss AS7 or EAP6.0 ships with different version of Apache CXF to build its webservice module.

要解决此问题,我们需要执行两个步骤:

To resolve this issue, we need to do two steps:

  1. 要删除Jboass配置文件(例如standalone.xml)中的Web服务模块: 1).在会话下,删除

  1. To remove the webservice module in Jboass configuration file (say standalone.xml): 1). under session , remove

<extension module="org.jboss.as.webservices"/>

2).在会话下,删除整个Web服务子系统

2). under session , remove whole webservice subsystem

<subsystem xmlns="urn:jboss:domain:webservices:1.1">
...
</subsystem>

  • 使用jboss-deployment-structure: 一些xml snipit只是供您参考:

  • use the jboss-deployment-structure: Some xml snipit here is just for your reference:

    <deployment>
     <exclusions>
      <module name="org.apache.log4j"/>
      <module name="org.apache.commons.logging"/>
      <module name="org.slf4j" slot="main"/>
      <module name="org.dom4j" />
      <module name="org.hibernate" />
      <module name="org.hibernate.validator" />
      <module name="org.xmlpull" /> 
     </exclusions>
    </deployment>
    <sub-deployment name="myapp-1.0.0-SNAPSHOT.war">
     <exclusions>
       <module name="org.apache.cxf" />
       <module name="org.apache.neethi" />
       <module name="javax.wsdl4j.api" />
       <module name="org.apache.ws.security" />
       <module name="org.apache.ws.xmlschema" />                
     </exclusions>
    </sub-deployment>
    

  • 这篇关于由于Apache CXF而导致Jboss启动异常?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    相关文章
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆