Error handling: java.lang.NoClassDefFoundError: javax / jms / JMSContext

The reason is that small packages, the need to increase reliance in pom file
<dependency>
    <groupId>javax.jms</groupId>
    <artifactId>javax.jms-api</artifactId>
    <version>2.0.1</version>
</dependency>

The introduction of sub-projects:

        <!--activemq-all-->
        <dependency>
            <groupId>org.apache.activemq</groupId>
            <artifactId>activemq-all</artifactId>
        </dependency>
        <!--必须引入,否则会提示错误java.lang.ClassNotFoundException: javax.jms.JMSContext-->
        <!-- https://mvnrepository.com/artifact/javax.jms/javax.jms-api -->
        <dependency>
            <groupId>javax.jms</groupId>
            <artifactId>javax.jms-api</artifactId>
        </dependency>

 

Guess you like

Origin www.cnblogs.com/116970u/p/11469878.html