我在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]
我在类路径中有一些依赖项是
为了使它起作用,我还应该添加其他依赖项吗?
最佳答案
质子事件收集器类是已经存在多年的proton-j库的相当基本的一部分,所以我的猜测是您的类路径上没有您认为应该的类库。故障表明无法找到它,唯一的原因应该是该库根本不存在。
关于java - java.lang.NoClassDefFoundError:AmqpProviderFactory.createProvider中的org/apache/qpid/proton/engine/Collector,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/55379432/