turbine-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From CP Lim <cp_...@redsheriff.com>
Subject Re: as400 toolbox driver illegalaccessException
Date Tue, 04 Feb 2003 22:04:45 GMT
Hi Christine,

I was reading your post and read the following line:

 > In Turbine u can state how long ur Database Connection should
 > be cached. This is set to an hour.

It sounds like you're using Torque's old connection pool which times out 
connections instead of checking if they are still active.  What you can 
do is reconfigure Torque to use Jdbc2Pool.  It verifies if the 
Connection objects are still valid (by doing a select on it I think) and 
only if they are valid will they be returned by the pool.  This might 
solve the issue with Torque using Connection objects that have already 
been closed.

Now, I've not used AS400 before, so I'm not sure about what to set for 
the following configuration entry:

torque.dsfactory.drop4.pool.validationQuery=SELECT 1

This works for postgres (what I'm using), and for Oracle its:

torque.dsfactory.drop4.pool.validationQuery=SELECT 1 FROM DUAL

As you can see its just a simple select statement specific to your 
database, so you'll need to use a select statement that works on AS400.

HTH,
CP

Christine Keim wrote:
> Hi all,
> 
> i think i found out when this exception is happening.
> Maybe by providing this someone will know what i have to do.
> 
> In Turbine u can state how long ur Database Connection should
> be cached. This is set to an hour. The exception occurs when
> a user requests a connection which is expired and which
> is the closed :
> org.apache.turbine.util.db.pool.DBConnection.close(DBConnection.java:517)
> This then calls close of the JDBC-Driver:
> com.ibm.as400.access.AS400JDBCConnection.close(AS400JDBCConnection.java:494)
> While closing, a ConnectionDroppedException occurs.
> Now my questions
> 1) Anyone knows why this ConnectionDroppedException could be thrown?
> 2) Anyone knows why the ResourceBundleLoader should not be accessed?
> 
> I use the Driver: com.ibm.as400.access.AS400JDBCDriver
> (jt400.jar from the Java Toolbox QIBM/ProdData/HTTP/Public/jt400/lib)
> with the jdbc url: jdbc:as400://<serverip>/<libraryname>;errors=full
> 
> Am i using the wrong Driver maybe?
> 
> tia, Christine Keim
> 
> 
>>----- Original Message -----
>>From: "Phee, Martin J (Jump Tech)" <Marty.Phee@bp.com>
>>To: "'Turbine Users List'" <turbine-user@jakarta.apache.org>
>>Sent: Friday, January 31, 2003 3:35 PM
>>Subject: RE: as400 toolbox driver illegalaccessException
>>
>>
>>
>>>You must do a Torque.closeConnection on all connection.  This way it is
>>>returned to the pool.
>>>
>>>-----Original Message-----
>>>From: Christine Keim [mailto:c.keim@berlinger.cc]
>>>Sent: Friday, January 31, 2003 5:25 AM
>>>To: turbine-torque-user@jakarta.apache.org
>>>Cc: turbine-user@jakarta.apache.org
>>>Subject: as400 toolbox driver illegalaccessException
>>>
>>>
>>>Hi,
>>>
>>>i'm writing to both turbine-torque and turbine-user mailing list to find
>>>someone who can help me with the following Problem.
>>>
>>>I'm using TDK 2.1 and got it to run with DB2 on the DB2/AS400.
>>>Tomcat runs remote on a Windows PC, and
>>>to connect to the Database i use the Java Toolbox Driver
>>>com.ibm.as400.access.AS400JDBCDriver
>>>with the jdbc url: jdbc:as400://<serverip>/<libraryname>;errors=full
>>>I included the jt400.jar in the lib-directory and all seemed to run
>>>fine at first - but sometimes i get the recurrent exception below.
>>>
>>>Do i miss a library? And why is the connection being dropped in the
>>
> first
> 
>>>place?
>>>May it have something to do with the warning(s) i get in the
>>
> turbine.log:
> 
>>>-- WARN -- A DBConnection was finalized, without being returned to the
>>>ConnectionPool it belonged to
>>>
>>>tia,
>>>
>>>Christine Keim
>>>
>>>
>>>java.lang.IllegalAccessError: try to access class
>>>com.ibm.as400.access.ResourceBundleLoader from class
>>>com.ibm.as400.access.ConnectionDroppedException
>>>        at
>>>
>>
> com.ibm.as400.access.ConnectionDroppedException.<init>(ConnectionDroppedExce
> 
>>>ption.java:79)
>>>        at
>>>
>>
> com.ibm.as400.access.AS400ThreadedServer.forceDisconnect(AS400ThreadedServer
> 
>>>.java:289)
>>>        at
>>>
>>
> com.ibm.as400.access.AS400ImplRemote.disconnectServer(AS400ImplRemote.java:4
> 
>>>03)
>>>        at
>>>
>>
> com.ibm.as400.access.AS400JDBCConnection.close(AS400JDBCConnection.java:494)
> 
>>>        at
>>>
>>
> org.apache.turbine.util.db.pool.DBConnection.close(DBConnection.java:517)
> 
>>>        at
>>>
>>
> org.apache.turbine.util.db.pool.ConnectionPool.popConnection(ConnectionPool.
> 
>>>java:529)
>>>        at
>>>
>>
> org.apache.turbine.util.db.pool.ConnectionPool.getInternalPooledConnection(C
> 
>>>onnectionPool.java:590)
>>>        at
>>>
>>
> org.apache.turbine.util.db.pool.ConnectionPool.getConnection(ConnectionPool.
> 
>>>java:343)
>>>        at
>>>
>>
> org.apache.turbine.services.db.TurbinePoolBrokerService.getConnection(Turbin
> 
>>>ePoolBrokerService.java:171)
>>>        at
>>>
>>
> org.apache.turbine.services.db.TurbineDB.getConnection(TurbineDB.java:194)
> 
>>>        at
>>>
>>
> org.apache.turbine.om.peer.BasePeer.executeQuery(E:/tdk/webapps/interim01/WE
> 
>>>B-INF/src/java/org/apache/turbine/om/peer/BasePeer.java:1305)
>>>        at
>>>
>>
> org.apache.turbine.om.peer.BasePeer.doSelect(E:/tdk/webapps/interim01/WEB-IN
> 
>>>F/src/java/org/apache/turbine/om/peer/BasePeer.java:1182)
>>>        at
>>>
>>
> org.apache.turbine.om.security.peer.TurbineUserPeer.doSelect(TurbineUserPeer
> 
>>>.java:369)
>>>        at
>>>
>>
> org.apache.turbine.om.security.peer.TurbineUserPeer.doSelect(TurbineUserPeer
> 
>>>.java:332)
>>>        at
>>>
>>
> org.apache.turbine.services.security.db.DBUserManager.accountExists(DBUserMa
> 
>>>nager.java:128)
>>>        at
>>>
>>
> org.apache.turbine.services.security.db.DBUserManager.accountExists(DBUserMa
> 
>>>nager.java:107)
>>>        at
>>>
>>
> org.apache.turbine.services.security.db.DBUserManager.store(DBUserManager.ja
> 
>>>va:264)
>>>        at
>>>
>>
> org.apache.turbine.services.security.BaseSecurityService.saveUser(E:/tdk/web
> 
> apps/interim01/WEB-INF/src/java/org/apache/turbine/services/security/BaseSec
> 
>>>urityService.java:379)
>>>        at
>>>
>>
> org.apache.turbine.services.security.TurbineSecurity.saveUser(TurbineSecurit
> 
>>>y.java:261)
>>>        at
>>>
>>
> org.apache.turbine.om.security.TurbineUser.valueUnbound(TurbineUser.java:649
> 
>>>)
>>>        at
>>>
>>
> org.apache.catalina.session.StandardSession.removeAttribute(StandardSession.
> 
>>>java:953)
>>>        at
>>>
>>
> org.apache.catalina.session.StandardSession.expire(StandardSession.java:551)
> 
>>>        at
>>>
>>
> org.apache.catalina.session.StandardManager.processExpires(StandardManager.j
> 
>>>ava:744)
>>>        at
>>>
>>
> org.apache.catalina.session.StandardManager.run(StandardManager.java:815)
> 
>>>        at java.lang.Thread.run(Unknown Source)
>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
>>>For additional commands, e-mail: turbine-user-help@jakarta.apache.org
>>>
>>>
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: turbine-user-help@jakarta.apache.org
>>
>>
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
> 
> 
> 


-- 
R E D S H E R I F F
C.P. Lim - Software Engineer
Level 1, 10 Queens Road    +61 3 9864 0733 tel
Melbourne VIC              +61 3 9864 0778 fax
Australia                  +61 413 781 846 mob

This message and any files transmitted with it are confidential and 
intended solely for the use of the individual or entity to whom they are 
addressed. If you are not the intended recipient, you are hereby 
notified that any use or dissemination of this communication is strictly 
prohibited. If you have received this message in error please notify us 
immediately by return email or telephone +61 (3) 9659 0432, then delete 
this message. Any views expressed in this message are those of the 
individual sender and many not necessarily reflect the views of Red 
Sheriff.


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Mime
View raw message