activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adrian Co <...@exist.com>
Subject Re: ClassNotFoundException: bean trying to start an embedded broker
Date Wed, 30 Aug 2006 09:29:57 GMT
Hi,

Try moving the xmlns to the broker bean:
i.e. <broker brokerName="broker" persistent="false" useJmx="false" 
xmlns="http://activemq.org/config/1.0">


Manuel Teira wrote:
> Hello.
> I'm trying to test an ActiveMQ compiled from the svn repository 
> (trunk). I have a working scenario under ActiveMQ 4.0-RC2 and 4.0.1 
> that is no longer working under the trunk version. It seems that 
> spring is no longer understanding the 'bean' or something so.
>
> I've replaced the jars:
>
> activemq-core-4.0-RC2.jar
> backport-util-concurrent-2.1.jar
> xbean-spring-2.2.jar
> activeio-core-3.0-beta1.jar
> spring-1.2.4.jar
>
> with:
> *
> **activeio-core-3.0-SNAPSHOT.jar
> backport-util-concurrent-2.1.jar
> activemq-core-4.1-incubator-SNAPSHOT.jar
> spring-2.0-rc1.jar
> xbean-spring-2.6-SNAPSHOT.jar*
>
> But it throws an exception:
>
> [ERROR][2006/08/30.10:55:30.176][main]Error starting JMSBroker: 
> org.springframework.beans.factory.BeanDefinitionStoreException: 
> Unexpected exception parsing XML document from URL 
> [file://localhost//opt/planb/cells/jms/etc/jmsconfig.xml]; nested 
> exception is 
> org.springframework.beans.factory.BeanDefinitionStoreException: Failed 
> to load type: bean. Reason: java.lang.ClassNotFoundException: bean; 
> nested exception is java.lang.ClassNotFoundException: bean
> Caused by: 
> org.springframework.beans.factory.BeanDefinitionStoreException: Failed 
> to load type: bean. Reason: java.lang.ClassNotFoundException: bean; 
> nested exception is java.lang.ClassNotFoundException: bean
> Caused by: java.lang.ClassNotFoundException: bean
>         at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
>         at es.tid.planb.core.ClassPLoader.findClass(ClassPLoader.java:249)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
>         at es.tid.planb.core.ClassPLoader.loadClass(ClassPLoader.java:219)
>         at 
> org.apache.xbean.spring.context.v2.XBeanQNameHelper.loadClass(XBeanQNameHelper.java:107)
>         at 
> org.apache.xbean.spring.context.v2.XBeanQNameHelper.getBeanInfo(XBeanQNameHelper.java:72)
>         at 
> org.apache.xbean.spring.context.v2.XBeanQNameHelper.coerceNamespaceAwarePropertyValues(XBeanQNameHelper.java:54)
>         at 
> org.apache.xbean.spring.context.v2.XBeanBeanDefinitionParserDelegate.parseBeanDefinitionElement(XBeanBeanDefinitionParserDelegate.java:61)
>         at 
> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseBeanDefinitionElement(BeanDefinitionParserDelegate.java:380)
>         at 
> org.apache.xbean.spring.context.v2.XBeanNamespaceHandler.parseBeanFromExtensionElement(XBeanNamespaceHandler.java:205)
>         at 
> org.apache.xbean.spring.context.v2.XBeanNamespaceHandler.parseBeanFromExtensionElement(XBeanNamespaceHandler.java:253)
>         at 
> org.apache.xbean.spring.context.v2.XBeanNamespaceHandler.parse(XBeanNamespaceHandler.java:153)
>         at 
> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1084)
>         at 
> org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:140)
>         at 
> org.apache.xbean.spring.context.v2.XBeanBeanDefinitionDocumentReader.parseBeanDefinitions(XBeanBeanDefinitionDocumentReader.java:39)
>         at 
> org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:93)
>         at 
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:486)
>         at 
> org.apache.xbean.spring.context.v2.XBeanXmlBeanDefinitionReader.registerBeanDefinitions(XBeanXmlBeanDefinitionReader.java:79)
>         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.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:126)
>         at 
> org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:142)
>         at 
> org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:168)
>         at 
> org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:113)
>         at 
> org.apache.xbean.spring.context.ClassPathXmlApplicationContext.loadBeanDefinitions(ClassPathXmlApplicationContext.java:180)
>         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.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:161)
>         at 
> org.apache.xbean.spring.context.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:51)
>         at 
> org.apache.activemq.xbean.XBeanBrokerFactory.createBroker(XBeanBrokerFactory.java:41)
>         at es.tid.planb.spci.jmsbroker.CJMSBroker.init(CJMSBroker.java:58)
>         at es.tid.planb.shell.Shell.start(Shell.java:325)
>         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.commons.daemon.support.DaemonLoader.start(DaemonLoader.java:177)
>
> The configuration file I'm using is:
>
> <beans xmlns="http://activemq.org/config/1.0">
>   <broker brokerName="testJMS"
>           persistent="true"
>           useShutdownHook="false"
>           deleteAllMessagesOnStartup="false">
>     <transportConnectors>
>       <transportConnector uri="tcp://localhost:61635"/>
>       <transportConnector uri="stomp://trabucco.hi.inet:65000"/>
>     </transportConnectors>
>
>     <persistenceAdapter>
>       <journaledJDBC useJournal="false" dataSource="#jdbc-ds">
>       </journaledJDBC>
>     </persistenceAdapter>
>
>     <jmsBridgeConnectors>
>       <jmsQueueConnector outboundQueueConnectionFactory="#REMOTE">
>       <outboundQueueBridges>
>         <outboundQueueBridge outboundQueueName="SUNRECV"/>
>       </outboundQueueBridges>
>       <inboundQueueBridges>
>         <inboundQueueBridge inboundQueueName="SUNSEND"/>
>       </inboundQueueBridges>
>       </jmsQueueConnector>
>     </jmsBridgeConnectors>
>
>
>   </broker>
>
>   <bean id="jdbc-ds"
>         class="org.apache.commons.dbcp.BasicDataSource"
>         destroy-method="close">
>     <property name="driverClassName" 
> value="oracle.jdbc.driver.OracleDriver"/>
>     <property name="url" value="jdbc:oracle:oci:user/pass@sid"/>
>     <property name="poolPreparedStatements" value="true"/>
>   </bean>
>
>   <bean id="REMOTE"
>         class="es.tid.planb.spci.sunmq.ConnectionFactoryBean">
>     <property name="brokerHostName" value="localhost"/>
>     <property name="brokerHostPort" value="7676"/>
>   </bean>
>
> </beans>
>
>
> Is there any change in the configuration I'm not aware of? Or perhaps 
> I'm missing some jar or the version of someone is not right?
>
> Thanks a lot.
>
> Regards.
>
>
>
>


Mime
View raw message