activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <james.strac...@gmail.com>
Subject Re: Apparent Spring/Xbean Incompatibility
Date Wed, 21 Jun 2006 15:56:09 GMT
Spring 2.x broke the xbean-spring feature in ActiveMQ due to some
internal API changes so you need to use the latest greatest
xbean-spring jars for working with Spring 2.x.. IIRC there's a release
of xbean-spring 2.4 coming shortly which should work with Spring 2.x
(M5 or later)

As soon as there's a release of xbean-spring out we should probably do
a new patch release of ActiveMQ


On 6/21/06, Tom Purcell <tpurcell@chariotsolutions.com> wrote:
>
> I've been working with the new JMS functionality in 2.0 rc1 and trying to run
> an ActiveMQ broker embedded in Tomcat. In trying to do that I got the
> following stack trace.
>
> org.springframework.beans.factory.BeanDefinitionStoreException: Error
> registering bean with name 'brokerService' defined in ServletContext
> resource [/WEB-INF/applicationContext-JMS.xml]: Class that bean class
> [org.apache.activemq.xbean.BrokerFactoryBean] depends on not found; nested
> exception is java.lang.NoClassDefFoundError Caused by:
> java.lang.NoClassDefFoundError at
> org.apache.activemq.xbean.BrokerFactoryBean.class$(BrokerFactoryBean.java:42)
> at
> org.apache.activemq.xbean.BrokerFactoryBean.<clinit>(BrokerFactoryBean.java:45)
> at java.lang.Class.forName0(Native Method) at
> java.lang.Class.forName(Class.java:242) at
> org.springframework.util.ClassUtils.forName(ClassUtils.java:160) at
> org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:320)
> at
> org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:903)
> at
> org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:138)
> at
> org.springframework.context.support.AbstractApplicationContext.getBeanNamesForType(AbstractApplicationContext.java:652)
> at
> org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:382)
> at
> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:314)
> at
> org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:156)
> at
> org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246)
> at
> org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:184)
> at
> org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
> at
> org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3727)
> at org.apache.catalina.core.StandardContext.start(StandardContext.java:4162)
> at
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
> at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
> at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524) at
> org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:603)
> at
> org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:535)
> at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:470) at
> org.apache.catalina.startup.HostConfig.start(HostConfig.java:1118) at
> org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
> at
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
> at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1020) at
> org.apache.catalina.core.StandardHost.start(StandardHost.java:718) at
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012) at
> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442) at
> org.apache.catalina.core.StandardService.start(StandardService.java:450) at
> org.apache.catalina.core.StandardServer.start(StandardServer.java:700) at
> org.apache.catalina.startup.Catalina.start(Catalina.java:551) 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:585) at
> org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:275) at
> org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) Caused by:
> java.lang.ClassNotFoundException:
> org.apache.xbean.spring.context.impl.URIEditor at
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1352)
> at
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1198)
> at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) at
> java.lang.Class.forName0(Native Method) at
> java.lang.Class.forName(Class.java:164) ... 39 more
>
> In searching the ActiveMQ forums I found the solution was to use the
> xbean-spring-2.2.jar. So I added that to my lib directory and then I got:
>
> 2006-06-20 18:10:33,375 ERROR main
> [org.springframework.web.context.ContextLoader] - <Context initialization
> failed> org.springframework.beans.factory.BeanCreationException: Error
> creating bean with name 'brokerService' defined in ServletContext resource
> [/WEB-INF/applicationContext-JMS.xml]: Invocation of init method failed;
> nested exception is java.lang.NoClassDefFoundError:
> org/springframework/beans/factory/xml/DefaultXmlBeanDefinitionParser Caused
> by: java.lang.NoClassDefFoundError:
> org/springframework/beans/factory/xml/DefaultXmlBeanDefinitionParser at
> org.apache.xbean.spring.context.ResourceXmlApplicationContext.loadBeanDefinitions(ResourceXmlApplicationContext.java:87)
> at
> org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:89)
> at
> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:278)
> at
> org.apache.xbean.spring.context.ResourceXmlApplicationContext.<init>(ResourceXmlApplicationContext.java:64)
> at
> org.apache.xbean.spring.context.ResourceXmlApplicationContext.<init>(ResourceXmlApplicationContext.java:52)
> at
> org.apache.activemq.xbean.BrokerFactoryBean.afterPropertiesSet(BrokerFactoryBean.java:76)
> at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:901)
> at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:870)
> at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:393)
> at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:257)
> at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:168)
> at
> org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:253)
> at
> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:332)
> at
> org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:156)
> at
> org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246)
> at
> org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:184)
> at
> org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
> at
> org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3727)
> at org.apache.catalina.core.StandardContext.start(StandardContext.java:4162)
> at
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
> at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
> at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524) at
> org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:603)
> at
> org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:535)
> at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:470) at
> org.apache.catalina.startup.HostConfig.start(HostConfig.java:1118) at
> org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
> at
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
> at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1020) at
> org.apache.catalina.core.StandardHost.start(StandardHost.java:718) at
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012) at
> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442) at
> org.apache.catalina.core.StandardService.start(StandardService.java:450) at
> org.apache.catalina.core.StandardServer.start(StandardServer.java:700) at
> org.apache.catalina.startup.Catalina.start(Catalina.java:551) 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:585) at
> org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:275) at
> org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
>
> I've been downloading the Spring RC1 snapshots and building over the last
> month and I'm currently using build 50. DefaultXmlBeanDefinitionParser is
> not in the source tree. I checked 54 and its not there either but i did find
> it in build 20. So I  guessed it would be okay to just copy what's in 20
> over to 50 and re-build. I was wrong. I got compile errors about it not
> overriding abstract methods and the use of a deprecated API.
>
> So it appears its a version incompatibility problem between
> Spring/Xbean/ActiveMQ. I'm not sure where to go from here. I'll post the
> information on the various forums. If anyone has any suggestions I'd
> appreciate it.
>
> Thanks
> Tom
> --
> View this message in context: http://www.nabble.com/Apparent-Spring-Xbean-Incompatibility-t1824385.html#a4975798
> Sent from the ActiveMQ - User forum at Nabble.com.
>
>


-- 

James
-------
http://radio.weblogs.com/0112098/

Mime
View raw message