Hi Armin,

thanks for looking into this!

On Fri, 20 Aug 2004 21:56:15 +0200, Armin Waibel <[EMAIL PROTECTED]>
wrote:

>I run some massive multithreaded tests against the 1.0_RELEASE branch in 
>CVS (against hsql in-memory mode, single CPU) without failures (with 
>tweaked OJB settings). In this test each thread work on separate 
>objects, maybe the problems occur only when different threads work on 
>the same objects.
>
>So could you post some of the exceptions you got when run your tests and 
>some info about the test (concurrent threads, OJB configuration, ...)?
>

The test were run using a load test tool from Rational. Typically
20-50 transactions were triggered per minute. How many concurrent
threads this resulted in, I don't know, but I would guess something
like 5-10.

Below are some typical exceptions we got and our OJB.properties file:

com.ibm.websphere.ce.cm.StaleConnectionException: class
com.ibm.ejs.cm.proxy.ResultSetProxy is closed
        at
com.ibm.ejs.cm.proxy.ResultSetProxy.getResultSet(ResultSetProxy.java(Inlined
Compiled Code))
        at
com.ibm.ejs.cm.proxy.ResultSetProxy.wasNull(ResultSetProxy.java(Compiled
Code))
        at
org.apache.ojb.broker.util.JdbcTypesHelper$T_BigInt.readValueFromResultSet(JdbcTypesHelper.java(Compiled
Code))
        at
org.apache.ojb.broker.util.JdbcTypesHelper$BaseType.getObjectFromColumn(JdbcTypesHelper.java(Compiled
Code))
        at
org.apache.ojb.broker.util.JdbcTypesHelper$BaseType.getObjectFromColumn(JdbcTypesHelper.java(Compiled
Code))
        at
org.apache.ojb.broker.accesslayer.RowReaderDefaultImpl.readObjectArrayFrom(RowReaderDefaultImpl.java(Compiled
Code))
        at
org.apache.ojb.broker.accesslayer.RsIterator.getObjectFromResultSet(RsIterator.java(Compiled
Code))
        at
org.apache.ojb.broker.accesslayer.RsIterator.next(RsIterator.java(Compiled
Code))
        at
org.apache.ojb.broker.core.QueryReferenceBroker.getCollectionByQuery(QueryReferenceBroker.java(Compiled
Code))
        at
org.apache.ojb.broker.core.QueryReferenceBroker.getCollectionByQuery(QueryReferenceBroker.java(Compiled
Code))
        at
org.apache.ojb.broker.core.QueryReferenceBroker.getCollectionByQuery(QueryReferenceBroker.java(Inlined
Compiled Code))
        at
org.apache.ojb.broker.core.PersistenceBrokerImpl.getCollectionByQuery(PersistenceBrokerImpl.java(Compiled
Code))
        at
org.apache.ojb.broker.accesslayer.BasePrefetcher.prefetchRelationship(BasePrefetcher.java(Compiled
Code))
        at
org.apache.ojb.broker.core.QueryReferenceBroker$PBPrefetchingListener.prefetch(QueryReferenceBroker.java(Compiled
Code))
        at
org.apache.ojb.broker.core.QueryReferenceBroker$PBCollectionProxyListener.beforeLoading(QueryReferenceBroker.java(Inlined
Compiled Code))
        at
org.apache.ojb.broker.accesslayer.CollectionProxy.beforeLoading(CollectionProxy.java(Compiled
Code))
        at
org.apache.ojb.broker.accesslayer.CollectionProxy.loadData(CollectionProxy.java(Compiled
Code))
        at
org.apache.ojb.broker.accesslayer.ListProxy.loadData(ListProxy.java(Compiled
Code))
        at
org.apache.ojb.broker.accesslayer.CollectionProxy.getData(CollectionProxy.java(Inlined
Compiled Code))
        at
org.apache.ojb.broker.accesslayer.ListProxy.getListData(ListProxy.java(Inlined
Compiled Code))
        at
org.apache.ojb.broker.accesslayer.ListProxy.get(ListProxy.java(Compiled
Code))
        at
de.lexcom.pl24.user.model.AccountImpl.hasUserType(AccountImpl.java(Compiled
Code))
...



