Hi,
just tested it
this should be enough
org.apache.activemq
activemq-core
5.3.1
org.springframework
spring
2.5.6
org.apache.xbean
xbean-spring
3.6
to include a broker. The osgi should be included in the classpath as
ActiveMQ dependency. If it is not, add it such as
org.osgi
org.osgi.core
4.1.0
Cheers
--
Dejan Bosanac - http://twitter.com/dejanb
Open Source Integration - http://fusesource.com/
ActiveMQ in Action - http://www.manning.com/snyder/
Blog - http://www.nighttale.net
On Thu, May 6, 2010 at 10:09 AM, Travers Snyman
wrote:
>
> Yes I have tried this with 5.3.1 and get the same error
>
> Instantiation of bean failed; nested exception is org.springf
> ramework.beans.BeanInstantiationException: Could not instantiate bean class
> [org.apache.activemq.xbean.XBeanBrokerService]: Constructor threw
> exception;
> nested exception is java.lang.NoClassDefFoundError:
> org/osgi/framework/BundleException
> at
>
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:883)
> at
>
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:839)
> at
>
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:440)
> 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)
>
> Dejan Bosanac wrote:
> >
> > Hi,
> >
> > can you try
> >
> >
> > org.apache.activemq
> > activemq-all
> > 5.3.1
> >
> >
> > Cheers
> > --
> > Dejan Bosanac - http://twitter.com/dejanb
> >
> > Open Source Integration - http://fusesource.com/
> > ActiveMQ in Action - http://www.manning.com/snyder/
> > Blog - http://www.nighttale.net
> >
> >
> > On Thu, May 6, 2010 at 9:11 AM, Travers Snyman
> > wrote:
> >
> >>
> >> I am unable to get the right configuration for an embedded broker to
> >> start
> >> configuring with spring.
> >>
> >> In my pom.xml I have the following dependancy for activemq
> >>
> >> org.apache.activemq
> >> activemq-core
> >> 5.3.2
> >>
> >>
> >> My Jms-context.xml contains the following for the broker
> >>
> >>
> >> useJmx="false"
> >> persistent="true">
> >>
> >>
> >> >> directory="d:\activemq\data"
> >> maxFileLength="32mb"/>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >> I get the following exception when building:
> >>
> >>
> >> Project ID: null:geronimo-j2ee-management_1.0_spec:jar:1.0
> >>
> >> Reason: Cannot find parent: org.apache.geronimo.specs:specs for project:
> >> null:geronimo-j2ee-management_1.0_spec:jar:1.0 for project
> >> null:geronimo-j2ee-management_1.0_spec:jar:1.0
> >>
> >> I also tried with activemq-all in the pom instead of activemq-core
> >>
> >> ... 21 more
> >> Caused by: org.springframework.beans.BeanInstantiationException: Could
> >> not
> >> instantiate bean class [org.apache.activemq.xbean.XBeanBrokerService]:
> >> Constructor threw exception; nested exception is
> >> java.lang.NoClassDefFoundError: org/osgi/framework/BundleException
> >> at
> >> org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:115)
> >> at
> >>
> >>
> org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:61)
> >> at
> >>
> >>
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:877)
> >> ... 38 more
> >> Caused by: java.lang.NoClassDefFoundError:
> >> org/osgi/framework/BundleException
> >> at
> >>
> >>
> org.apache.activemq.xbean.XBeanBrokerService.(XBeanBrokerService.java:57)
> >> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> >> Method)
> >> at
> >>
> >>
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
> >> at
> >>
> >>
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
> >> at
> java.lang.reflect.Constructor.newInstance(Constructor.java:513)
> >>
> >> I am at a loss as to the configuration. Do I need other dependencies in
> >> the
> >> pom ?
> >>
> >>
> >> --
> >> View this message in context:
> >>
> http://old.nabble.com/Unable-to-configure-embedded-broker-activemq-5.3.x-tp28470056p28470056.html
> >> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
> >>
> >>
> >
> >
> > -----
> > Dejan Bosanac
> >
> > Open Source Integration - http://fusesource.com/
> > ActiveMQ in Action - http://www.manning.com/snyder/
> > Blog - http://www.nighttale.net
> >
>
> --
> View this message in context:
> http://old.nabble.com/Unable-to-configure-embedded-broker-activemq-5.3.x-tp28470056p28470468.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>