activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Shannon <christopher.l.shan...@gmail.com>
Subject Re: activemq-all-5.13.1.jar vs activemq-all-5.10.0.jar
Date Mon, 14 Mar 2016 16:39:38 GMT
There's a ClassNotFoundException on a Spring class,
org.springframework.messaging.support.HeaderMapper.

Looks like that class  is part of a new jar file introduced in version
4.0.x and above. I can put in a Jira to add that jar for future releases
but for now you will need to add the jar manually to your classpath., Ex:

<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-messaging</artifactId>
<version>4.1.9.RELEASE</version>
</dependency>


On Mon, Mar 14, 2016 at 9:28 AM, Pawan Kumar <pawankrmodi@gmail.com> wrote:

> I am receiving below error when using activemq-all-5.13.1 but same worked
> fine with activemq-all-5.10.0.jar. Please let me know how to fix this issue
> with latest jar.
>
> Please reply ASAP
>
> Thanks in advance.
> Pawan.
>
> run:
>      [java] Exception in thread "main"
> java.lang.ExceptionInInitializerError
>      [java]     at
>
> com.abc.xyz.cie.serviceinterface.impl.ServiceLocator.getcieEngineBean(ServiceLocator.java:25)
>      [java]     at com.abc.xyz.cie.engine.cieEngine.main(cieEngine.java:19)
>      [java] Caused by:
> org.springframework.beans.factory.BeanCreationException: Error creating
> bean
> with name 'listener' defined in class path resource [cie-service.xml]:
> Instantiation of bean failed; nested exception is
> org.springframework.beans.BeanInstantiationException: Failed to instantiate
> [org.springframework.jms.listener.adapter.MessageListenerAdapter]:
> Constructor threw exception; nested exception is
> java.lang.NoClassDefFoundError:
> org/springframework/messaging/support/HeaderMapper
>      [java]     at
>
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1099)
>      [java]     at
>
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1044)
>      [java]     at
>
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:504)
>      [java]     at
>
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)
>      [java]     at
>
> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303)
>      [java]     at
>
> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
>      [java]     at
>
> org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299)
>      [java]     at
>
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
>      [java]     at
>
> org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:755)
>      [java]     at
>
> org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:762)
>      [java]     at
>
> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:480)
>      [java]     at
>
> org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
>      [java]     at
>
> org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:93)
>      [java]     at
> com.abc.xyz.cie.spring.BeanLocator.init(BeanLocator.java:67)
>      [java]     at
> com.abc.xyz.cie.spring.BeanLocator.<clinit>(BeanLocator.java:62)
>      [java]     ... 2 more
>      [java] Caused by:
> org.springframework.beans.BeanInstantiationException:
> Failed to instantiate
> [org.springframework.jms.listener.adapter.MessageListenerAdapter]:
> Constructor threw exception; nested exception is
> java.lang.NoClassDefFoundError:
> org/springframework/messaging/support/HeaderMapper
>      [java]     at
> org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:163)
>      [java]     at
>
> org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:89)
>      [java]     at
>
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1092)
>      [java]     ... 16 more
>      [java] Caused by: java.lang.NoClassDefFoundError:
> org/springframework/messaging/support/HeaderMapper
>      [java]     at java.lang.ClassLoader.defineClass1(Native Method)
>      [java]     at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
>      [java]     at
> java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
>      [java]     at
> java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
>      [java]     at
> java.net.URLClassLoader.access$100(URLClassLoader.java:71)
>      [java]     at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
>      [java]     at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
>      [java]     at java.security.AccessController.doPrivileged(Native
> Method)
>      [java]     at
> java.net.URLClassLoader.findClass(URLClassLoader.java:354)
>      [java]     at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
>      [java]     at
> sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
>      [java]     at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
>      [java]     at
>
> org.springframework.jms.listener.adapter.AbstractAdaptableMessageListener.<init>(AbstractAdaptableMessageListener.java:65)
>      [java]     at
>
> org.springframework.jms.listener.adapter.MessageListenerAdapter.<init>(MessageListenerAdapter.java:138)
>      [java]     at
> sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>      [java]     at
>
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
>      [java]     at
>
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
>      [java]     at
> java.lang.reflect.Constructor.newInstance(Constructor.java:526)
>      [java]     at
> org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:147)
>      [java]     ... 18 more
>      [java] Caused by: java.lang.ClassNotFoundException:
> org.springframework.messaging.support.HeaderMapper
>      [java]     at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
>      [java]     at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
>      [java]     at java.security.AccessController.doPrivileged(Native
> Method)
>      [java]     at
> java.net.URLClassLoader.findClass(URLClassLoader.java:354)
>      [java]     at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
>      [java]     at
> sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
>      [java]     at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
>      [java]     ... 37 more
>
> BUILD FAILED
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/activemq-all-5-13-1-jar-vs-activemq-all-5-10-0-jar-tp4709258.html
> Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message