java.util.NoSuchElementException: Could not obtain next object: Error
reading class type: de.lexcom.pl24.user.model.AccountUserTypeImpl from
result set: class com.ibm.ejs.cm.proxy.ResultSetProxy is closed
        at
org.apache.ojb.broker.accesslayer.RsIterator.next(RsIterator.java(Compiled
Code))
        at
org.apache.ojb.broker.core.QueryReferenceBroker.getCollectionByQuery(QueryReferenceBroker.java(Compiled
Code))
        at
org.apache.ojb.broker.core.QueryReferenceBroker.getCollectionByQuery(QueryReferenceBroker.java(Compiled
Code))
        at
org.apache.ojb.broker.core.QueryReferenceBroker.getCollectionByQuery(QueryReferenceBroker.java(Inlined
Compiled Code))
        at
org.apache.ojb.broker.core.PersistenceBrokerImpl.getCollectionByQuery(PersistenceBrokerImpl.java(Compiled
Code))
        at
org.apache.ojb.broker.accesslayer.BasePrefetcher.prefetchRelationship(BasePrefetcher.java(Compiled
Code))
        at
org.apache.ojb.broker.core.QueryReferenceBroker$PBPrefetchingListener.prefetch(QueryReferenceBroker.java(Compiled
Code))
        at
org.apache.ojb.broker.core.QueryReferenceBroker$PBCollectionProxyListener.beforeLoading(QueryReferenceBroker.java(Inlined
Compiled Code))
        at
org.apache.ojb.broker.accesslayer.CollectionProxy.beforeLoading(CollectionProxy.java(Compiled
Code))
        at
org.apache.ojb.broker.accesslayer.CollectionProxy.loadData(CollectionProxy.java(Compiled
Code))
        at
org.apache.ojb.broker.accesslayer.ListProxy.loadData(ListProxy.java(Compiled
Code))
        at
org.apache.ojb.broker.accesslayer.CollectionProxy.getData(CollectionProxy.java(Inlined
Compiled Code))
        at
org.apache.ojb.broker.accesslayer.ListProxy.getListData(ListProxy.java(Inlined
Compiled Code))
        at
org.apache.ojb.broker.accesslayer.ListProxy.get(ListProxy.java(Compiled
Code))
        at
de.lexcom.pl24.user.model.AccountImpl.hasUserType(AccountImpl.java(Compiled
Code))
...

2004-08-18 17:06:20,050 [Servlet.Engine.Transports : 878] ERROR
ojb.broker.accesslayer.JdbcAccessImpl - PersistenceBrokerException
during the execution of the query: Connection is closed
com.ibm.websphere.ce.cm.StaleConnectionException: Connection is closed
        at
com.ibm.ejs.cm.proxy.ConnectionProxy.getConnection(ConnectionProxy.java(Inlined
Compiled Code))
        at
com.ibm.ejs.cm.proxy.ConnectionProxy.translateException(ConnectionProxy.java(Inlined
Compiled Code))
        at
com.ibm.ejs.cm.proxy.ConnectionProxy.prepareStatement(ConnectionProxy.java(Compiled
Code))
        at
org.apache.ojb.broker.accesslayer.StatementsForClassImpl.prepareStatement(StatementsForClassImpl.java(Compiled
Code))
        at
org.apache.ojb.broker.accesslayer.StatementsForClassImpl.prepareStatement(StatementsForClassImpl.java(Inlined
Compiled Code))
        at
org.apache.ojb.broker.accesslayer.StatementsForClassImpl.getPreparedStmt(StatementsForClassImpl.java(Compiled
Code))
        at
org.apache.ojb.broker.accesslayer.StatementManager.getPreparedStatement(StatementManager.java(Compiled
Code))
        at
org.apache.ojb.broker.accesslayer.JdbcAccessImpl.executeQuery(JdbcAccessImpl.java(Compiled
Code))
        at
org.apache.ojb.broker.accesslayer.RsQueryObject.performQuery(RsQueryObject.java(Compiled
Code))
        at
org.apache.ojb.broker.accesslayer.RsIterator.<init>(RsIterator.java(Compiled
Code))
        at
