db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rajesh Kartha <karth...@gmail.com>
Subject Re: Failed to start database with Derby/Websphere
Date Mon, 06 Nov 2006 23:11:30 GMT
Suraj Batuwana wrote:

>Hi ,
>I have received following server side and client side(inside junit test
>classes) when I am running my application's nightly build for Websphere 
> with derby10.2.1.6. I have used IBM JDK 1.4.2 which comes with my
>I have used the org.apache.derby.jdbc.EmbeddedDriver as the jdbc driver and
>jdbc:derby:TestDB as 
>the database URL
>Client side errors from the junit test classes
>Can't connect to url=jdbc:derby:TestDB
>java.sql.SQLException: Failed to start database 'TestDB', see the next
>exception for details.
>	at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown
>	at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source)
>	at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source)
>	at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source)
>	at org.apache.derby.impl.jdbc.EmbedConnection.newSQLException(Unknown
>	at org.apache.derby.impl.jdbc.EmbedConnection.bootDatabase(Unknown Source)
>	at org.apache.derby.impl.jdbc.EmbedConnection.<init>(Unknown Source)
>	at org.apache.derby.impl.jdbc.EmbedConnection30.<init>(Unknown Source)
>	at org.apache.derby.jdbc.Driver30.getNewEmbedConnection(Unknown Source)
>	at org.apache.derby.jdbc.InternalDriver.connect(Unknown Source)
>	at org.apache.derby.jdbc.AutoloadedDriver.connect(Unknown Source)
>from the server side error was (Webphere server.log)
>Caused by: java.sql.SQLException: Failed to start database
>'E:\source\database\TestDB', see the next exception for details.DSRA0010E:
>SQL State = XJ040, Error Code = 40,000DSRA0010E: SQL State = XJ040, Error
>Code = 40,000
>	at sun.reflect.GeneratedConstructorAccessor498.newInstance(Unknown Source)
>	at
>	at java.lang.reflect.Constructor.newInstance(Constructor.java(Compiled
>	at
>	at
>	at
>I have used the follings to create websphere derby datasource
>	implementing class    
>	implementing class for XA     "org.apache.derby.jdbc.EmbeddedXADataSource"
>	dataSource Helper Class Name    
>Also I have seems that before start the tests my data source works OK with
>my database. But after the 
>error happens(In the middle of test cases), my datasource is not working
>But when I shut down my all the java processes in my machine and try to
>connect to the database it works OR
>if I restarted the Webphere and test the datasource it works.
>Also I am little bit confuse why I am getting a server side error as Failed
>to start database when i am using the 
>embaded database since embaded we do not need to start it.
>Any ideas about my issue ?
Hi Suraj,

As I understand from your mail, you are trying to use two independent 
databases  -
#1) at client, using the Embedded Driver
#2) at the server.using DataSource

What is the database location in #1 ? For # 2, looks like the db is 
located in  E:\source\database
Is it possible,  both the applications are trying to boot the same 
database - TestDB ?

*For Embedded, a Derby database can be booted only from a single JVM.  
If you want multiple JVMs to
connect to a database - use the Network Server to start the database.*

Anyways, from the exception in your mail above it seems  the database is 
already booted (by some other process or hanging Java process from
previous runs ?) , hence neither #1 nor #2  could boot the db. 


View raw message