Return-Path: Delivered-To: apmail-geronimo-activemq-users-archive@www.apache.org Received: (qmail 49768 invoked from network); 21 Dec 2006 22:13:36 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 21 Dec 2006 22:13:36 -0000 Received: (qmail 96337 invoked by uid 500); 21 Dec 2006 22:13:43 -0000 Delivered-To: apmail-geronimo-activemq-users-archive@geronimo.apache.org Received: (qmail 96247 invoked by uid 500); 21 Dec 2006 22:13:42 -0000 Mailing-List: contact activemq-users-help@geronimo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: activemq-users@geronimo.apache.org Delivered-To: mailing list activemq-users@geronimo.apache.org Received: (qmail 96232 invoked by uid 99); 21 Dec 2006 22:13:42 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 21 Dec 2006 14:13:42 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of lists@nabble.com designates 72.21.53.35 as permitted sender) Received: from [72.21.53.35] (HELO talk.nabble.com) (72.21.53.35) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 21 Dec 2006 14:13:30 -0800 Received: from [72.21.53.38] (helo=jubjub.nabble.com) by talk.nabble.com with esmtp (Exim 4.50) id 1GxWA2-0002UC-5f for activemq-users@geronimo.apache.org; Thu, 21 Dec 2006 14:13:10 -0800 Message-ID: <8015952.post@talk.nabble.com> Date: Thu, 21 Dec 2006 14:13:10 -0800 (PST) From: mar1394 To: activemq-users@geronimo.apache.org Subject: Re: Kaha persistence configuration - Unsatisfied dependency exception In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: Martha.D.DeMore@jpl.nasa.gov References: <8000319.post@talk.nabble.com> X-Virus-Checked: Checked by ClamAV on apache.org fyi, Using dir="file://../activemq-data" in activemq.xml did not work. Using dir="${activemq.base}/activemq-data" did work. I was able to load the kaha adapter. -Marti DeMore Philip Southam wrote: > > mar1394 writes: > >> >> >> I am using the 4.1.0 incubator version of ActiveMQ. I am trying to >> configure >> Kaha persistence. I have this in activemq.xml: >> >> >> >> >> >> I am running on RedHat Linux. uname -a returns: >> Linux chill.jpl.nasa.gov 2.6.9-11.ELsmp #1 SMP Fri May 20 18:26:27 EDT >> 2005 >> i686 i686 i386 GNU/Linux >> >> When I run activemq I get the exceptions below. It looks to me like the >> KahaPersistenceAdapter class expects its "dir" attribute to be a File >> object, when all that can be sent via XML is a string. >> >> ACTIVEMQ_HOME: /home/mdemore/apache-activemq-4.1.0-incubator >> Loading message broker from: xbean:activemq.xml >> ERROR: java.lang.RuntimeException: Failed to execute start task. Reason: >> org.springframework.beans.factory.BeanCreationException: Error creating >> bean >> with name 'org.apache.activemq.xbean.XBeanBrokerService' defined in class >> path resource [activemq.xml]: Cannot create inner bean '(inner bean)' >> while >> setting bean property 'persistenceAdapter'; nested exception is >> org.springframework.beans.factory.UnsatisfiedDependencyException: Error >> creating bean with name '(inner bean)#2' defined in class path resource >> [activemq.xml]: Unsatisfied dependency expressed through constructor >> argument with index 0 of type [java.io.File]: Could not convert >> constructor >> argument value [../activemq-data] to required type [java.io.File]: Failed >> to >> convert value of type [java.lang.String] to required type [java.io.File]; >> nested exception is java.lang.IllegalArgumentException: Could not >> retrieve >> File for class path resource [../activemq-data]: class path resource >> [../activemq-data] cannot be resolved to URL because it does not exist >> java.lang.RuntimeException: Failed to execute start task. Reason: >> org.springframework.beans.factory.BeanCreationException: Error creating >> bean >> with name 'org.apache.activemq.xbean.XBeanBrokerService' defined in class >> path resource [activemq.xml]: Cannot create inner bean '(inner bean)' >> while >> setting bean property 'persistenceAdapter'; nested exception is >> org.springframework.beans.factory.UnsatisfiedDependencyException: Error >> creating bean with name '(inner bean)#2' defined in class path resource >> [activemq.xml]: Unsatisfied dependency expressed through constructor >> argument with index 0 of type [java.io.File]: Could not convert >> constructor >> argument value [../activemq-data] to required type [java.io.File]: Failed >> to >> convert value of type [java.lang.String] to required type [java.io.File]; >> nested exception is java.lang.IllegalArgumentException: Could not >> retrieve >> File for class path resource [../activemq-data]: class path resource >> [../activemq-data] cannot be resolved to URL because it does not exist >> at >> org.apache.activemq.console.command.StartCommand.runTask > (StartCommand.java:70) >> at >> org.apache.activemq.console.command.AbstractCommand.execute > (AbstractCommand.java:50) >> at >> org.apache.activemq.console.command.ShellCommand.runTask > (ShellCommand.java:82) >> at >> org.apache.activemq.console.command.AbstractCommand.execute > (AbstractCommand.java:50) >> at >> org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:46) >> 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.activemq.console.Main.runTaskClass(Main.java:159) >> at org.apache.activemq.console.Main.main(Main.java:91) >> Caused by: org.springframework.beans.factory.BeanCreationException: Error >> creating bean with name 'org.apache.activemq.xbean.XBeanBrokerService' >> defined in class path resource [activemq.xml]: Cannot create inner bean >> '(inner bean)' while setting bean property 'persistenceAdapter'; nested >> exception is >> org.springframework.beans.factory.UnsatisfiedDependencyException: Error >> creating bean with name '(inner bean)#2' defined in class path resource >> [activemq.xml]: Unsatisfied dependency expressed through constructor >> argument with index 0 of type [java.io.File]: Could not convert >> constructor >> argument value [../activemq-data] to required type [java.io.File]: Failed >> to >> convert value of type [java.lang.String] to required type [java.io.File]; >> nested exception is java.lang.IllegalArgumentException: Could not >> retrieve >> File for class path resource [../activemq-data]: class path resource >> [../activemq-data] cannot be resolved to URL because it does not exist >> at >> > org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveIn > nerBeanDefinition(BeanDefinitionValueResolver.java:205) >> at >> > org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveVa > lueIfNecessary(BeanDefinitionValueResolver.java:116) >> at >> > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.ap > plyPropertyValues(AbstractAutowireCapableBeanFactory.java:955) >> at >> > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.po > pulateBean(AbstractAutowireCapableBeanFactory.java:729) >> at >> > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.cr > eateBean(AbstractAutowireCapableBeanFactory.java:416) >> at >> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject > (AbstractBeanFactory.java:245) >> at >> > org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingl > eton(DefaultSingletonBeanRegistry.java:141) >> at >> org.springframework.beans.factory.support.AbstractBeanFactory.getBean > (AbstractBeanFactory.java:242) >> at >> org.springframework.beans.factory.support.AbstractBeanFactory.getBean > (AbstractBeanFactory.java:156) >> at >> > org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstant > iateSingletons(DefaultListableBeanFactory.java:290) >> at >> org.springframework.context.support.AbstractApplicationContext.refresh > (AbstractApplicationContext.java:348) >> at >> org.apache.xbean.spring.context.ClassPathXmlApplicationContext. > (ClassPathXmlApplicationContext.java:161) >> at >> org.apache.xbean.spring.context.ClassPathXmlApplicationContext. > (ClassPathXmlApplicationContext.java:51) >> at >> org.apache.activemq.xbean.XBeanBrokerFactory.createBroker > (XBeanBrokerFactory.java:41) >> at >> org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:57) >> at >> org.apache.activemq.console.command.StartCommand.startBroker > (StartCommand.java:82) >> at >> org.apache.activemq.console.command.StartCommand.runTask > (StartCommand.java:47) >> ... 10 more >> Caused by: >> org.springframework.beans.factory.UnsatisfiedDependencyException: >> Error creating bean with name '(inner bean)#2' defined in class path >> resource [activemq.xml]: Unsatisfied dependency expressed through >> constructor argument with index 0 of type [java.io.File]: Could not >> convert >> constructor argument value [../activemq-data] to required type >> [java.io.File]: Failed to convert value of type [java.lang.String] to >> required type [java.io.File]; nested exception is >> java.lang.IllegalArgumentException: Could not retrieve File for class >> path >> resource [../activemq-data]: class path resource [../activemq-data] >> cannot >> be resolved to URL because it does not exist >> at >> > org.springframework.beans.factory.support.ConstructorResolver.createArgumentArr > ay(ConstructorResolver.java:375) >> at >> > org.springframework.beans.factory.support.ConstructorResolver.autowireConstruct > or(ConstructorResolver.java:126) >> at >> > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.au > towireConstructor(AbstractAutowireCapableBeanFactory.java:683) >> at >> > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.cr > eateBeanInstance(AbstractAutowireCapableBeanFactory.java:621) >> at >> > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.cr > eateBean(AbstractAutowireCapableBeanFactory.java:380) >> at >> > org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveIn > nerBeanDefinition(BeanDefinitionValueResolver.java:198) >> ... 26 more >> ERROR: java.lang.Exception: >> org.springframework.beans.factory.BeanCreationException: Error creating >> bean >> with name 'org.apache.activemq.xbean.XBeanBrokerService' defined in class >> path resource [activemq.xml]: Cannot create inner bean '(inner bean)' >> while >> setting bean property 'persistenceAdapter'; nested exception is >> org.springframework.beans.factory.UnsatisfiedDependencyException: Error >> creating bean with name '(inner bean)#2' defined in class path resource >> [activemq.xml]: Unsatisfied dependency expressed through constructor >> argument with index 0 of type [java.io.File]: Could not convert >> constructor >> argument value [../activemq-data] to required type [java.io.File]: Failed >> to >> convert value of type [java.lang.String] to required type [java.io.File]; >> nested exception is java.lang.IllegalArgumentException: Could not >> retrieve >> File for class path resource [../activemq-data]: class path resource >> [../activemq-data] cannot be resolved to URL because it does not exist >> java.lang.Exception: >> org.springframework.beans.factory.BeanCreationException: Error creating >> bean >> with name 'org.apache.activemq.xbean.XBeanBrokerService' defined in class >> path resource [activemq.xml]: Cannot create inner bean '(inner bean)' >> while >> setting bean property 'persistenceAdapter'; nested exception is >> org.springframework.beans.factory.UnsatisfiedDependencyException: Error >> creating bean with name '(inner bean)#2' defined in class path resource >> [activemq.xml]: Unsatisfied dependency expressed through constructor >> argument with index 0 of type [java.io.File]: Could not convert >> constructor >> argument value [../activemq-data] to required type [java.io.File]: Failed >> to >> convert value of type [java.lang.String] to required type [java.io.File]; >> nested exception is java.lang.IllegalArgumentException: Could not >> retrieve >> File for class path resource [../activemq-data]: class path resource >> [../activemq-data] cannot be resolved to URL because it does not exist >> at >> org.apache.activemq.console.command.StartCommand.runTask > (StartCommand.java:71) >> at >> org.apache.activemq.console.command.AbstractCommand.execute > (AbstractCommand.java:50) >> at >> org.apache.activemq.console.command.ShellCommand.runTask > (ShellCommand.java:82) >> at >> org.apache.activemq.console.command.AbstractCommand.execute > (AbstractCommand.java:50) >> at >> org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:46) >> 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.activemq.console.Main.runTaskClass(Main.java:159) >> at org.apache.activemq.console.Main.main(Main.java:91) >> Caused by: org.springframework.beans.factory.BeanCreationException: Error >> creating bean with name 'org.apache.activemq.xbean.XBeanBrokerService' >> defined in class path resource [activemq.xml]: Cannot create inner bean >> '(inner bean)' while setting bean property 'persistenceAdapter'; nested >> exception is >> org.springframework.beans.factory.UnsatisfiedDependencyException: Error >> creating bean with name '(inner bean)#2' defined in class path resource >> [activemq.xml]: Unsatisfied dependency expressed through constructor >> argument with index 0 of type [java.io.File]: Could not convert >> constructor >> argument value [../activemq-data] to required type [java.io.File]: Failed >> to >> convert value of type [java.lang.String] to required type [java.io.File]; >> nested exception is java.lang.IllegalArgumentException: Could not >> retrieve >> File for class path resource [../activemq-data]: class path resource >> [../activemq-data] cannot be resolved to URL because it does not exist >> at >> > org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveIn > nerBeanDefinition(BeanDefinitionValueResolver.java:205) >> at >> > org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveVa > lueIfNecessary(BeanDefinitionValueResolver.java:116) >> at >> > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.ap > plyPropertyValues(AbstractAutowireCapableBeanFactory.java:955) >> at >> > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.po > pulateBean(AbstractAutowireCapableBeanFactory.java:729) >> at >> > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.cr > eateBean(AbstractAutowireCapableBeanFactory.java:416) >> at >> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject > (AbstractBeanFactory.java:245) >> at >> > org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingl > eton(DefaultSingletonBeanRegistry.java:141) >> at >> org.springframework.beans.factory.support.AbstractBeanFactory.getBean > (AbstractBeanFactory.java:242) >> at >> org.springframework.beans.factory.support.AbstractBeanFactory.getBean > (AbstractBeanFactory.java:156) >> at >> > org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstant > iateSingletons(DefaultListableBeanFactory.java:290) >> at >> org.springframework.context.support.AbstractApplicationContext.refresh > (AbstractApplicationContext.java:348) >> at >> org.apache.xbean.spring.context.ClassPathXmlApplicationContext. > (ClassPathXmlApplicationContext.java:161) >> at >> org.apache.xbean.spring.context.ClassPathXmlApplicationContext. > (ClassPathXmlApplicationContext.java:51) >> at >> org.apache.activemq.xbean.XBeanBrokerFactory.createBroker > (XBeanBrokerFactory.java:41) >> at >> org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:57) >> at >> org.apache.activemq.console.command.StartCommand.startBroker > (StartCommand.java:82) >> at >> org.apache.activemq.console.command.StartCommand.runTask > (StartCommand.java:47) >> ... 10 more >> Caused by: >> org.springframework.beans.factory.UnsatisfiedDependencyException: >> Error creating bean with name '(inner bean)#2' defined in class path >> resource [activemq.xml]: Unsatisfied dependency expressed through >> constructor argument with index 0 of type [java.io.File]: Could not >> convert >> constructor argument value [../activemq-data] to required type >> [java.io.File]: Failed to convert value of type [java.lang.String] to >> required type [java.io.File]; nested exception is >> java.lang.IllegalArgumentException: Could not retrieve File for class >> path >> resource [../activemq-data]: class path resource [../activemq-data] >> cannot >> be resolved to URL because it does not exist >> at >> > org.springframework.beans.factory.support.ConstructorResolver.createArgumentArr > ay(ConstructorResolver.java:375) >> at >> > org.springframework.beans.factory.support.ConstructorResolver.autowireConstruct > or(ConstructorResolver.java:126) >> at >> > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.au > towireConstructor(AbstractAutowireCapableBeanFactory.java:683) >> at >> > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.cr > eateBeanInstance(AbstractAutowireCapableBeanFactory.java:621) >> at >> > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.cr > eateBean(AbstractAutowireCapableBeanFactory.java:380) >> at >> > org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveIn > nerBeanDefinition(BeanDefinitionValueResolver.java:198) >> ... 26 more >> > > > I'm currently using the following in my conf/activemq.xml and it works > fine. > > > > > > > > > Cheers, > Philip > > > > -- View this message in context: http://www.nabble.com/Kaha-persistence-configuration---Unsatisfied-dependency-exception-tf2862903.html#a8015952 Sent from the ActiveMQ - User mailing list archive at Nabble.com.