org.apache.ojb.broker.core.RsIteratorFactoryImpl.createRsIterator(RsIteratorFactoryImpl.java(Compiled
Code))
        at
org.apache.ojb.broker.core.PersistenceBrokerImpl.getRsIteratorFromQuery(PersistenceBrokerImpl.java(Compiled
Code))
        at
org.apache.ojb.broker.core.PersistenceBrokerImpl.getIteratorFromQuery(PersistenceBrokerImpl.java(Compiled
Code))
        at
org.apache.ojb.broker.core.QueryReferenceBroker.getCollectionByQuery(QueryReferenceBroker.java(Compiled
Code))
        at
org.apache.ojb.broker.core.QueryReferenceBroker.getCollectionByQuery(QueryReferenceBroker.java(Compiled
Code))
        at
org.apache.ojb.broker.core.QueryReferenceBroker.getCollectionByQuery(QueryReferenceBroker.java(Inlined
Compiled Code))
        at
org.apache.ojb.broker.core.PersistenceBrokerImpl.getCollectionByQuery(PersistenceBrokerImpl.java(Compiled
Code))
        at
org.apache.ojb.broker.accesslayer.BasePrefetcher.prefetchRelationship(BasePrefetcher.java(Compiled
Code))
        at
org.apache.ojb.broker.core.QueryReferenceBroker$PBPrefetchingListener.prefetch(QueryReferenceBroker.java(Compiled
Code))
        at
org.apache.ojb.broker.core.QueryReferenceBroker$PBMaterializationListener.beforeMaterialization(QueryReferenceBroker.java(Compiled
Code))
        at
org.apache.ojb.broker.accesslayer.IndirectionHandler.beforeMaterialization(IndirectionHandler.java(Compiled
Code))
        at
org.apache.ojb.broker.accesslayer.IndirectionHandler.materializeSubject(IndirectionHandler.java(Compiled
Code))
        at
org.apache.ojb.broker.accesslayer.IndirectionHandler.getRealSubject(IndirectionHandler.java(Inlined
Compiled Code))
        at
org.apache.ojb.broker.accesslayer.IndirectionHandler.invoke(IndirectionHandler.java(Compiled
Code))
        at $Proxy4.getCountry(Unknown Source)
        at
de.lexcom.pl24.user.model.ServiceImpl.isApplicableTo(ServiceImpl.java(Compiled
Code))
...


java.lang.ArrayIndexOutOfBoundsException: Array index out of range: 0
        at java.util.Vector.get(Vector.java(Compiled Code))
        at
org.apache.ojb.broker.accesslayer.ListProxy.get(ListProxy.java(Compiled
Code))
        at
de.lexcom.pl24.user.model.AccountImpl.hasUserType(AccountImpl.java(Compiled
Code))
        at
de.lexcom.pl24.user.logic.UserSession.hasUserType(UserSession.java(Inlined
Compiled Code))
        at
de.lexcom.pl24.user.web.login.LoginAction.execute(LoginAction.java(Compiled
Code))
        at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java(Inlined
Compiled Code))


OJB.properties:

# OJB.properties -- configuration of the OJB runtime environment
# Version: 1.0
# (c) 2001, 2002, 2003 Apache Software Foundation
# Author: Thomas Mahler and many others
#
# These settings: $Id: OJB.properties,v 1.4 2003/12/16 10:28:06 grosse
Exp $
#

#----------------------------------------------------------------------------------------
# repository file settings
#----------------------------------------------------------------------------------------
repositoryFile=repository.xml
useSerializedRepository=false
serializedRepositoryPath=.

#----------------------------------------------------------------------------------------
# PersistenceBrokerFactory / PersistenceBroker
#----------------------------------------------------------------------------------------
PersistenceBrokerFactoryClass=org.apache.ojb.broker.core.PersistenceBrokerFactoryDefaultImpl
PersistenceBrokerClass=org.apache.ojb.broker.core.PersistenceBrokerImpl

#----------------------------------------------------------------------------------------
# PersistenceBrokerFactory pool
#----------------------------------------------------------------------------------------
maxActive=100
maxIdle=-1
maxWait=2000
timeBetweenEvictionRunsMillis=-1
minEvictableIdleTimeMillis=1000000
whenExhaustedAction=0

