gpt4 book ai didi

java - NoSuchMethodError : org. apache.cxf.jaxrs.JAXRSServiceFactoryBean.sendEvent

转载 作者:行者123 更新时间:2023-12-03 22:00:15 29 4
gpt4 key购买 nike

我在结合使用 Spring 3.1.1 和 Apache CXF 2.7.10 时遇到了问题。我猜我只是错过了一个依赖项,但我终究无法弄清楚是什么。

启动我的服务时出现以下异常:

PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'serviceBeans' threw exception; nested exception is java.lang.NoSuchMethodError: org.apache.cxf.jaxrs.JAXRSServiceFactoryBean.sendEvent(Lorg/apache/cxf/service/factory/FactoryBeanListener$Event;[Ljava/lang/Object;)V
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1396)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1118)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:585)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:913)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:464)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:385)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:284)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:111)
at org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:540)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:135)
at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1220)
at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:510)
at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
at org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:156)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:117)
at org.mortbay.jetty.Server.doStart(Server.java:222)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
at org.mortbay.xml.XmlConfiguration.main(XmlConfiguration.java:977)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.mortbay.start.Main.invokeMain(Main.java:194)
at org.mortbay.start.Main.start(Main.java:509)
at org.mortbay.start.Main.main(Main.java:119)
Caused by: org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are:
PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'serviceBeans' threw exception; nested exception is java.lang.NoSuchMethodError: org.apache.cxf.jaxrs.JAXRSServiceFactoryBean.sendEvent(Lorg/apache/cxf/service/factory/FactoryBeanListener$Event;[Ljava/lang/Object;)V
at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:102)
at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:58)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1393)
... 35 more

如有任何帮助,我们将不胜感激。

build.xml

    <?xml version="1.0" encoding="UTF-8"?>
<project name="IngestionService" default="help" basedir=".">

<property file="my-local.ant.properties"/>
<property file="local.ant.properties"/>

<!-- <property name="service.properties.file" value="contentService.windows.properties" /> -->
<property name="service.properties.file" value="contentService.properties" />

<path id="javadoc.path">
<pathelement path="${BuildSrc}"/>
<pathelement path="${BuildSrc}/../generated"/>
</path>

<path id="javadoc.classpath">
<fileset dir="${lib}">
<include name="apache_activemq/activemq-all-5.1.0.jar" />
<include name="apache_activemq/commons-pool-1.4.jar" />
<include name="apache_activemq/geronimo-jta_1.0.1B_spec-1.0.1.jar" />
<include name="apache_commons_coll/commons-collections-3.2.1.jar" />
<include name="apache_commons_io/commons-io-1.4.jar" />
<include name="apache_cxf/commons-lang-2.1.jar" />

<include name="apache_cxf/asm-3.3.1.jar" />
<include name="apache_cxf/commons-codec-1.9.jar" />
<include name="apache_cxf/commons-collections-3.2.1.jar" />

