java.lang.NoClassDefFoundError:AmqpProviderFactory.createProvider中的org / apache / qpid / proton / engine / Collector

时间:2019-03-27 14:16:07

标签: java azure gradle amqp

我在qpid-jms-client-0.40.0.jar中的AmqpProviderFactory.createProvider处抛出以下异常

java.lang.NoClassDefFoundError: org/apache/qpid/proton/engine/Collector
    at org.apache.qpid.jms.provider.amqp.AmqpProviderFactory.createProvider(AmqpProviderFactory.java:69) ~[qpid-jms-client-0.40.0.jar:?]
    at org.apache.qpid.jms.provider.amqp.AmqpProviderFactory.createProvider(AmqpProviderFactory.java:31) ~[qpid-jms-client-0.40.0.jar:?]
    at org.apache.qpid.jms.provider.ProviderFactory.create(ProviderFactory.java:103) ~[qpid-jms-client-0.40.0.jar:?]
    at org.apache.qpid.jms.provider.ProviderFactory.create(ProviderFactory.java:82) ~[qpid-jms-client-0.40.0.jar:?]
    at org.apache.qpid.jms.JmsConnectionFactory.createProvider(JmsConnectionFactory.java:332) ~[qpid-jms-client-0.40.0.jar:?]
    at org.apache.qpid.jms.JmsConnectionFactory.createConnection(JmsConnectionFactory.java:203) ~[qpid-jms-client-0.40.0.jar:?]
    at org.apache.qpid.jms.JmsConnectionFactory.createConnection(JmsConnectionFactory.java:194) ~[qpid-jms-client-0.40.0.jar:?]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_131]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_131]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_131]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_131]
    at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333) ~[spring-aop-4.3.13.RELEASE.jar:4.3.13.RELEASE]
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207) ~[spring-aop-4.3.13.RELEASE.jar:4.3.13.RELEASE]
    at com.sun.proxy.$Proxy715.createConnection(Unknown Source) ~[?:?]
    at org.springframework.jms.connection.SingleConnectionFactory.doCreateConnection(SingleConnectionFactory.java:365) ~[spring-jms-4.3.13.RELEASE.jar:4.3.13.RELEASE]
    at org.springframework.jms.connection.SingleConnectionFactory.initConnection(SingleConnectionFactory.java:305) ~[spring-jms-4.3.13.RELEASE.jar:4.3.13.RELEASE]
    at org.springframework.jms.connection.SingleConnectionFactory.getConnection(SingleConnectionFactory.java:283) ~[spring-jms-4.3.13.RELEASE.jar:4.3.13.RELEASE]
    at org.springframework.jms.connection.SingleConnectionFactory.createConnection(SingleConnectionFactory.java:224) ~[spring-jms-4.3.13.RELEASE.jar:4.3.13.RELEASE]
    at org.springframework.jms.support.JmsAccessor.createConnection(JmsAccessor.java:180) ~[spring-jms-4.3.13.RELEASE.jar:4.3.13.RELEASE]
    at org.springframework.jms.listener.DefaultMessageListenerContainer.refreshConnectionUntilSuccessful(DefaultMessageListenerContainer.java:928) ~[spring-jms-4.3.13.RELEASE.jar:4.3.13.RELEASE]
    at org.springframework.jms.listener.DefaultMessageListenerContainer.recoverAfterListenerSetupFailure(DefaultMessageListenerContainer.java:899) ~[spring-jms-4.3.13.RELEASE.jar:4.3.13.RELEASE]
    at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:1077) ~[spring-jms-4.3.13.RELEASE.jar:4.3.13.RELEASE]
    at java.lang.Thread.run(Thread.java:748) [?:1.8.0_131]

我在类路径中有一些依赖项

  • qpid-jms-client:0.40.0
  • 质子-j:0.31.0
  • azure-eventhubs:2.2.0

我还应该添加其他依赖项以使其起作用吗?

1 个答案:

答案 0 :(得分:0)

质子事件收集器类是已经存在了很多年的proton-j库的相当基本的一部分,所以我的猜测是您的类路径上没有您认为应该使用的库。失败表明无法找到它,唯一的原因应该是该库根本不存在。