Return-Path: Delivered-To: apmail-activemq-users-archive@www.apache.org Received: (qmail 50321 invoked from network); 6 May 2010 14:17:13 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 6 May 2010 14:17:13 -0000 Received: (qmail 66240 invoked by uid 500); 6 May 2010 14:17:13 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 66204 invoked by uid 500); 6 May 2010 14:17:13 -0000 Mailing-List: contact users-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@activemq.apache.org Delivered-To: mailing list users@activemq.apache.org Received: (qmail 66180 invoked by uid 99); 6 May 2010 14:17:12 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 May 2010 14:17:12 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,SPF_HELO_PASS,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 May 2010 14:17:08 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1OA1se-0008Gd-3o for users@activemq.apache.org; Thu, 06 May 2010 07:16:48 -0700 Message-ID: <28474278.post@talk.nabble.com> Date: Thu, 6 May 2010 07:16:48 -0700 (PDT) From: Travers Snyman To: users@activemq.apache.org Subject: Re: Unable to configure embedded broker activemq 5.3.x In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: travers.snyman@epiuse.com References: <28470056.post@talk.nabble.com> <28470468.post@talk.nabble.com> Hi Dejan, The osgi dependency in the pom did the trick. It however seems the connection factory starts before the broker is started completely. It gets stuck running a test suite with the following: WARN [main] AMQPersistenceAdapter.lock(1036) | Waiting to Lock the Store d:\activemq\data 06 May 2010 4:09:14 PM net.sf.ehcache.util.UpdateChecker checkForUpdate WARNING: Update check failed: java.net.ConnectException: Connection timed out: connect My connection and jms config as follows. I believe there was a waitBefore start property in 5.2. Can you suggest any other config changes to the below ? Dejan Bosanac wrote: > > 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"/> >> >> >> >> >> >> >> >> > uri="tcp://localhost:61616"/> >> >> >> >> >> >> >> >> >> >> 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. >> >> > > > ----- > 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-tp28470056p28474278.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.