<include name="apache_cxf/cxf-2.0.3-incubator.jar" />
<!--<include name="apache_cxf/cxf-api-2.7.10.jar" />-->
<!--<include name="apache_cxf/cxf-bundle-3.0.0-milestone2.jar" />-->
<include name="apache_cxf/cxf-core-3.0.0-milestone2.jar" />
<include name="apache_cxf/cxf-rt-rs-extension-providers-3.0.0-milestone2.jar" />
<include name="apache_cxf/cxf-rt-frontend-jaxrs-3.0.0-milestone2.jar" />
<include name="apache_cxf/cxf-rt-transports-http-3.0.0-milestone2.jar" />
<include name="apache_cxf/wss4j-bindings-wss10-2.0.0-rc1.jar" />
<include name="apache_cxf/wss4j-bindings-wss11-2.0.0-rc1.jar" />
<include name="apache_cxf/wss4j-bindings-wssc-2.0.0-rc1.jar" />
<include name="apache_cxf/wss4j-bindings-wsu10-2.0.0-rc1.jar" />
<include name="apache_cxf/wss4j-policy-2.0.0-rc1.jar" />
<include name="apache_cxf/wss4j-ws-security-common-2.0.0-rc1.jar" />
<include name="apache_cxf/wss4j-ws-security-dom-2.0.0-rc1.jar" />
<include name="apache_cxf/wss4j-ws-security-policy-stax-2.0.0-rc1.jar" />
<include name="apache_cxf/wss4j-ws-security-stax-2.0.0-rc1.jar" />
<include name="apache_cxf/xmlbeans-2.6.0.jar" />
<include name="apache_cxf/geronimo-javamail_1.4_spec-1.7.1.jar" />
<include name="apache_cxf/geronimo-jaxws_2.2_spec-1.1.jar" />
<include name="apache_cxf/geronimo-jms_1.1_spec-1.1.1.jar" />
<include name="apache_cxf/geronimo-servlet_3.0_spec-1.0.jar" />
<include name="apache_cxf/jsr311-api-1.1.1.jar" />
<include name="apache_cxf/wsdl4j-1.6.3.jar" />
<include name="apache_cxf/xalan-2.7.0.jar" />
<include name="apache_cxf/xml-resolver-1.2.jar" />
<include name="apache_cxf/XmlSchema-1.3.2.jar" />
<include name="apache_cxf/xmlschema-core-2.1.0.jar" />
<include name="apache_cxf/xmlsec-2.0.0-rc1.jar" />
<include name="apache_ibatis/ibatis-2.3.0.677.jar" />
<include name="apache_ibatis/org.apache.commons.dbcp.jar" />
<include name="aspectj/aspectjrt-1.5.2a.jar" />
<include name="aspectj/aspectjweaver-1.5.2a.jar" />
<include name="jackson/jackson-core-asl-1.9.13.jar" />
<include name="jackson/jackson-jaxrs-1.9.13.jar" />
<include name="jackson/jackson-mapper-asl-1.9.13.jar" />
<include name="javax/javax.annotation-api-1.2.jar" />
<include name="javax/javax.ws.rs-api-2.0.jar" />
<include name="javax/jaxp-api-1.4.2.jar" />
<include name="jaxb/jaxb-impl-2.1.13.jar" />
<include name="jaxb/jaxb-xjc-2.1.13.jar" />

<include name="jetty/jetty-continuation-8.1.14.v20131031.jar" />
<include name="jetty/jetty-http-8.1.14.v20131031.jar" />
<include name="jetty/jetty-io-8.1.14.v20131031.jar" />
<include name="jetty/jetty-security-8.1.14.v20131031.jar" />
<include name="jetty/jetty-server-8.1.14.v20131031.jar" />
<include name="jetty/jetty-util-8.1.14.v20131031.jar" />

<include name="log4j/log4j-1.2.13.jar" />
<include name="log4j/slf4j-api-1.7.5.jar" />

<include name="oracle_jdbc/ojdbc14.jar" />

<include name="other/antlr-2.7.7.jar" />
<include name="other/commons-codec-1.9.jar" />
<include name="other/commons-lang-2.6.jar" />
<include name="other/commons-logging-1.1.1.jar" />
<include name="other/ehcache-2.7.4.jar" />
<include name="other/httpasyncclient-4.0.jar" />
<include name="other/httpclient-4.3.2.jar" />
<include name="other/httpcore-4.3.1.jar" />
<include name="other/httpcore-nio-4.3.1.jar" />
<include name="other/jasypt-1.9.0.jar" />
<include name="other/joda-time-2.2.jar" />
<include name="other/js-1.7R2.jar" />
<include name="other/mina-core-2.0.7.jar" />
<include name="other/oauth-20100527.jar" />
<include name="other/oauth-provider-20100527.jar" />
<include name="other/opensaml-2.6.0.jar" />
<include name="other/openws-1.5.0.jar" />
<include name="other/serializer-2.7.1.jar" />
<include name="other/stax2-api-3.1.1.jar" />
<include name="other/velocity-1.7.jar" />
<include name="other/woodstox-core-asl-4.2.0.jar" />
<include name="other/xmlbeans-2.6.0.jar" />
<include name="other/xml-resolver-1.2.jar" />
<include name="other/xmltooling-1.4.0.jar" />

