You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-user@db.apache.org by KERNEUZET FREDERIC <Fr...@pr-gicm.com> on 2005/02/03 15:10:32 UTC
Problems with timed-out pool connection
Hi everybody,
I'm maintaining an application using Torque with an MS SQL Server.
I've not encountered any problems for several months, but since yesterday (whitout any modification), I got a lot of connection errors like this one :
org.apache.torque.TorqueException: Connection object was null. This could be due to a misconfiguration of the DataSourceFactory. Check the logs and Torque.properties to better determine the cause.
at org.apache.torque.util.Transaction.rollback(Transaction.java:185)
at org.apache.torque.oid.IDBroker.storeIDs(IDBroker.java:698)
at org.apache.torque.oid.IDBroker.getNextIds(IDBroker.java:448)
at org.apache.torque.oid.IDBroker.getIdAsBigDecimal(IDBroker.java:336)
at org.apache.torque.oid.IDBroker.getIdAsInt(IDBroker.java:298)
Or like this one :
java.sql.SQLException: Timed out waiting for pooled connection from 'null'
at org.apache.torque.pool.ConnectionPool.getConnection(ConnectionPool.java:233)
at org.apache.torque.pool.TorqueClassicDataSource.getConnection(TorqueClassicDataSource.java:488)
at org.apache.torque.pool.TorqueClassicDataSource.getConnection(TorqueClassicDataSource.java:458)
at org.apache.torque.TorqueInstance.getConnection(TorqueInstance.java:743)
at org.apache.torque.Torque.getConnection(Torque.java:306)
My application is using the "org.apache.torque.dsfactory.TorqueDataSourceFactory" factory with default parameters :
torque.dsfactory.oprisk.pool.defaultMaxConnections=10
torque.dsfactory.oprisk.pool.maxExpiryTime=3600
torque.dsfactory.oprisk.pool.connectionWaitTimeout=10
Have you got any idea why pool connection can react like this ?
Do you think that using "org.apache.torque.dsfactory.SharedPoolDataSourceFactory" and increasing number of max connections allowed could resolve my problem ?
Besides, i would like to improve database-side performance, has someone already studied this way ?
Hope this is inspiring some people ...
Thanks a lot if you got any idea.
==================================
Frédéric Kerneuzet
==================================
RE: Error in using Derby and Cloudscape as Adapter
Posted by Thomas Fischer <Fi...@seitenbau.net>.
Hi,
I tried to run the runtimetest on Derby for Torque 3.2-dev (cvs HEAD) this
morning, and it did not pass. Cloudscape as adapter also did not work. I
would not trust anything which does not pass the runtimetest, i.e. 3.2-dev
does not support derby yet.
Note that this does not necessarily mean that derby does not work in the
3.1-Branch (I just didn't try it)
I will try to fix the HEAD, but dont expect it too soon (about 1-2 weeks).
Thomas
FROM: "Ely Rances" <er...@exist.com>
Exist Softwarelabs
Hi,
We are currently using derby torque adapter.
We have set one of our properties file, adapter to derby,
and used the derby-torque from HEAD and build with the
following jar files as result:
1.) torque-3.2-dev.jar
2.) torque-gen-3.2-dev.jar
3.) maven-torque-plugin-3.2-dev.jar
After running our application.
It did not connect to the derby database, instead we came with the
following errors:
There has been an Error!
Reason:
java.lang.Error: Error in BasePeer.initTableSchema(TURBINE_USER):
There was no DataSourceFactory configured for the connection default
Get/Post Data:
template = ShowError.vm
Stacktrace:
java.lang.Error: Error in BasePeer.initTableSchema(TURBINE_USER):
There was no DataSourceFactory configured for the connection default
at
org.apache.jetspeed.om.security.turbine.BaseTurbineUserPeer.initClass(BaseTurbineUserPeer.java:154)
at
org.apache.jetspeed.om.security.turbine.BaseTurbineUserPeer.(BaseTurbineUserPeer.java:128)
at
org.apache.jetspeed.services.security.turbine.TurbineUserManagement.getUser(TurbineUserManagement.java:136)
at
org.apache.jetspeed.services.JetspeedUserManagement.getUser(JetspeedUserManagement.java:59)
at
org.apache.jetspeed.services.security.turbine.TurbineAuthentication.getAnonymousUser(TurbineAuthentication.java:188)
at
org.apache.jetspeed.services.JetspeedAuthentication.getAnonymousUser(JetspeedAuthentication.java:64)
at
org.apache.jetspeed.services.JetspeedSecurity.getAnonymousUser(JetspeedSecurity.java:134)
at
org.apache.jetspeed.modules.actions.TemplateSessionValidator.doPerform(TemplateSessionValidator.java:59)
However, when we tried setting cloudscape in one of our properties file,
(as adapter).
It was able to connect to derby database, but we encountered the following
errors:
There has been an Error!
Reason:
org.apache.jetspeed.services.security.LoginException: Failed to get
anonymous user: : Failed to retrieve roles : SQL Exception: Comparisons
between 'INTEGER' and 'CHAR' are not supported.
Get/Post Data:
template = ShowError.vm
Stacktrace:
org.apache.torque.TorqueException: SQL Exception: Comparisons
between 'INTEGER' and 'CHAR' are not supported.
at
org.apache.torque.util.BasePeer.throwTorqueException(BasePeer.java:236)
at
org.apache.torque.util.BasePeer.executeQuery(BasePeer.java:1550)
at
org.apache.torque.util.BasePeer.doSelect(BasePeer.java:1391)
at
org.apache.torque.util.BasePeer.doSelect(BasePeer.java:1368)
at
org.apache.jetspeed.om.security.turbine.BaseTurbineUserGroupRolePeer.doSelectVillageRecords(BaseTurbineUserGroupRolePeer.java:369)
at
org.apache.jetspeed.om.security.turbine.BaseTurbineUserGroupRolePeer.doSelectVillageRecords(BaseTurbineUserGroupRolePeer.java:337)
at
org.apache.jetspeed.om.security.turbine.BaseTurbineUserGroupRolePeer.doSelect(BaseTurbineUserGroupRolePeer.java:306)
at
org.apache.jetspeed.services.security.turbine.TurbineRoleManagement.getRoles(TurbineRoleManagement.java:123)
at
org.apache.jetspeed.services.security.JetspeedRoleManagement.getRoles(JetspeedRoleManagement.java:64)
at
org.apache.jetspeed.services.JetspeedSecurity.getRoles(JetspeedSecurity.java:299)
at
org.apache.jetspeed.services.security.SecurityCacheImpl.load(SecurityCacheImpl.java:85)
at
org.apache.jetspeed.services.security.JetspeedSecurityCache.load(JetspeedSecurityCache.java:66)
at
org.apache.jetspeed.services.security.turbine.TurbineAuthentication.getAnonymousUser(TurbineAuthentication.java:193)
at
org.apache.jetspeed.services.JetspeedAuthentication.getAnonymousUser(JetspeedAuthentication.java:64)
at
org.apache.jetspeed.services.JetspeedSecurity.getAnonymousUser(JetspeedSecurity.java:134)
at
org.apache.jetspeed.modules.actions.TemplateSessionValidator.doPerform(TemplateSessionValidator.java:59)
It seems here that with cloudscape as adapter, it retrieves the inserted
INTEGER data as CHAR?
Has anyone of you encountered such errors, especially the latter
one(cloudscape) ?
TIA
---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org