引起:java.lang.NoSuchMethodError:org.springframework.beans.factory.support.BeanDefinitionRegistry.isBeanNameInUse(Ljava / lang / String;)Z

时间:2017-07-16 07:29:21

标签: spring maven apache-camel cxf jboss-eap-6

你能帮我解决这个依赖问题吗?这是一个camel集成项目,它在servlet容器中调用了cxf端点。

在JBoss EAP 6.4中部署时,发生以下异常。

Exception: `Caused by: java.lang.NoSuchMethodError: org.springframework.beans.factory.support.BeanDefinitionRegistry.isBeanNameInUse(Ljava/lang/String;)Z`
  <version.maven.compiler.plugin>3.5.1</version.maven.compiler.plugin>
    <jboss.home>${env.JBOSS_HOME}</jboss.home>
    <version.maven.surefire.plugin>2.19.1</version.maven.surefire.plugin>
    <server.config>standalone.xml</server.config>
    <maven.compiler.target>1.7</maven.compiler.target>
    <version.jboss.bom.eap>6.4.0.GA</version.jboss.bom.eap>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <camel.version>2.17.0.redhat-630224</camel.version>
    <version.wildfly.maven.plugin>1.0.2.Final</version.wildfly.maven.plugin>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <cxf.version>3.1.12</cxf.version>
    <version.junit>4.11</version.junit>
    <maven.compiler.source>1.7</maven.compiler.source>
    <version.maven.war.plugin>2.5</version.maven.war.plugin>
    <spring.version>4.3.9.RELEASE</spring.version>

<!-- Dependency -->
<dependency>
        <groupId>org.apache.camel</groupId>
        <artifactId>camel-core</artifactId>
        <version>${camel.version}</version>
    </dependency>
    <dependency>
        <groupId>org.apache.camel</groupId>
        <artifactId>camel-spring</artifactId>
        <version>${camel.version}</version>
    </dependency>
    <dependency>
        <groupId>org.apache.camel</groupId>
        <artifactId>camel-cxf</artifactId>
        <version>${camel.version}</version>
    </dependency>
    <dependency>
        <groupId>org.apache.camel</groupId>
        <artifactId>camel-soap</artifactId>
        <version>${camel.version}</version>
    </dependency>
    <dependency>
        <groupId>org.apache.cxf</groupId>
        <artifactId>cxf-rt-frontend-jaxws</artifactId>
        <version>${cxf.version}</version>
    </dependency>
    <dependency>
        <groupId>org.apache.cxf</groupId>
        <artifactId>cxf-rt-transports-http</artifactId>
        <version>${cxf.version}</version>
    </dependency>
    <dependency>
        <groupId>org.apache.cxf</groupId>
        <artifactId>cxf-rt-transports-http-jetty</artifactId>
        <version>${cxf.version}</version>
    </dependency>
    <dependency>
        <groupId>org.apache.cxf</groupId>
        <artifactId>cxf-rt-bindings-soap</artifactId>
        <version>${cxf.version}</version>
    </dependency>
    <dependency>
        <groupId>org.apache.cxf</groupId>
        <artifactId>cxf-tools-common</artifactId>
        <version>${cxf.version}</version>
    </dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-core</artifactId>
        <version>${spring.version}</version>
    </dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-web</artifactId>
        <version>${spring.version}</version>
    </dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-beans</artifactId>
        <version>4.1.6.RELEASE</version>
    </dependency>
    <dependency>
        <groupId>org.jboss.spec.javax.servlet</groupId>
        <artifactId>jboss-servlet-api_3.0_spec</artifactId>
    </dependency>
    <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>org.jboss.arquillian.junit</groupId>
        <artifactId>arquillian-junit-container</artifactId>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>org.jvnet.jax-ws-commons.spring</groupId>
        <artifactId>jaxws-spring</artifactId>
        <version>1.8</version>
    </dependency>

编辑:完整堆栈跟踪位于https://pastebin.com/FnDSntN1

编辑:此问题已得到解决。

<dependency>
    <groupId>org.jvnet.jax-ws-commons.spring</groupId>
    <artifactId>jaxws-spring</artifactId>
    <version>1.8</version>
</dependency>

这种不必要的依赖导致了不兼容的弹簧罐。

0 个答案:

没有答案