<include name="quartz/quartz-all-1.6.0.jar" />
<include name="spring/aopalliance-1.0.jar" />

<include name="spring/spring-aop-3.2.6.RELEASE.jar" />
<!--<include name="spring/spring-asm-3.1.4.RELEASE.jar" />-->
<include name="spring/spring-beans-3.2.6.RELEASE.jar" />
<include name="spring/spring-context-3.2.6.RELEASE.jar" />
<include name="spring/spring-context-support-3.2.6.RELEASE.jar" />
<include name="spring/spring-core-3.2.6.RELEASE.jar" />
<include name="spring/spring-expression-3.2.6.RELEASE.jar" />
<include name="spring/spring-ibatis-2.0.8.jar" />
<include name="spring/spring-jdbc-3.2.6.RELEASE.jar" />
<include name="spring/spring-tx-3.2.6.RELEASE.jar" />
<include name="spring/spring-web-3.2.6.RELEASE.jar" />
<include name="spring/spring-webmvc-3.2.6.RELEASE.jar" />

<include name="xerces/xercesImpl.jar" />

</fileset>
</path>

<!--
Official Build Target
-->
<target name="buildtool" depends="local.validate">
<ant antfile="${BuildImport}/import.ant.xml" target="import.initialize" />


<path id="compile.classpath">
<fileset dir="${lib}">
<include name="apache_activemq/activemq-all-5.1.0.jar" />
<include name="apache_activemq/commons-pool-1.4.jar" />
<include name="apache_activemq/geronimo-jta_1.0.1B_spec-1.0.1.jar" />
<include name="apache_commons_coll/commons-collections-3.2.1.jar" />
<include name="apache_commons_io/commons-io-1.4.jar" />
<include name="apache_cxf/commons-lang-2.1.jar" />

<include name="apache_cxf/asm-3.3.1.jar" />
<include name="apache_cxf/commons-codec-1.9.jar" />
<include name="apache_cxf/commons-collections-3.2.1.jar" />

<include name="apache_cxf/cxf-2.0.3-incubator.jar" />
<!--<include name="apache_cxf/cxf-api-2.7.10.jar" />-->
<include name="apache_cxf/cxf-bundle-3.0.0-milestone2.jar" />
<include name="apache_cxf/cxf-core-3.0.0-milestone2.jar" />
<include name="apache_cxf/cxf-rt-frontend-jaxrs-3.0.0-milestone2.jar" />
<include name="apache_cxf/cxf-rt-transports-http-3.0.0-milestone2.jar" />
<include name="apache_cxf/wss4j-bindings-wss10-2.0.0-rc1.jar" />
<include name="apache_cxf/wss4j-bindings-wss11-2.0.0-rc1.jar" />
<include name="apache_cxf/wss4j-bindings-wssc-2.0.0-rc1.jar" />
<include name="apache_cxf/wss4j-bindings-wsu10-2.0.0-rc1.jar" />
<include name="apache_cxf/wss4j-policy-2.0.0-rc1.jar" />
<include name="apache_cxf/wss4j-ws-security-common-2.0.0-rc1.jar" />
<include name="apache_cxf/wss4j-ws-security-dom-2.0.0-rc1.jar" />
<include name="apache_cxf/wss4j-ws-security-policy-stax-2.0.0-rc1.jar" />
<include name="apache_cxf/wss4j-ws-security-stax-2.0.0-rc1.jar" />
<include name="apache_cxf/xmlbeans-2.6.0.jar" />
<include name="apache_cxf/geronimo-javamail_1.4_spec-1.7.1.jar" />
<include name="apache_cxf/geronimo-jaxws_2.2_spec-1.1.jar" />
<include name="apache_cxf/geronimo-jms_1.1_spec-1.1.1.jar" />
<include name="apache_cxf/geronimo-servlet_3.0_spec-1.0.jar" />
<include name="apache_cxf/jsr311-api-1.1.1.jar" />
<include name="apache_cxf/wsdl4j-1.6.3.jar" />
<include name="apache_cxf/xalan-2.7.0.jar" />
<include name="apache_cxf/xml-resolver-1.2.jar" />
<include name="apache_cxf/XmlSchema-1.3.2.jar" />
<include name="apache_cxf/xmlschema-core-2.1.0.jar" />
<include name="apache_cxf/xmlsec-2.0.0-rc1.jar" />
<include name="apache_ibatis/ibatis-2.3.0.677.jar" />
<include name="apache_ibatis/org.apache.commons.dbcp.jar" />
<include name="aspectj/aspectjrt-1.5.2a.jar" />
<include name="aspectj/aspectjweaver-1.5.2a.jar" />
<include name="jackson/jackson-core-asl-1.9.13.jar" />
<include name="jackson/jackson-jaxrs-1.9.13.jar" />
<include name="jackson/jackson-mapper-asl-1.9.13.jar" />
<include name="javax/javax.annotation-api-1.2.jar" />
<include name="javax/javax.ws.rs-api-2.0.jar" />
<include name="javax/jaxp-api-1.4.2.jar" />
<include name="jaxb/jaxb-impl-2.1.13.jar" />
<include name="jaxb/jaxb-xjc-2.1.13.jar" />