#----------------------------------------------------------------------------------------
# ConnectionFactory / Default ConnectionPool
#----------------------------------------------------------------------------------------
ConnectionFactoryClass=org.apache.ojb.broker.accesslayer.ConnectionFactoryNotPooledImpl

#----------------------------------------------------------------------------------------
# ConnectionManager
#----------------------------------------------------------------------------------------
# The ConnectionManagerClass entry defines the ConnectionManager
implemementation to be used
#
ConnectionManagerClass=org.apache.ojb.broker.accesslayer.ConnectionManagerImpl
ConnectionManagerClass=de.lexcom.common.ojb.OjbConnectionManager
# public class OjbConnectionManager     extends ConnectionManagerImpl
implements ConnectionManagerIF
#{
#       private static Log log =
LogFactory.getLog(OjbConnectionManager.class);
#       private Connection con = null;
#
#       public OjbConnectionManager(PersistenceBroker broker)
#       {
#               super(broker);
#       }
#
#       public Connection getConnection() throws LookupException
#       {
#               try
#               {
#                       con = super.getConnection();
#               }
#               catch (LookupException e)
#               {
#                       log.warn("getConnection() failed! Now
retrying...", e);
#                       // try again once
#                       con = super.getConnection();
#                       log.info("getConnection() retry succeeded");
#               }
#               return con;
#       }
#
#       public void releaseConnection()
#       {
#               try
#               {
#                       if (getConnectionDescriptor().isDataSource()
#                               && con != null
#                               && !con.isClosed())
#                       {
#                               con.rollback();
#                       }
#               }
#               catch (SQLException e)
#               {
#                       log.warn("Ignoring SQL exception during
connection release", e);
#               }
#               super.releaseConnection();
#       }
#}


#----------------------------------------------------------------------------------------
# SqlGenerator
#----------------------------------------------------------------------------------------
SqlGeneratorClass=org.apache.ojb.broker.accesslayer.sql.SqlGeneratorDefaultImpl

#----------------------------------------------------------------------------------------
# CollectionProxy class
#----------------------------------------------------------------------------------------
CollectionProxyClass=

#----------------------------------------------------------------------------------------
# StatementManager
#----------------------------------------------------------------------------------------
StatementManagerClass=org.apache.ojb.broker.accesslayer.StatementManager

#----------------------------------------------------------------------------------------
# StatementsForClass
#----------------------------------------------------------------------------------------
StatementsForClassClass=org.apache.ojb.broker.accesslayer.StatementsForClassImpl

#----------------------------------------------------------------------------------------
# JdbcAccess
#----------------------------------------------------------------------------------------
JdbcAccessClass=org.apache.ojb.broker.accesslayer.JdbcAccessImpl

#----------------------------------------------------------------------------------------
# Object cache
#----------------------------------------------------------------------------------------
ObjectCacheClass=de.lexcom.common.ojb.ObjectCacheThreeLevelImpl

#----------------------------------------------------------------------------------------
# Locking
#----------------------------------------------------------------------------------------
LockManagerClass=org.apache.ojb.odmg.locking.LockManagerDefaultImpl
LockMapClass=org.apache.ojb.odmg.locking.InMemoryLockMapImpl
LockTimeout=600000
ImplicitLocking=false
LockAssociations=WRITE

#----------------------------------------------------------------------------------------
# OQL / SQL settings
#----------------------------------------------------------------------------------------
OqlCollectionClass=org.apache.ojb.odmg.collections.DListImpl
SqlInLimit=200

#----------------------------------------------------------------------------------------
# Meta data / mapping settings
#----------------------------------------------------------------------------------------
PersistentFieldClass=org.apache.ojb.broker.metadata.fieldaccess.PersistentFieldIntrospectorImpl

#----------------------------------------------------------------------------------------
# Transaction Management and assocation
#----------------------------------------------------------------------------------------
OJBTxManagerClass=org.apache.ojb.odmg.LocalTxManager

#----------------------------------------------------------------------------------------
# End of OJB.properties file
#----------------------------------------------------------------------------------------




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to