Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/359.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/maven/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java JBoss AS 7.2无法确定实现类名_Java_Jboss_Jboss7.x - Fatal编程技术网

Java JBoss AS 7.2无法确定实现类名

Java JBoss AS 7.2无法确定实现类名,java,jboss,jboss7.x,Java,Jboss,Jboss7.x,当我试图从资源适配器内部调用基于WSDL的web服务时,出现以下异常: SEVERE [org.apache.cxf.BusFactory] (JmsMessageDispatcher#2) Failed to determine BusFactory implementation class name.: java.lang.ClassCastException: class org.apache.cxf.bus.spring.SpringBusFactory at java.lang.Cla

当我试图从资源适配器内部调用基于WSDL的web服务时,出现以下异常:

SEVERE [org.apache.cxf.BusFactory] (JmsMessageDispatcher#2) Failed to determine BusFactory implementation class name.: java.lang.ClassCastException: class org.apache.cxf.bus.spring.SpringBusFactory
at java.lang.Class.asSubclass(Class.java:3126) [rt.jar:1.7.0_45]
at org.apache.cxf.BusFactory.getBusFactoryClass(BusFactory.java:333) [cxf-api-2.5.9.jar:2.5.9]
at org.apache.cxf.BusFactory.newInstance(BusFactory.java:260) [cxf-api-2.5.9.jar:2.5.9]
at org.apache.cxf.BusFactory.newInstance(BusFactory.java:247) [cxf-api-2.5.9.jar:2.5.9]
at org.apache.cxf.BusFactory.getDefaultBus(BusFactory.java:99) [cxf-api-2.5.9.jar:2.5.9]
at org.apache.cxf.BusFactory.createThreadBus(BusFactory.java:193) [cxf-api-2.5.9.jar:2.5.9]
at org.apache.cxf.BusFactory.getThreadDefaultBus(BusFactory.java:182) [cxf-api-2.5.9.jar:2.5.9]
at org.apache.cxf.BusFactory.getThreadDefaultBus(BusFactory.java:166) [cxf-api-2.5.9.jar:2.5.9]
at org.apache.cxf.frontend.ClientProxyFactoryBean.configureObject(ClientProxyFactoryBean.java:99) [cxf-rt-frontend-simple-2.5.9.jar:2.5.9]
at org.apache.cxf.frontend.ClientProxyFactoryBean.create(ClientProxyFactoryBean.java:131) [cxf-rt-frontend-simple-2.5.9.jar:2.5.9]
at org.apache.cxf.jaxws.JaxWsProxyFactoryBean.create(JaxWsProxyFactoryBean.java:155) [cxf-rt-frontend-jaxws-2.5.9.jar:2.5.9]
在部署所述资源适配器期间,我收到以下警告:

WARN  [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015893: Encountered invalid class name 'org.springframework.context.ApplicationContext,org.springframework.beans.BeansException' for service type 'org.apache.cxf.bus.factory'
我猜这就像他们说的:警告迟早会变成错误;)

这个问题的答案没有帮助,因为我已经向pom.xml添加了以下依赖项:

<dependency>
        <groupId>org.apache.cxf</groupId>
        <artifactId>cxf-api</artifactId>
        <version>2.5.9</version>    
</dependency>

org.apache.cxf
cxfapi
2.5.9    
资源适配器部署为JCA连接器(.rar)


谢谢你的帮助

不要使用资源适配器交付Spring和CXF。将它们作为模块依赖项包含

在您的RA项目中:

  • xml:使用为CXF库提供的作用域
  • 将META-INF/jboss-deployment-structure.xml添加到RAR归档文件
META-INF/jboss-deployment-structure.xml

<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.2">
  <deployment>
    <dependencies>
      <module name="org.jboss.ws.cxf.jbossws-cxf-client" services="import" />
      <module name="org.apache.cxf"> <!-- .impl removed -->
        <imports>
          <include path="META-INF" />
          <include path="META-INF/cxf" />
        </imports>
      </module>
      <module name="org.springframework.spring">
        <imports>
          <include path="META-INF" />
        </imports>
      </module>
    </dependencies>
  </deployment>
</jboss-deployment-structure>

由于spring不是JBoss的一部分,您必须将其作为新模块部署

  • 创建模块目录$JBOSS_HOME/modules/org/springframework/spring/main/
  • 添加module.xml
  • 将module.xml中列出的JAR文件添加到目录中
module.xml

<?xml version="1.0" ?>
<module xmlns="urn:jboss:module:1.1" name="org.springframework.spring">
<resources>
    <resource-root path="spring-aop-3.2.4.RELEASE.jar" />
    <resource-root path="spring-beans-3.2.4.RELEASE.jar" />
    <resource-root path="spring-context-3.2.4.RELEASE.jar" />
    <resource-root path="spring-core-3.2.4.RELEASE.jar" />
    <resource-root path="spring-expression-3.2.4.RELEASE.jar" />
    <resource-root path="spring-web-3.2.4.RELEASE.jar" />
</resources>
<dependencies>       
    <module name="javax.api" />
    <module name="javax.servlet.api" />
    <module name="javax.transaction.api" />
    <module name="org.apache.commons.logging" />
</dependencies>
</module>  


我不确定这到底是不是JBoss中的类加载错误。

您的部署结构是什么样的?你图书馆里的罐子是什么?谢谢,这很有用!我想知道为什么我需要春天。我不记得在任何地方使用过它。cxf基于spring,尽管编程配置是可能的。