<include name="jetty/jetty-continuation-8.1.14.v20131031.jar" />
<include name="jetty/jetty-http-8.1.14.v20131031.jar" />
<include name="jetty/jetty-io-8.1.14.v20131031.jar" />
<include name="jetty/jetty-security-8.1.14.v20131031.jar" />
<include name="jetty/jetty-server-8.1.14.v20131031.jar" />
<include name="jetty/jetty-util-8.1.14.v20131031.jar" />

<include name="log4j/log4j-1.2.13.jar" />
<include name="log4j/slf4j-api-1.7.5.jar" />

<include name="oracle_jdbc/ojdbc14.jar" />

<include name="other/antlr-2.7.7.jar" />
<include name="other/commons-codec-1.9.jar" />
<include name="other/commons-lang-2.6.jar" />
<include name="other/commons-logging-1.1.1.jar" />
<include name="other/ehcache-2.7.4.jar" />
<include name="other/httpasyncclient-4.0.jar" />
<include name="other/httpclient-4.3.2.jar" />
<include name="other/httpcore-4.3.1.jar" />
<include name="other/httpcore-nio-4.3.1.jar" />
<include name="other/jasypt-1.9.0.jar" />
<include name="other/joda-time-2.2.jar" />
<include name="other/js-1.7R2.jar" />
<include name="other/mina-core-2.0.7.jar" />
<include name="other/oauth-20100527.jar" />
<include name="other/oauth-provider-20100527.jar" />
<include name="other/opensaml-2.6.0.jar" />
<include name="other/openws-1.5.0.jar" />
<include name="other/serializer-2.7.1.jar" />
<include name="other/stax2-api-3.1.1.jar" />
<include name="other/velocity-1.7.jar" />
<include name="other/woodstox-core-asl-4.2.0.jar" />
<include name="other/xmlbeans-2.6.0.jar" />
<include name="other/xml-resolver-1.2.jar" />
<include name="other/xmltooling-1.4.0.jar" />

<include name="quartz/quartz-all-1.6.0.jar" />
<include name="spring/aopalliance-1.0.jar" />

<include name="spring/spring-aop-3.2.6.RELEASE.jar" />
<!--<include name="spring/spring-asm-3.1.4.RELEASE.jar" />-->
<include name="spring/spring-beans-3.2.6.RELEASE.jar" />
<include name="spring/spring-context-3.2.6.RELEASE.jar" />
<include name="spring/spring-context-support-3.2.6.RELEASE.jar" />
<include name="spring/spring-core-3.2.6.RELEASE.jar" />
<include name="spring/spring-expression-3.2.6.RELEASE.jar" />
<include name="spring/spring-ibatis-2.0.8.jar" />
<include name="spring/spring-jdbc-3.2.6.RELEASE.jar" />
<include name="spring/spring-tx-3.2.6.RELEASE.jar" />
<include name="spring/spring-web-3.2.6.RELEASE.jar" />
<include name="spring/spring-webmvc-3.2.6.RELEASE.jar" />

