You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by J_S <sa...@gmail.com> on 2015/10/12 20:19:57 UTC

Problem using derby.jdbc.EmbeddedDataSource

I'm new to ActiveMQ.

I'm trying to set up a Master/Slave configuration of ActiveMQ using embedded
derby-ds. But I have a problem configuring jdbc - brokers do not start at
all.

Here is a part of my activemq.xml related to it:
 
...
<broker>
...
   <persistenceAdapter>
            <jdbcPersistenceAdapter dataDirectory="activemq-data"
dataSource="#derby-ds"/>
   </persistenceAdapter>
...
</broker>
...
<bean id="derby-ds" class="org.apache.derby.jdbc.EmbeddedDataSource">
    <property name="databaseName" value="derbydb"/>
    <property name="createDatabase" value="create"/>
  </bean>

ActiveMQ doesn't start, in activemq.log I see the following:

| ERROR | Failed to load: class path resource [activemq.xml], reason: Error
creating bean with name 'org.apache.activemq.xbean.XBeanBrokerService#0'
defined in class path resource [activemq.xml]: Cannot create inner bean
'(inner bean)#24fbe4' of type 
[org.apache.activemq.store.jdbc.JDBCPersistenceAdapter] while setting bean
property 'persistenceAdapter'; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name '(inner bean)#24fbe4' defined in class path resource
[activemq.xml]: Cannot resolve reference to bean 'derby-ds' while setting
bean property 'dataSource'; nested exception is
org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find
class [org.apache.derby.jdbc.EmbeddedDataSource] for bean with name
'derby-ds' defined in class path resource [activemq.xml]; nested exception
is java.lang.ClassNotFoundException:
org.apache.derby.jdbc.EmbeddedDataSource |
org.apache.activemq.xbean.XBeanBrokerFactory | main

What have I to do to make it found the class needed?

Hope for help :)
Julia



--
View this message in context: http://activemq.2283324.n4.nabble.com/Problem-using-derby-jdbc-EmbeddedDataSource-tp4702854.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Problem using derby.jdbc.EmbeddedDataSource

Posted by Tim Bain <tb...@alumni.duke.edu>.
Happy to help, and I'm glad you got it working.
On Oct 12, 2015 2:31 PM, "J_S" <sa...@gmail.com> wrote:

> Thank you very mutch, Tim!
> It works now :)
> You helped me a lot as a new to java.
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/Problem-using-derby-jdbc-EmbeddedDataSource-tp4702854p4702858.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>

Re: Problem using derby.jdbc.EmbeddedDataSource

Posted by J_S <sa...@gmail.com>.
Thank you very mutch, Tim!
It works now :)
You helped me a lot as a new to java.



--
View this message in context: http://activemq.2283324.n4.nabble.com/Problem-using-derby-jdbc-EmbeddedDataSource-tp4702854p4702858.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Problem using derby.jdbc.EmbeddedDataSource

Posted by Tim Bain <tb...@alumni.duke.edu>.
I've never used Derby so I could be wrong, but I'd guess you just need the
JAR available at http://db.apache.org/derby/derby_downloads.html on the
classpath.

Tim
On Oct 12, 2015 12:30 PM, "J_S" <sa...@gmail.com> wrote:

> I'm new to ActiveMQ.
>
> I'm trying to set up a Master/Slave configuration of ActiveMQ using
> embedded
> derby-ds. But I have a problem configuring jdbc - brokers do not start at
> all.
>
> Here is a part of my activemq.xml related to it:
>
> ...
> <broker>
> ...
>    <persistenceAdapter>
>             <jdbcPersistenceAdapter dataDirectory="activemq-data"
> dataSource="#derby-ds"/>
>    </persistenceAdapter>
> ...
> </broker>
> ...
> <bean id="derby-ds" class="org.apache.derby.jdbc.EmbeddedDataSource">
>     <property name="databaseName" value="derbydb"/>
>     <property name="createDatabase" value="create"/>
>   </bean>
>
> ActiveMQ doesn't start, in activemq.log I see the following:
>
> | ERROR | Failed to load: class path resource [activemq.xml], reason: Error
> creating bean with name 'org.apache.activemq.xbean.XBeanBrokerService#0'
> defined in class path resource [activemq.xml]: Cannot create inner bean
> '(inner bean)#24fbe4' of type
> [org.apache.activemq.store.jdbc.JDBCPersistenceAdapter] while setting bean
> property 'persistenceAdapter'; nested exception is
> org.springframework.beans.factory.BeanCreationException: Error creating
> bean
> with name '(inner bean)#24fbe4' defined in class path resource
> [activemq.xml]: Cannot resolve reference to bean 'derby-ds' while setting
> bean property 'dataSource'; nested exception is
> org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find
> class [org.apache.derby.jdbc.EmbeddedDataSource] for bean with name
> 'derby-ds' defined in class path resource [activemq.xml]; nested exception
> is java.lang.ClassNotFoundException:
> org.apache.derby.jdbc.EmbeddedDataSource |
> org.apache.activemq.xbean.XBeanBrokerFactory | main
>
> What have I to do to make it found the class needed?
>
> Hope for help :)
> Julia
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/Problem-using-derby-jdbc-EmbeddedDataSource-tp4702854.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>