嵌入式ActiveMQ代理需要什么依赖关系?

| 我正在尝试使用嵌入式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
依赖项即可。     
        你可以试试
activemq-all
吗:
<dependency>
  <groupId>org.apache.activemq</groupId>
  <artifactId>activemq-all</artifactId>
  <version>5.5.0</version>
</dependency>
    
        将javaee依赖项移动到类路径的末尾。这解决了我的问题。     

要回复问题请先登录注册