<include name="xerces/xercesImpl.jar" />

</fileset>
</path>
...
<!-- compile sources -->
<javac destdir="${BuildMeta}/classes"
debug="on"
optimize="on"
deprecation="on"
target="1.6" source="1.6">
<src path="${BuildSrc}" />
<src path="${BuildSrc}/../generated" />
<classpath>
<path refid="compile.classpath"/>
</classpath>
</javac>

<!-- compile test classes -->
<javac destdir="${BuildMeta}/classes_test"
debug="on"
optimize="on"
deprecation="on"
target="1.6" source="1.6">
<src path="${BuildSrc}/../test"/>
<!-- skip standalone test classes -->
<exclude name="standalone/**"/>
<classpath>
<path refid="compile.classpath"/>
<path refid="compile.test.classpath" />
<pathelement location="${BuildMeta}/classes"/>
</classpath>
</javac>

<mkdir dir="${BuildMeta}/integration"/>
<!-- compile integration classes -->
<javac destdir="${BuildMeta}/integration"
debug="on"
optimize="on"
deprecation="on"
target="1.6" source="1.6">
<src path="${BuildSrc}/../integration/src"/>
<classpath>
<path refid="compile.classpath"/>
<path refid="compile.test.classpath" />
<pathelement location="${BuildMeta}/classes"/>
</classpath>
</javac>

<!-- Copy Resources to classes directory for unit test and to be included in WAR file -->

...

        <!-- Create war -->
<jar destfile="${BuildDist}/ingestion.war" basedir="${BuildMeta}/intermediate/"/>
<jar destfile="${BuildDist}/ingestion_integration_tests.jar" basedir="${BuildMeta}/integration/"/>

<!-- Create Config tar -->
<tar destfile="${BuildDist}/${BuildName}-config.tar">
<fileset dir="${BuildSrc}/../config">
<include name="**/*"/>
</fileset>
<fileset dir="${BuildSrc}/../lib/log4j">
<include name="log4j-1.2.13.jar" />
</fileset>
<fileset dir="${BuildSrc}/../lib/slf4j">
<include name="slf4j-api-1.5.0.jar" />
<include name="slf4j-log4j12-1.5.0.jar" />
</fileset>
<fileset dir="${BuildSrc}/../lib/oracle_jdbc">
<include name="ojdbc14.jar" />
</fileset>
<fileset dir="${BuildSrc}/../install">
<include name="install.xml" />
</fileset>
<fileset dir="${BuildSrc}/../resources/jetty">
<include name="webdefault.xml" />
</fileset>
</tar>

<tar destfile="${BuildDist}/integrationIngestionFiles.tar">
<fileset dir="${BuildSrc}/../integration/feeds">
<include name="**/*"/>
</fileset>
</tar>

<!-- run unit tests if property is set to true -->
<condition property="SkipTests">
<not>
<equals arg1="true" arg2="${BuildTest}" casesensitive="false" trim="true"/>
</not>
</condition>

<antcall target="testtool" />
</target>
...

<!--
Start a local intance of Jetty, build and deploy the war.
-->
<target name="local.deploy" depends="local.validate">
<property name="jetty.folder" value="jetty-8"/>
<property name="jetty.dir" value="${BuildSrc}/../../tools/${jetty.folder}" />

<!-- verify jetty is there -->

<available file="${jetty.dir}" type="dir" property="jetty.present"/>
<fail unless="jetty.present" message="Unable to locate the jetty instance at ${jetty.dir}"/>

