Home  >  Forum  >  Spring
Post New Query

ClassNotFoundException: javax.management.j2ee.statistics.Stats


joined on
November 18,2013
Asked on August 02,2014
java.lang.NoClassDefFoundError: javax/management/j2ee/statistics/Stats
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:188)
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:586)
... 30 common frames omitted
Caused by: java.lang.NoClassDefFoundError: javax/management/j2ee/statistics/Stats
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at org.springframework.boot.autoconfigure.jms.activemq.ActiveMQProperties.createActiveMQConnectionFactory(ActiveMQProperties.java:114)
at org.springframework.boot.autoconfigure.jms.activemq.ActiveMQProperties.createConnectionFactory(ActiveMQProperties.java:100)
at org.springframework.boot.autoconfigure.jms.activemq.ActiveMQConnectionFactoryConfiguration.jmsConnectionFactory

(ActiveMQConnectionFactoryConfiguration.java:42)
at org.springframework.boot.autoconfigure.jms.activemq.ActiveMQConnectionFactoryConfiguration$$EnhancerBySpringCGLIB$$b7a031fd.CGLIB$jmsConnectionFactory$0

(<generated>)
at org.springframework.boot.autoconfigure.jms.activemq.ActiveMQConnectionFactoryConfiguration$$EnhancerBySpringCGLIB$$b7a031fd$$FastClassBySpringCGLIB$

$624a618b.invoke(<generated>)
at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:312)
at org.springframework.boot.autoconfigure.jms.activemq.ActiveMQConnectionFactoryConfiguration$$EnhancerBySpringCGLIB$$b7a031fd.jmsConnectionFactory

(<generated>)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:166)
... 31 common frames omitted
Caused by: java.lang.ClassNotFoundException: javax.management.j2ee.statistics.Stats
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 56 common frames omitted


Hi I running spring and JMS application and stuck with above error. Any clue?
joined on
March 14,2013
Replied on August 02,2014

Hi, You need to configure activemq api.
Use gradle 

org.apache.activemq:activemq-all:5.3.1

or maven

<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-broker</artifactId>
<version>5.10.0</version>
</dependency>

Write Answer









Copyright ©2017 concretepage.com, all rights reserved |Privacy Policy | Contact Us