java – 嵌入式ActiveMQ代理需要哪些依赖项?
发布时间:2020-12-15 00:57:57 所属栏目:Java 来源:网络整理
导读:我正在尝试使用嵌入式ActiveMQ代理进行单元测试,如下所述: http://activemq.apache.org/how-to-unit-test-jms-code.html 我需要包含哪些Maven依赖项?目前我有这些: dependency groupIdjavax/groupId artifactIdjavaee-api/artifactId version6.0/version
我正在尝试使用嵌入式ActiveMQ代理进行单元测试,如下所述:
http://activemq.apache.org/how-to-unit-test-jms-code.html
我需要包含哪些Maven依赖项?目前我有这些: <dependency> <groupId>javax</groupId> <artifactId>javaee-api</artifactId> <version>6.0</version> <scope>provided</scope> </dependency> <dependency> <groupId>org.apache.activemq</groupId> <artifactId>activemq-core</artifactId> <version>5.5.0</version> </dependency> 这就是我得到的: java.lang.ClassFormatError: Absent Code attribute in method that is not native or abstract in class file javax/jms/JMSException 尝试实例化代理时: final BrokerService broker = new BrokerService(); 我还应该在Maven依赖项列表中添加什么? (我不使用Spring) 解决方法
解决方案很简单,只需要删除javax:javaee-api依赖项.
(编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |