You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-user@db.apache.org by Suraj Batuwana <sb...@virtusa.com> on 2006/11/06 04:21:43 UTC

Failed to start database with Derby/Websphere

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 
6.0.2.5 with derby10.2.1.6. I have used IBM JDK 1.4.2 which comes with my
Websphere

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
Source)
	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
Source)
	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
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java(Compiled
Code))
	at java.lang.reflect.Constructor.newInstance(Constructor.java(Compiled
Code))
	at
com.ibm.websphere.rsadapter.GenericDataStoreHelper.mapExceptionHelper(GenericDataStoreHelper.java:501)
	at
com.ibm.websphere.rsadapter.GenericDataStoreHelper.mapException(GenericDataStoreHelper.java:544)
	at
com.ibm.ws.rsadapter.spi.WSRdbDataSource.getPooledConnection(WSRdbDataSource.java:1037)

I have used the follings to create websphere derby datasource
	implementing class    
"org.apache.derby.jdbc.EmbeddedConnectionPoolDataSource"
	implementing class for XA     "org.apache.derby.jdbc.EmbeddedXADataSource"
	dataSource Helper Class Name    
"com.ibm.websphere.rsadapter.DerbyDataStoreHelper"
	


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
correctly. 

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 ?


Thanks,
Suraj
-- 
View this message in context: http://www.nabble.com/Failed-to-start-database-with-Derby-Websphere-tf2580192.html#a7192747
Sent from the Apache Derby Users mailing list archive at Nabble.com.


Re: Failed to start database with Derby/Websphere

Posted by Suraj Batuwana <sb...@virtusa.com>.
Hi Rajesh,
	I am not using one database from the cliet and the datasource.
	
	Yes , I understand for Embedded a Derby database can be booted only from a
single JVM. 
	And that cause the problem for my errors(I have later found out)
	
	But according to my application requirement I can't used the Network
Server. 
	
	According to some mailing groups this issue is not a bug but known problem
which can be improved.
	
	If it is so it will be much help full for my application.
-Suraj

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 
> 6.0.2.5 with derby10.2.1.6. I have used IBM JDK 1.4.2 which comes with my
> Websphere
> 
> 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
> Source)
> 	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
> Source)
> 	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
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java(Compiled
> Code))
> 	at java.lang.reflect.Constructor.newInstance(Constructor.java(Compiled
> Code))
> 	at
> com.ibm.websphere.rsadapter.GenericDataStoreHelper.mapExceptionHelper(GenericDataStoreHelper.java:501)
> 	at
> com.ibm.websphere.rsadapter.GenericDataStoreHelper.mapException(GenericDataStoreHelper.java:544)
> 	at
> com.ibm.ws.rsadapter.spi.WSRdbDataSource.getPooledConnection(WSRdbDataSource.java:1037)
> 
> I have used the follings to create websphere derby datasource
> 	implementing class    
> "org.apache.derby.jdbc.EmbeddedConnectionPoolDataSource"
> 	implementing class for XA    
> "org.apache.derby.jdbc.EmbeddedXADataSource"
> 	dataSource Helper Class Name    
> "com.ibm.websphere.rsadapter.DerbyDataStoreHelper"
> 	
> 
> 
> 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
> correctly. 
> 
> 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 ?
> 
> 
> Thanks,
> Suraj
> 

-- 
View this message in context: http://www.nabble.com/Failed-to-start-database-with-Derby-Websphere-tf2580192.html#a7211964
Sent from the Apache Derby Users mailing list archive at Nabble.com.


Re: Failed to start database with Derby/Websphere

Posted by Rajesh Kartha <ka...@gmail.com>.
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 
>6.0.2.5 with derby10.2.1.6. I have used IBM JDK 1.4.2 which comes with my
>Websphere
>
>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
>Source)
>	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
>Source)
>	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
>sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java(Compiled
>Code))
>	at java.lang.reflect.Constructor.newInstance(Constructor.java(Compiled
>Code))
>	at
>com.ibm.websphere.rsadapter.GenericDataStoreHelper.mapExceptionHelper(GenericDataStoreHelper.java:501)
>	at
>com.ibm.websphere.rsadapter.GenericDataStoreHelper.mapException(GenericDataStoreHelper.java:544)
>	at
>com.ibm.ws.rsadapter.spi.WSRdbDataSource.getPooledConnection(WSRdbDataSource.java:1037)
>
>I have used the follings to create websphere derby datasource
>	implementing class    
>"org.apache.derby.jdbc.EmbeddedConnectionPoolDataSource"
>	implementing class for XA     "org.apache.derby.jdbc.EmbeddedXADataSource"
>	dataSource Helper Class Name    
>"com.ibm.websphere.rsadapter.DerbyDataStoreHelper"
>	
>
>
>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
>correctly. 
>
>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 ?
>
>
>Thanks,
>Suraj
>  
>
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. 

-Rajesh