activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zzcat <evo...@gmail.com>
Subject Re: ActiveMq integration with Spring 2.5
Date Wed, 26 May 2010 02:48:07 GMT

Hi Gary , even if I updated my spring to 2.5.6 , I still got the same error.
Here is my stack trace. It says can't find
"org.springframework.transaction.support.TransactionSynchronizationUtils.sameResourceFactory"

actually this method does exist in 2.5.5. I guess there're some other
issues. 

10:23:49 ERROR Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name
'org.springframework.jms.listener.DefaultMessageListenerContainer#0' defined
in ServletContext resource
[/WEB-INF/config/spring/component/applicationContext-jms-activemq5.xml]:
Invocation of init method failed; nested exception is
java.lang.NoSuchMethodError:
org.springframework.transaction.support.TransactionSynchronizationUtils.sameResourceFactory(Lorg/springframework/transaction/support/ResourceTransactionManager;Ljava/lang/Object;)Z
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1338)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
	at java.security.AccessController.doPrivileged(Native Method)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
	at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
	at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
	at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
	at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
	at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
	at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)
	at
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)
	at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)
	at
org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)
	at
org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)
	at
org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)
	at
com.suzsoft.framework.spring.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:23)
	at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3827)
	at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4334)
	at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
	at
org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920)
	at
org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883)
	at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
	at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
	at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
	at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
	at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
	at org.apache.catalina.core.StandardService.start(StandardService.java:516)
	at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: java.lang.NoSuchMethodError:
org.springframework.transaction.support.TransactionSynchronizationUtils.sameResourceFactory(Lorg/springframework/transaction/support/ResourceTransactionManager;Ljava/lang/Object;)Z
	at
org.springframework.jms.listener.AbstractPollingMessageListenerContainer.initialize(AbstractPollingMessageListenerContainer.java:191)
	at
org.springframework.jms.listener.DefaultMessageListenerContainer.initialize(DefaultMessageListenerContainer.java:459)
	at
org.springframework.jms.listener.AbstractJmsListeningContainer.afterPropertiesSet(AbstractJmsListeningContainer.java:134)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1369)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1335)
	... 40 more
May 26, 2010 10:23:49 AM org.apache.catalina.core.StandardContext
listenerStart
SEVERE: Exception sending context initialized event to listener instance of
class com.suzsoft.framework.spring.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name
'org.springframework.jms.listener.DefaultMessageListenerContainer#0' defined
in ServletContext resource
[/WEB-INF/config/spring/component/applicationContext-jms-activemq5.xml]:
Invocation of init method failed; nested exception is
java.lang.NoSuchMethodError:
org.springframework.transaction.support.TransactionSynchronizationUtils.sameResourceFactory(Lorg/springframework/transaction/support/ResourceTransactionManager;Ljava/lang/Object;)Z
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1338)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
	at java.security.AccessController.doPrivileged(Native Method)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
	at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
	at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
	at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
	at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
	at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
	at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)
	at
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)
	at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)
	at
org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)
	at
org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)
	at
org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)
	at
com.suzsoft.framework.spring.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:23)
	at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3827)
	at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4334)
	at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
	at
org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920)
	at
org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883)
	at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
	at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
	at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
	at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
	at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
	at org.apache.catalina.core.StandardService.start(StandardService.java:516)
	at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: java.lang.NoSuchMethodError:
org.springframework.transaction.support.TransactionSynchronizationUtils.sameResourceFactory(Lorg/springframework/transaction/support/ResourceTransactionManager;Ljava/lang/Object;)Z
	at
org.springframework.jms.listener.AbstractPollingMessageListenerContainer.initialize(AbstractPollingMessageListenerContainer.java:191)
	at
org.springframework.jms.listener.DefaultMessageListenerContainer.initialize(DefaultMessageListenerContainer.java:459)
	at
org.springframework.jms.listener.AbstractJmsListeningContainer.afterPropertiesSet(AbstractJmsListeningContainer.java:134)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1369)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1335)
	... 40 more





Gary Tully wrote:
> 
> that class should be in spring-jms - btw 5.3.2 was build/tested with
> spring
> 2.5.6
> 
> On 25 May 2010 14:52, zzcat <evolye@gmail.com> wrote:
> 
>>
>> I am using ActiveMq 5.32 with Spring 2.5.5.  I use pretty generic
>> configuration, as long as I include the
>> jmsTransactionManager in DefaultMessageListenerContainer, Spring throw an
>> error on start up:
>>
>> "Error creating bean with name
>> 'org.springframework.jms.listener.DefaultMessageListenerContainer#0'"
>>
>> Without the transactionManager attribute , this works fine, but when I
>> add
>> 10 message to the message queue, a transaction exception will occur.
>>
>> Part of my configurations :
>>
>> <bean
>> class="org.springframework.jms.listener.DefaultMessageListenerContainer">
>>                <property name="connectionFactory" ref="connectionFactory"
>> />
>>                <property name="destination" ref="emailDestination" />
>>                <property name="messageListener" ref="emailServiceMDP" />
>>                <property name="transactionManager"
>> ref="jmsTransactionManager" />
>> </bean>
>>
>> <bean id="jmsTransactionManager"
>> class="org.springframework.jms.connection.JmsTransactionManager">
>>                <property name="connectionFactory" ref="connectionFactory"
>> />
>> </bean>
>>
>> Does this version of Spring and Activemq has some know issues in
>> integration
>> ? Or do I need additional libs to get jmsTransactionManager to work ?
>> --
>> View this message in context:
>> http://old.nabble.com/ActiveMq-integration-with-Spring-2.5-tp28668647p28668647.html
>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>
>>
> 
> 
> -- 
> http://blog.garytully.com
> 
> Open Source Integration
> http://fusesource.com
> 
> 

-- 
View this message in context: http://old.nabble.com/ActiveMq-integration-with-Spring-2.5-tp28668647p28675837.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message