activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rsitze <rsi...@gmail.com>
Subject RFH: Problem w/ BrokerFactory in Equinox/OSGi
Date Thu, 10 Sep 2009 22:50:07 GMT

Within an OSGi bundle, I have the following code.  All required bundles are
loaded & active.
Verified that the URI used here works with activemq.bat from the command
line [yes, this is under Vista].

	try {
		URI configURI = new URI("xbean:D:/Data/ActiveMQ/conf/activemq.xml");

        	broker = BrokerFactory.createBroker(configURI);
		broker.start();
	} catch (Exception e) {
		e.printStackTrace();
        	throw new Exception("failed to start MQ Broker", e);
	}


I'm getting the (caused by) exception: java.lang.ClassNotFoundException:
org.apache.xbean.spring.context.v1.XBeanXmlBeanDefinitionReader.

thrown by BrokerFactory.createBroker(...).

Th named class is not in any of the libraries packaged with activemq there
is a v2.XBeanXmlBeanDefinitionReader available, but no v1.  Put all the
spring jar files I could find from <activemq.home>/lib &
<activemq.home>/lib/optional into a "library" bundle & exposed all packages
to my bundle.  Any ideas?


*****
activemq.base='D:\Data\ActiveMQ'
activemq.home='E:\Apache\apache-activemq-5.2.0'
activemq.config='D:\Data\ActiveMQ\conf\activemq.xml'

config uri='xbean:D:/Data/ActiveMQ/conf/activemq.xml'

Sep 10, 2009 3:49:53 PM
org.springframework.context.support.AbstractApplicationContext
prepareRefresh
INFO: Refreshing
org.apache.xbean.spring.context.ResourceXmlApplicationContext@1479feb:
display name
[org.apache.xbean.spring.context.ResourceXmlApplicationContext@1479feb];
startup date [Thu Sep 10 15:49:53 CDT 2009]; root of context hierarchy
failed to start MQ Broker
java.lang.IllegalStateException: Could not find valid implementation for:
1.2.8
	at
org.apache.xbean.spring.context.impl.XBeanHelper.createBeanDefinitionReader(XBeanHelper.java:48)
	at
org.apache.xbean.spring.context.ResourceXmlApplicationContext.loadBeanDefinitions(ResourceXmlApplicationContext.java:94)
	at
org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:123)
	at
org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:423)
	at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:353)
	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.XBeanBrokerFactory.createApplicationContext(XBeanBrokerFactory.java:96)
	at
org.apache.activemq.xbean.XBeanBrokerFactory.createBroker(XBeanBrokerFactory.java:52)
	at
org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:71)
	at
org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:54)
	at com.levade.cq.cbus.activeMQ.CBus.activate(CBus.java:88)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at
org.eclipse.equinox.internal.ds.model.ServiceComponent.activate(ServiceComponent.java:206)
	at
org.eclipse.equinox.internal.ds.model.ServiceComponentProp.activate(ServiceComponentProp.java:140)
	at
org.eclipse.equinox.internal.ds.model.ServiceComponentProp.build(ServiceComponentProp.java:330)
	at
org.eclipse.equinox.internal.ds.InstanceProcess.buildComponent(InstanceProcess.java:560)
	at
org.eclipse.equinox.internal.ds.InstanceProcess.buildComponents(InstanceProcess.java:182)
	at
org.eclipse.equinox.internal.ds.Resolver.buildNewlySatisfied(Resolver.java:393)
	at
org.eclipse.equinox.internal.ds.Resolver.enableComponents(Resolver.java:176)
	at
org.eclipse.equinox.internal.ds.SCRManager.performWork(SCRManager.java:786)
	at
org.eclipse.equinox.internal.ds.SCRManager$QueuedJob.dispatch(SCRManager.java:753)
	at org.eclipse.equinox.internal.ds.WorkThread.run(WorkThread.java:88)
	at
org.eclipse.equinox.internal.util.impl.tpt.threadpool.Executor.run(Executor.java:70)
Caused by: java.lang.ClassNotFoundException:
org.apache.xbean.spring.context.v1.XBeanXmlBeanDefinitionReader
	at
org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:489)
	at
org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:405)
	at
org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:393)
	at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:105)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at java.lang.ClassLoader.loadClassInternal(Unknown Source)
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Unknown Source)
	at
org.apache.xbean.spring.context.impl.XBeanHelper.createBeanDefinitionReader(XBeanHelper.java:44)
	... 26 more

-- 
View this message in context: http://www.nabble.com/RFH%3A-Problem-w--BrokerFactory-in-Equinox-OSGi-tp25392287p25392287.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message