[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Re: Getting Exception for Derby Data Source
nicolas.jouanin
do-not-reply at jboss.com
Wed Dec 20 03:05:14 EST 2006
Hi Alex,
It seems that the problem doesn't come from Derby, but from a jboss class which is not found , look at the class name : org.jboss.jdbc.DerbyDatabase
One solution i've found to deploy the datasource is to comment out the two following lines in your -ds.xml file :
| <depends>jboss:service=Derby</depends>
| ...
| <mbean code="org.jboss.jdbc.DerbyDatabase" name="jboss:service=Derby"/>
|
Here is a sample -ds.xml file:
| <?xml version="1.0" encoding="UTF-8"?>
|
| <!-- The Derby embedded database JCA connection factory config
| $Id: derby-ds.xml 25345 2004-11-03 13:29:58Z loubyansky $ -->
|
|
| <datasources>
| <local-tx-datasource>
|
| <!-- The jndi name of the DataSource, it is prefixed with java:/ -->
| <!-- Datasources are not available outside the virtual machine -->
| <jndi-name>EscapeKDS</jndi-name>
|
| <!-- for in-process persistent db, saved when jboss stops. The
| org.jboss.jdbc.DerbyDatabase mbean is necessary for properly db shutdown -->
| <connection-url>jdbc:derby:${jboss.server.data.dir}${/}derby${/}localDB;create=true</connection-url>
|
| <!-- The driver class -->
| <driver-class>org.apache.derby.jdbc.EmbeddedDriver</driver-class>
|
| <!-- The login and password -->
| <user-name>sa</user-name>
| <password></password>
|
| <!-- The minimum connections in a pool/sub-pool. Pools are lazily constructed on first use -->
| <min-pool-size>5</min-pool-size>
|
| <!-- The maximum connections in a pool/sub-pool -->
| <max-pool-size>20</max-pool-size>
|
| <!-- The time before an unused connection is destroyed -->
| <idle-timeout-minutes>5</idle-timeout-minutes>
|
| <!-- Whether to check all statements are closed when the connection is returned to the pool,
| this is a debugging feature that should be turned off in production -->
| <track-statements/>
|
| <!-- This mbean can be used when using in process persistent derby -->
| <!--
| <depends>jboss:service=Derby</depends>
| -->
| </local-tx-datasource>
|
| <!--
| <mbean code="org.jboss.jdbc.DerbyDatabase" name="jboss:service=Derby"/>
| -->
| </datasources>
|
PS : Does someone knows where to find that org.jboss.jdbc.DerbyDatabase class, and what it does ?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3995224#3995224
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3995224
More information about the jboss-user
mailing list