grouper-dev - Re: Re: [grouper-dev] Grouper session exception : Problem inHibernateSession
Subject: Grouper Developers Forum
List archive
- From: "GW Brown, Information Systems and Computing" <>
- To: Allen Chen <>
- Cc: grouper-dev <>
- Subject: Re: Re: [grouper-dev] Grouper session exception : Problem inHibernateSession
- Date: Tue, 22 Jul 2008 12:19:22 +0100
Does the UI run using the exact same configuration - including db connection urls etc?
Gary
--On 22 July 2008 19:13 +0800 Allen Chen
<>
wrote:
Yes, I am using grouper 1.3.0. And database is Oracle 10.2.0.1.0.
And i set the grouper.hibernate.properties with following setting
hibernate.c3p0.max_size 16
hibernate.c3p0.min_size 5
hibernate.c3p0.timeout 100
hibernate.c3p0.max_statements 0
hibernate.c3p0.idle_test_period 50
hibernate.c3p0.acquire_increment 2
hibernate.c3p0.validate false
hibernate.c3p0.acquireRetryAttempts=2
hibernate.c3p0.acquireRetryDelay=500
hibernate.c3p0.checkoutTimeout=500
But the time out problems still turn up.
__________________________________________________
Allen Chen
2008-07-22
__________________________________________________
·¢¼þÈË£º GW Brown, Information Systems and Computing
·¢ËÍʱ¼ä£º 2008-07-22 16:36:37
ÊÕ¼þÈË£º Allen Chen; grouper-dev
³ËÍ£º grouper-users
Ö÷Ì⣺ Re: [grouper-dev] Grouper session exception : Problem
inHibernateSession
Allen,
It may be that the code is unable to connect to the database - or is very
slow in doing so. There are a number of settings in
grouper.hibernate.properties prefixed hibernate.c3p0. which control how
the
connection pool behaves - and links to the relevant documentation.
Are you using v1.3.0? Which database are you using? If you run the
default
HSQLDB database created by Grouper it only allows one connection - you
need
to run it as a server to allow >1 connection.
Gary
--On 22 July 2008 16:11 +0800 Allen Chen
<>
wrote:
Every time I use the Grouper session, the following exception will
happen time after time :
2008-07-22 15:39:37,562: SQL Error: 0, SQLState: null
2008-07-22 15:39:37,562: An attempt by a client to checkout a Connection
has timed out.
2008-07-22 15:39:37,562: Exception in uniqueResult: (class
edu.internet2.middleware.grouper.internal.dao.hib3.Hib3MemberDAO),
ByHqlStatic, query: 'from Hib3MemberDAO as m where m.subjectId
= :sid and m.subjectSourceId = :source and m.subjectTypeId =
:type', cacheable: true, cacheRegion:
edu.internet2.middleware.grouper.internal.dao.hib3.Hib3MemberDAO.FindByS
u bject, tx type: nullBind var[0]: 'Param (class java.lang.String):
'sid'->'GrouperSystem', Bind var[1]: 'Param (class java.lang.String):
'type'->'application'Bind var[2]: 'Param (class java.lang.String):
'source'->'g:isa',
edu.internet2.middleware.grouper.internal.dao.GrouperDAOException:
Problem in HibernateSession: HibernateSession: isNew: true, isReadonly:
true, grouperTransactionType: READONLY_NEW
at
edu.internet2.middleware.grouper.hibernate.HibernateSession.callbackHibe
r nateSession(HibernateSession.java:263)
at
edu.internet2.middleware.grouper.hibernate.ByHqlStatic.uniqueResult(ByHq
l Static.java:197)
at
edu.internet2.middleware.grouper.internal.dao.hib3.Hib3MemberDAO.findByS
u bject(Hib3MemberDAO.java:168)
at
edu.internet2.middleware.grouper.MemberFinder.internal_findOrCreateBySub
j ect(MemberFinder.java:183)
at
edu.internet2.middleware.grouper.MemberFinder.internal_findBySubject(Mem
b erFinder.java:176)
at
edu.internet2.middleware.grouper.GrouperSession.start(GrouperSession.jav
a :107)
at
edu.grouper.support.GrouperInitServer.onCalled(GrouperInitServer.java:38
) .........
at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.runWor
k er(ThreadPoolExecutor.java:987)
at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker
. run(ThreadPoolExecutor.java:528)
at java.lang.Thread.run(Thread.java:595)
Caused by: org.hibernate.exception.GenericJDBCException: Cannot open
connection
at
org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQ
L StateConverter.java:103)
at
org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java
: 91)
at
org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.
j ava:43)
at
org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.
j ava:29)
at
org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.ja
v a:424)
at
org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.jav
a :144)
at
org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher
. java:139)
at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1538)
at org.hibernate.loader.Loader.doQuery(Loader.java:661)
at
org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loade
r .java:224)
at org.hibernate.loader.Loader.doList(Loader.java:2211)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2095)
at org.hibernate.loader.Loader.list(Loader.java:2090)
at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:375)
at
org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:
3 38)
at
org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:17
2 )
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
at
org.hibernate.impl.AbstractQueryImpl.uniqueResult(AbstractQueryImpl.java
: 811)
at
edu.internet2.middleware.grouper.hibernate.ByHqlStatic$1.callback(ByHqlS
t atic.java:204)
at
edu.internet2.middleware.grouper.hibernate.HibernateSession.callbackHibe
r nateSession(HibernateSession.java:211)
... 59 more
Caused by: java.sql.SQLException: An attempt by a client to checkout a
Connection has timed out.
at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:104)
at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:65)
at
com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnecti
o n(C3P0PooledConnectionPool.java:262)
at
com.mchange.v2.c3p0.PoolBackedDataSource.getConnection(PoolBackedDataSou
r ce.java:94)
at
org.hibernate.connection.C3P0ConnectionProvider.getConnection(C3P0Connec
t ionProvider.java:56)
at
org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.ja
v a:421)
... 75 more
Caused by: com.mchange.v2.resourcepool.TimeoutException: internal --
timeout at awaitAcquire()
at
com.mchange.v2.resourcepool.BasicResourcePool.awaitAcquire(BasicResource
P ool.java:970)
at
com.mchange.v2.resourcepool.BasicResourcePool.checkoutResource(BasicReso
u rcePool.java:208)
at
com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnecti
o n(C3P0PooledConnectionPool.java:260)
... 78 more
2008-07-22 15:39:37,578:
[cn.edu.scut.grouper.support.mule.GrouperInitServer] Problem in
HibernateSession: HibernateSession: isNew: true, isReadonly: true,
grouperTransactionType: READONLY_NEW
the session used in my code is as follows:
GrouperSession session = null;
try {
session = GrouperSession.start(SubjectFinder.findById("GrouperSystem",
"application", InternalSourceAdapter.ID));
// using the session to do something
} catch (Exception e) {
ErrorLog.error(this.getClass(), e.getMessage());
return "Exception happened:"+e.getMessage();
}finally{
GrouperSession.stopQuietly(session);
}
I search on Google, it's said that there's something wrong with c3po.
Do the grouper developers notice this bug and fix it already?
__________________________________________________
Allen Chen
2008-07-22
----------------------
GW Brown, Information Systems and Computing
----------------------
GW Brown, Information Systems and Computing
- Grouper session exception : Problem in HibernateSession, Allen Chen, 07/22/2008
- Re: [grouper-dev] Grouper session exception : Problem in HibernateSession, GW Brown, Information Systems and Computing, 07/22/2008
- Re: Re: [grouper-dev] Grouper session exception : Problem inHibernateSession, Allen Chen, 07/22/2008
- Re: Re: [grouper-dev] Grouper session exception : Problem inHibernateSession, GW Brown, Information Systems and Computing, 07/22/2008
- RE: Re: [grouper-dev] Grouper session exception : Problem inHibernateSession, Chris Hyzer, 07/22/2008
- Re: RE: Re: [grouper-dev] Grouper session exception : ProbleminHibernateSession, Allen Chen, 07/22/2008
Archive powered by MHonArc 2.6.16.