<antcall target="buildtool"/>
<delete file="${jetty.dir}/webapps/ingestion.war"/>
<copy file="${BuildDist}/ingestion.war" todir="${jetty.dir}/webapps" />
<!-- datasource configuration -->
<copy file="${BuildSrc}/../lib/oracle_jdbc/ojdbc14.jar" todir="${jetty.dir}/lib" />
<copy file="${BuildSrc}/../config/dev/jetty-datasource.xml" todir="${jetty.dir}/etc" overwrite="true"/>
<!-- logging configuration -->
<copy file="${BuildSrc}/../lib/slf4j/slf4j-api-1.5.0.jar" todir="${jetty.dir}/lib" />
<copy file="${BuildSrc}/../lib/slf4j/slf4j-log4j12-1.5.0.jar" todir="${jetty.dir}/lib" />
<copy file="${BuildSrc}/../lib/log4j/log4j-1.2.13.jar" todir="${jetty.dir}/lib" />
<copy overwrite="true" file="${BuildSrc}/../config/log4j.xml" todir="${jetty.dir}/resources" />
<copy overwrite="true" todir="${jetty.dir}/resources/transform" >
<fileset dir="${BuildSrc}/../resources/transform" includes="**"/>
</copy>
<!-- external environmental server property configuration -->
<copy overwrite="true" file="${BuildSrc}/../config/${service.properties.file}" tofile="${jetty.dir}/resources/contentService.properties" />

<!-- start jetty -->
<antcall target="local.run"/>
</target>

<!--
Start a local intance of Jetty
-->
<target name="local.run" depends="local.validate" unless="local.run.no">
<property name="jetty.folder" value="jetty-8"/>
<property name="jetty.dir" value="${BuildSrc}/../../tools/${jetty.folder}" />

<!-- Set this propery to -ea to enable asserts -->
<property name="java.assert" value="-da" />

<!-- Set to "-Dcom.sun.management.jmxremote" to be able to connect to jvm using jconsole -->
<property name="java.use_jmx" value="-Dcom.sun.management.jmxremote"/>

<!-- Set to "-agentlib:hprof=heap=all,format=b" to profile java heap -->
<!-- You must stop the java instance (see local.stop) rather than kill it as the profile info is written on exit -->
<!-- see <jetty home>/java.hprof or java.hprof.txt for profile info -->
<property name="java.heapprofile" value=""/>

<!-- Set to "-XX:+HeapDumpOnOutOfMemoryError" to have profile dumped when first OutOfMemoryError is thrown -->
<property name="java.memorydump" value=""/>

<!-- Set to "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8000" to allow attach of debugger -->
<property name="java.debug" value=""/>

<available file="${jetty.dir}" type="dir" property="jetty.present"/>
<fail unless="jetty.present" message="Unable to locate the jetty instance at ${jetty.dir}"/>

<!-- start jetty -->
<java dir="${jetty.dir}"
jar="${jetty.dir}/start.jar"
fork="true"
failonerror="true"
maxmemory="128m" >
<classpath>
<pathelement location="${jetty.dir}/start.jar"/>
<pathelement path="${java.class.path}"/>
</classpath>

<jvmarg value="-Djetty.port=8080"/>
<jvmarg value="-DSTOP.KEY=cdv"/>
<jvmarg value="-DSTOP.PORT=8079"/>

<!-- See above properties for descriptions -->
<jvmarg value="${java.assert}"/>
<jvmarg value="${java.use_jmx}"/>

<!-- Args to allow for remote debugging -->
<jvmarg value="-Xdebug" />
<jvmarg value="-Xrunjdwp:transport=dt_socket,address=8585,server=y,suspend=n" />

<!--
Empty properties causes Unix Main class not found error in java, leave these commented out unless used.
<jvmarg value="${java.heapprofile}"/>
<jvmarg value="${java.memorydump}"/>
<jvmarg value="${java.debug}"/>
-->
<arg line="etc/jetty.xml etc/jetty-plus.xml etc/jetty-datasource.xml" />
</java>
</target>


...

</project>

最佳答案

如果您添加指向您的 pom.xmlbuild.xml 或您使用的任何依赖管理的链接,这将非常有帮助。

  • 你列出了 cxf-2.0.3-incubator.jar 我觉得很奇怪。
  • cxf-rt-frontend-jaxrs-2.7.10.jar 确实有一个 org.apache.cxf.service.factory.AbstractServiceFactoryBean 类和一个 sendEvent(FactoryBeanListener.Event ev, Object ... args) 方法

-> 你的类路径中有不同版本的 AbstractServiceFactoryBean

关于java - NoSuchMethodError : org. apache.cxf.jaxrs.JAXRSServiceFactoryBean.sendEvent,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22970073/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com