db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Suraj Batuwana" <sbatuw...@virtusa.com>
Subject FW: Error when executing query:com.ibm.websphere.ce.cm.StaleConnectionException: Meta-data for Container org.apache.derby.impl.store.raw.data.RAFContainer@6fd148fc could not be accessed
Date Fri, 17 Nov 2006 05:21:48 GMT
This is an issue forwards to derby uses group. But I thought it is
better to acknowledge developer group as well since I believe it is
something to do with derby internal architecture.

Please follow the mailing loop

 

Regards,

Surajs

 

________________________________

From: Suraj Batuwana 
Sent: Friday, November 17, 2006 10:22 AM
To: 'derby-user@db.apache.org'
Subject: RE: Error when executing
query:com.ibm.websphere.ce.cm.StaleConnectionException: Meta-data for
Container org.apache.derby.impl.store.raw.data.RAFContainer@6fd148fc
could not be accessed

 

I have found what might be the root cause of the actual problem which
causes errors given in my last mail.

 

            In my application there are 1000+ tables and 200+ views and
each table has its own index. There is a particular view which uses 322
other tables and views like as 

 

create view vwDerbyBaseView (id,repos_object_id, created_by_user,
creation_timestamp,modified_by_user) 

AS select
t.id,t.repos_object_id,t.created_by_user,t.creation_timestamp,t.modified
_by_user from samplederydatabase t

            union all select
t0.id,t0.repos_object_id,t0.created_by_user,t0.creation_timestamp,t0.mod
ified_by_user from samplederydatabase t0

            union all select
t1.id,t1.repos_object_id,t1.created_by_user,t1.creation_timestamp,t1.mod
ified_by_user from samplederydatabase1 t1

 
........................................................................
........................................................................
.................................

 
........................................................................
........................................................................
.................................

 
........................................................................
........................................................................
.................................

 
........................................................................
........................................................................
.................................

 
........................................................................
........................................................................
.................................

union all select t322.id, t322.repos_object_id, t322.created_by_user,
t322.creation_timestamp, t322.modified_by_user from samplederydatabase1
t322

 

            I have execute the simple select on this particular view as
SELECT * FROM vwDerbyBaseView using a small java client for all the
derby modes (Embedded and Network)

            Then the same error Meta-data for Container
org.apache.derby.impl.store.raw.data.RAFContainer@6fd148fc could not be
accessed was given in the derby.log

 

            But when create the view less than 312 tables and views and
then try to do a select it will works with out any issue.

 

            Note: In my application every table and a view used for the
given view has s7 columns.

            

Since there are large number of tables, indexes and views in my
application it is very difficult to re-create the same issue with and
generic example

 

I would like to know if anyone knows what might cause this to error  
 
Regards,
Suraj
________________________________


From: Suraj Batuwana 
Sent: Wednesday, November 15, 2006 12:53 PM
To: 'derby-user@db.apache.org'
Subject: Error when executing
query:com.ibm.websphere.ce.cm.StaleConnectionException: Meta-data for
Container org.apache.derby.impl.store.raw.data.RAFContainer@6fd148fc
could not be accessed

 

I'm getting the following fun stack trace (in attached derby.log) when
using embedded network server derby 10.2.1.6 and was would like to know
if anyone knows what might cause this to error.
I am using IBM JDK 1.4.2 with the Websphere 6.0.2.5 as the application
server on Windows XP with service pack 2. Error comes when I run my
applications unit test cases.
 
I am getting following client side errors from my junit test cases as 
 
Error when executing
query:com.ibm.websphere.ce.cm.StaleConnectionException: Meta-data for
Container org.apache.derby.impl.store.raw.data.RAFContainer@6fd148fc
could not be accessed
junit.framework.AssertionFailedError: Error when executing
query:com.ibm.websphere.ce.cm.StaleConnectionException: Meta-data for
Container org.apache.derby.impl.store.raw.data.RAFContainer@6fd148fc
could not be accessed
 
Other than that I am seeing some of the errors from websphere server.log
as 
[11/15/06 11:04:47:738 IST] 0000002c SystemErr     R
java.sql.SQLException: Failed to start database
'E:\Cloud_Branch\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.GeneratedConstructorAccessor243.newInstance(Unknown
Source)
    at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingCons
tructorAccessorImpl.java(Compiled Code))
    at
java.lang.reflect.Constructor.newInstance(Constructor.java(Compiled
Code))
    at
com.ibm.websphere.rsadapter.GenericDataStoreHelper.mapExceptionHelper(Ge
nericDataStoreHelper.java:501)
    at
com.ibm.websphere.rsadapter.GenericDataStoreHelper.mapException(GenericD
ataStoreHelper.java:544)
    at
com.ibm.ws.rsadapter.spi.WSRdbDataSource.getPooledConnection(WSRdbDataSo
urce.java:1037)
    at
com.ibm.ws.rsadapter.spi.WSManagedConnectionFactoryImpl.createManagedCon
nection(WSManagedConnectionFactoryImpl.java:957)
    at
com.ibm.ejs.j2c.poolmanager.FreePool.createManagedConnectionWithMCWrappe
r(FreePool.java:1551)
    at
com.ibm.ejs.j2c.poolmanager.FreePool.createOrWaitForConnection(FreePool.
java:1343)
    at
com.ibm.ejs.j2c.poolmanager.PoolManager.reserve(PoolManager.java(Compile
d Code))
    at
com.ibm.ejs.j2c.ConnectionManager.allocateMCWrapper(ConnectionManager.ja
va(Compiled Code))
    at
com.ibm.ejs.j2c.ConnectionManager.allocateConnection(ConnectionManager.j
ava(Compiled Code))
    at
com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource.getConnection(WSJdbcDataSourc
e.java(Compiled Code))
    at
com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource.getConnection(WSJdbcDataSourc
e.java(Compiled Code))
 
Also when creating the data source in websphere I have used following
classes as well
 
                    Implementing class name
"org.apache.derby.jdbc.EmbeddedConnectionPoolDataSource"
                    Implementing class name for XA
"org.apache.derby.jdbc.EmbeddedXADataSource"
                    Datasource Helper Class Name
"com.ibm.websphere.rsadapter.DerbyDataStoreHelper"
                    Driver Class Path
"c:\jars\derby-10.2.1.6.jar;c:\jars\derbynet-10.2.1.6.jar;c:\jars\derbyt
ools-10.2.1.6.jar"                    
 
Unfortunately I could not reproduce this error from any sample
application other than my application       
Websphere defines StaleConnectionException as 
 
When an application receives a StaleConnectionException on a database
operation, it indicates that the connection currently held is no longer
valid. While it is possible to get a StaleConnectionException on any
database operation, the most common time to see a
StaleConnectionException thrown is the first time that a connection is
used, just after it is retrieved. Because connections are pooled, a
database failure is not detected until the operation immediately
following its retrieval from the pool, which is the first time
communication to the database is attempted. It is only when a failure is
detected that the connection is marked stale. StaleConnectionException
occurs less often if each method that accesses the database gets a new
connection from the pool. 
 
(http://publib.boulder.ibm.com/infocenter/wasinfo/v5r1//index.jsp?topic=
/com.ibm.websphere.base.doc/info/aes/ae/rdat_stalconexp.html)
 
But I could not find out why this kind of situation occurred.
 
Also shutdown all the java processors in the machine I can connect to
the derby database using ij
 
I would like to know if anyone knows what might cause this to error  
 
Regards,
Suraj
 
        

Mime
View raw message