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: Using embedded broker with spring in activemq 4.0.1
Date Tue, 11 Jul 2006 10:48:08 GMT
It looks like you have hit a regression in Spring 2.0-RC2. The
xbean-spring integration tests work perfectly for 2.0-m5 and 2.0-rc1
but fail on 2.0-rc2 with the exception you got. I've just patched
xbeans-spring to fix this bug, so when 2.5 is released of xbean-spring
it should work fine for you on Spring 2.0-rc2.

So I recommend you use 2.0-rc1 of spring which works fine with 2.4 of
xbean-spring and ActiveMQ 4.1-SNAPSHOT.

James

On 7/10/06, MassDosage <massdosage@gmail.com> wrote:
>
> Thanks for the quick reponses! OK. I tried the snapshot from July 10 which
> looks like it was built against Spring 2.0M5. This seems to deploy ok in
> tomcat (no errors on startup). So far, so good.
>
> However, when I try Spring 2.0 RC1 I get the familiar stack trace again:
>
> 2006-07-10 21:38:35,429 ERROR
> org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:205)
> Context initialization failed
> org.springframework.beans.factory.BeanCreationException: Error creating bean
> with name 'brokerContainer' defined in ServletContext resource
> [/WEB-INF/applicationContext-messaging.xml]: Invocation of init method
> failed; nested exception is
> org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected
> exception parsing XML document from class path resource [activemq.xml];
> nested exception is java.lang.IllegalArgumentException: Unable to locate
> NamespaceHandler for namespace URI [http://activemq.org/config/1.0]
> Caused by:
> org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected
> exception parsing XML document from class path resource [activemq.xml];
> nested exception is java.lang.IllegalArgumentException: Unable to locate
> NamespaceHandler for namespace URI [http://activemq.org/config/1.0]
> Caused by:
> java.lang.IllegalArgumentException: Unable to locate NamespaceHandler for
> namespace URI [http://activemq.org/config/1.0]
>         at
> org.springframework.beans.factory.xml.DefaultNamespaceHandlerResolver.resolve(DefaultNamespaceHandlerResolver.java:141)
>         at
> org.apache.xbean.spring.context.v2.XBeanNamespaceHandlerResolver.resolve(XBeanNamespaceHandlerResolver.java:30)
>         at
> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1077)
>         at
> org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:140)
>         at
> org.apache.xbean.spring.context.v2.XBeanBeanDefinitionDocumentReader.parseBeanDefinitions(XBeanBeanDefinitionDocumentReader.java:39)
>
> etc....
>
> Spring 2.0 RC2 has just come out so I thought I'd try that instead, and then
> I get a really weird error on startup:
>
> 6-07-10 21:34:56,341 ERROR
> org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:205)
> Context initialization failed
> org.springframework.beans.factory.BeanCreationException: Error creating bean
> with name 'brokerContainer' defined in ServletContext resource
> [/WEB-INF/applicationContext-messaging.xml]: Invocation of init method
> failed; nested exception is
> org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected
> exception parsing XML document from class path resource [activemq.xml];
> nested exception is java.lang.IllegalArgumentException: ClassLoader must not
> be null
> Caused by:
> org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected
> exception parsing XML document from class path resource [activemq.xml];
> nested exception is java.lang.IllegalArgumentException: ClassLoader must not
> be null
> Caused by:
> java.lang.IllegalArgumentException: ClassLoader must not be null
>         at org.springframework.util.Assert.notNull(Assert.java:113)
>         at
> org.springframework.beans.factory.xml.DefaultNamespaceHandlerResolver.<init>(DefaultNamespaceHandlerResolver.java:82)
>         at
> org.springframework.beans.factory.xml.DefaultNamespaceHandlerResolver.<init>(DefaultNamespaceHandlerResolver.java:74)
>         at
> org.apache.xbean.spring.context.v2.XBeanNamespaceHandlerResolver.<init>(XBeanNamespaceHandlerResolver.java:26)
>         at
> org.apache.xbean.spring.context.v2.XBeanXmlBeanDefinitionReader.createDefaultNamespaceHandlerResolver(XBeanXmlBeanDefinitionReader.java:81)
>         at
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.createReaderContext(XmlBeanDefinitionReader.java:496)
>         at
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:476)
>         at
> org.apache.xbean.spring.context.v2.XBeanXmlBeanDefinitionReader.registerBeanDefinitions(XBeanXmlBeanDefinitionReader.java:77)
>         at
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:386)
>         at
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:340)
>         at
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:315)
>         at
> org.apache.xbean.spring.context.ResourceXmlApplicationContext.loadBeanDefinitions(ResourceXmlApplicationContext.java:106)
>         at
> org.apache.xbean.spring.context.ResourceXmlApplicationContext.loadBeanDefinitions(ResourceXmlApplicationContext.java:99)
>         at
> org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:89)
>         at
> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:283)
>         at
> org.apache.xbean.spring.context.ResourceXmlApplicationContext.<init>(ResourceXmlApplicationContext.java:65)
>         at
> org.apache.xbean.spring.context.ResourceXmlApplicationContext.<init>(ResourceXmlApplicationContext.java:53)
>         at
> org.apache.activemq.xbean.BrokerFactoryBean.afterPropertiesSet(BrokerFactoryBean.java:76)
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:908)
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:875)
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:396)
>         at
> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:240)
>         at
> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:132)
>         at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:237)
>         at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:153)
>         at
> org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:248)
>         at
> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:337)
>         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)
>
> etc.
>
> Have you managed to get Active MQ working with one of the RC's from Spring
> 2.0?
>
>
> --
> View this message in context: http://www.nabble.com/Using-embedded-broker-with-spring-in-activemq-4.0.1-tf1836224.html#a5257547
> Sent from the ActiveMQ - User forum at Nabble.com.
>
>


-- 

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

Mime
View raw message