You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by mar1394 <Ma...@jpl.nasa.gov> on 2006/12/21 00:51:05 UTC
Kaha persistence configuration - Unsatisfied dependency exception
I am using the 4.1.0 incubator version of ActiveMQ. I am trying to configure
Kaha persistence. I have this in activemq.xml:
<persistenceAdapter>
<kahaPersistenceAdapter dir="../activemq-data" />
</persistenceAdapter>
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.resolveInnerBeanDefinition(BeanDefinitionValueResolver.java:205)
at
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:116)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:955)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:729)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:416)
at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:245)
at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(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.preInstantiateSingletons(DefaultListableBeanFactory.java:290)
at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:348)
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
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.createArgumentArray(ConstructorResolver.java:375)
at
org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:126)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:683)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:621)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
at
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBeanDefinition(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.resolveInnerBeanDefinition(BeanDefinitionValueResolver.java:205)
at
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:116)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:955)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:729)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:416)
at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:245)
at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(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.preInstantiateSingletons(DefaultListableBeanFactory.java:290)
at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:348)
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
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.createArgumentArray(ConstructorResolver.java:375)
at
org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:126)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:683)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:621)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
at
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBeanDefinition(BeanDefinitionValueResolver.java:198)
... 26 more
--
View this message in context: http://www.nabble.com/Kaha-persistence-configuration---Unsatisfied-dependency-exception-tf2862903.html#a8000319
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: Kaha persistence configuration - Unsatisfied dependency
exception
Posted by Marlon Santos <ms...@exist.com>.
oh,
but it did worked for me.. anyways, its good you got it fixed...
Regards
mar1394 wrote:
>
> 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 <Ma...@...> 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:
>>>
>>> <persistenceAdapter>
>>> <kahaPersistenceAdapter dir="../activemq-data" />
>>> </persistenceAdapter>
>>>
>>> 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.<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
>>> 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.<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
>>> 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.
>>
>>
>> <persistenceAdapter>
>> <kahaPersistenceAdapter dir="${activemq.base}/activemq-data" />
>> </persistenceAdapter>
>>
>>
>>
>> Cheers,
>> Philip
>>
>>
>>
>>
>
>
--
View this message in context: http://www.nabble.com/Kaha-persistence-configuration---Unsatisfied-dependency-exception-tf2862903.html#a8018440
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: Kaha persistence configuration - Unsatisfied dependency
exception
Posted by mar1394 <Ma...@jpl.nasa.gov>.
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 <Ma...@...> 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:
>>
>> <persistenceAdapter>
>> <kahaPersistenceAdapter dir="../activemq-data" />
>> </persistenceAdapter>
>>
>> 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.<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
>> 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.<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
>> 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.
>
>
> <persistenceAdapter>
> <kahaPersistenceAdapter dir="${activemq.base}/activemq-data" />
> </persistenceAdapter>
>
>
>
> 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.
Re: Kaha persistence configuration - Unsatisfied dependency exception
Posted by Philip Southam <ps...@yahoo.com>.
mar1394 <Ma...@...> 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:
>
> <persistenceAdapter>
> <kahaPersistenceAdapter dir="../activemq-data" />
> </persistenceAdapter>
>
> 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.<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
> 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.<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
> 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.
<persistenceAdapter>
<kahaPersistenceAdapter dir="${activemq.base}/activemq-data" />
</persistenceAdapter>
Cheers,
Philip
Re: Kaha persistence configuration - Unsatisfied dependency
exception
Posted by Marlon Santos <ms...@exist.com>.
Hi,
Try changing dir="../activemq-data" to dir="file://activemq-data" or
dir="file://../activemq-data".
Regards,
Marlon
mar1394 wrote:
>
> I am using the 4.1.0 incubator version of ActiveMQ. I am trying to
> configure Kaha persistence. I have this in activemq.xml:
>
> <persistenceAdapter>
> <kahaPersistenceAdapter dir="../activemq-data" />
> </persistenceAdapter>
>
> 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.resolveInnerBeanDefinition(BeanDefinitionValueResolver.java:205)
> at
> org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:116)
> at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:955)
> at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:729)
> at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:416)
> at
> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:245)
> at
> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(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.preInstantiateSingletons(DefaultListableBeanFactory.java:290)
> at
> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:348)
> 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
> 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.createArgumentArray(ConstructorResolver.java:375)
> at
> org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:126)
> at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:683)
> at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:621)
> at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
> at
> org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBeanDefinition(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.resolveInnerBeanDefinition(BeanDefinitionValueResolver.java:205)
> at
> org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:116)
> at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:955)
> at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:729)
> at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:416)
> at
> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:245)
> at
> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(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.preInstantiateSingletons(DefaultListableBeanFactory.java:290)
> at
> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:348)
> 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
> 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.createArgumentArray(ConstructorResolver.java:375)
> at
> org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:126)
> at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:683)
> at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:621)
> at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
> at
> org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBeanDefinition(BeanDefinitionValueResolver.java:198)
> ... 26 more
>
>
>
--
View this message in context: http://www.nabble.com/Kaha-persistence-configuration---Unsatisfied-dependency-exception-tf2862903.html#a8003084
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: Kaha persistence configuration - Unsatisfied dependency
exception
Posted by drvillo <f....@gmail.com>.
I haven't had the time to see if there's a better option but
setting an absoulte path does work...
Cheers
Francesco
mar1394 wrote:
>
> I am using the 4.1.0 incubator version of ActiveMQ. I am trying to
> configure Kaha persistence. I have this in activemq.xml:
>
> <persistenceAdapter>
> <kahaPersistenceAdapter dir="../activemq-data" />
> </persistenceAdapter>
>
> 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.resolveInnerBeanDefinition(BeanDefinitionValueResolver.java:205)
> at
> org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:116)
> at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:955)
> at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:729)
> at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:416)
> at
> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:245)
> at
> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(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.preInstantiateSingletons(DefaultListableBeanFactory.java:290)
> at
> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:348)
> 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
> 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.createArgumentArray(ConstructorResolver.java:375)
> at
> org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:126)
> at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:683)
> at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:621)
> at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
> at
> org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBeanDefinition(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.resolveInnerBeanDefinition(BeanDefinitionValueResolver.java:205)
> at
> org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:116)
> at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:955)
> at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:729)
> at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:416)
> at
> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:245)
> at
> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(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.preInstantiateSingletons(DefaultListableBeanFactory.java:290)
> at
> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:348)
> 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
> 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.createArgumentArray(ConstructorResolver.java:375)
> at
> org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:126)
> at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:683)
> at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:621)
> at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
> at
> org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBeanDefinition(BeanDefinitionValueResolver.java:198)
> ... 26 more
>
>
>
--
View this message in context: http://www.nabble.com/Kaha-persistence-configuration---Unsatisfied-dependency-exception-tf2862903.html#a8033018
Sent from the ActiveMQ - User mailing list archive at Nabble.com.