Skip to Content.
Sympa Menu

grouper-dev - RE: [grouper-dev] 1.3.0 rc2 ant test exception

Subject: Grouper Developers Forum

List archive

RE: [grouper-dev] 1.3.0 rc2 ant test exception


Chronological Thread 
  • From: Chris Hyzer <>
  • To: Grouper Dev <>
  • Subject: RE: [grouper-dev] 1.3.0 rc2 ant test exception
  • Date: Wed, 7 May 2008 13:04:38 -0400
  • Accept-language: en-US
  • Acceptlanguage: en-US

Hey,

 

I have done more work on the build files for grouper to solve some of these issues.  I was able to reproduce the linux issue and solved it.  Please try again, and lets make sure to test the all build scripts thoroughly before 1.3 (non-rc).  I think it takes a couple of hours to propagate to anoncvs, but the fixes are in there… J

 

Thanks!

Chris

 

1. In grouper.hibernate.properties, this was set to 500ms, which isn’t enough time.  Actually in this case the pool wasn’t full, it was just connecting, and it took longer than 500ms, and c3p0 gave error.  I think it is also a c3p0 error, but I think the default should be 30 seconds since under load the pool might be full.  Gary, let me know if you disagree.  Shilen (and everyone), let me know if you see this error anymore or if this setting corrects it:   hibernate.c3p0.checkoutTimeout=30000

2. In grouper.properties we meant to change this from etc.wheel for the ui enhancements, so I changed it.

groups.wheel.group                    = etc:sysadmingroup

3. All db prompts are via ant “input” tags, which seem more reliable, but you still need to type multiple times sometimes… (especially when testing extensions)

4. All test classpath issues are fixed.  When using test classpath, it is used consistently, and prompted for consistently, and used consistently in extensions

5. TomB, if the grouper.properties isn’t there, the grouper.example.properties will be copied to it… so TomZ mentioned you might need to update docs, and I think if the person is running an ant task, then they don’t need to copy, so maybe you don’t need to update docs?  J

6. There are redundancies in the build.xml now since I wanted to affect as little as possible, so when we rewrite the build procedure, hopefully we can make the build file more compact

 

 

 

From: [mailto:] On Behalf Of Tom Zeller
Sent: Tuesday, May 06, 2008 6:14 PM
To: Chris Hyzer
Subject: Re: [grouper-dev] 1.3.0 rc2 ant test exception

 

Same exception with latest from cvs and the 2 build.xmls you emailed.

 

Here's what I'm doing (on linux):

 

cvs -d:ext::/home/cvs/i2mi co grouper

cd grouper

cp conf/grouper.example.properties conf/grouper.properties

cd ext

unzip gsh-src.zip

cd ..

(the build.xml you emailed) cp ~/gsh.build.xml ext/gsh-src/build.xml

ant build

ant test


Are you testing on linux ?

 

On Tue, May 6, 2008 at 4:45 PM, Chris Hyzer <> wrote:

TomZ, please sync, and get the two build files f romthe other email, and try again.  And I assume your db config is valid and correct…  If there is a db connection leak that is bad… I wonder if it is  with the code I just committed to fix the db constraint… I don't see how it could be, and it passes for me,  but maybe it is…  hmmm

 

Chris

 

From: [mailto:] On Behalf Of Tom Zeller
Sent: Tuesday, May 06, 2008 2:56 PM


To: Chris Hyzer
Cc: Tom Barton; Shilen Patel

Subject: Re: [grouper-dev] 1.3.0 rc2 ant test exception

 

Great, ant test passes. If I expand gsh-src.zip and run ant test (on linux) I get:

 

  [junit] Caused by: com.mchange.v2.resourcepool.TimeoutException: A client timed out while waiting to acquire a resource from com.mchange.v2.resourcepool.BasicResourcePool@141fab6 -- timeout at awaitAvailable()

 

in context:

 

  [junit] edu.internet2.middleware.grouper.internal.dao.GrouperDAOException: Problem in HibernateSession: null

    [junit]     at edu.internet2.middleware.grouper.hibernate.HibernateSession.callbackHibernateSession(HibernateSession.java:263)

    [junit]     at edu.internet2.middleware.grouper.internal.dao.hib3.Hib3RegistryDAO.reset(Hib3RegistryDAO.java:84)

    [junit]     at edu.internet2.middleware.grouper.RegistryReset._emptyTables(RegistryReset.java:140)

    [junit]     at edu.internet2.middleware.grouper.RegistryReset.reset(RegistryReset.java:76)

 

   [junit] Caused by: org.hibernate.exception.GenericJDBCException: Cannot open connection

    [junit]     at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:103)

    [junit]     at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:91)

    [junit]     at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)

    [junit]     at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:29)

    [junit]     at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:426)

    [junit]     at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:144)

    [junit]     at org.hibernate.jdbc.JDBCContext.connection(JDBCContext.java:119)

    [junit]     at org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:57)

    [junit]     at org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1326)

    [junit]     at edu.internet2.middleware.grouper.hibernate.HibernateSession.<init>(HibernateSession.java:84)

    [junit]     at edu.internet2.middleware.grouper.hibernate.HibernateSession.callbackHibernateSession(HibernateSession.java:209)

    [junit]     ... 26 more

    [junit] Caused by: java.sql.SQLException: An attempt by a client to checkout a Connection has timed out.

    [junit]     at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:106)

    [junit]     at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:65)

    [junit]     at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:527)

    [junit]     at com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getConnection(AbstractPoolBackedDataSource.java:128)

    [junit]     at org.hibernate.connection.C3P0ConnectionProvider.getConnection(C3P0ConnectionProvider.java:56)

    [junit]     at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:423)

    [junit]     ... 32 more

    [junit] Caused by: com.mchange.v2.resourcepool.TimeoutException: A client timed out while waiting to acquire a resource from com.mchange.v2.resourcepool.BasicResourcePool@141fab6 -- timeout at awaitAvailable()

    [junit]     at com.mchange.v2.resourcepool.BasicResourcePool.awaitAvailable(BasicResourcePool.java:1317)

    [junit]     at com.mchange.v2.resourcepool.BasicResourcePool.prelimCheckoutResource(BasicResourcePool.java:557)

    [junit]     at com.mchange.v2.resourcepool.BasicResourcePool.checkoutResource(BasicResourcePool.java:477)

    [junit]     at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:525)

    [junit]     ... 35 more

    [junit] // Error: unable to evaluate command: Sourced file: inline evaluation of: ``assertTrue( "reset registry"            , resetRegistry()                        . . . '' : Error invoking compiled command: : Error in compiled command: edu.internet2.middleware.grouper.GrouperRuntimeException: Problem in HibernateSession: null

 

On Tue, May 6, 2008 at 1:41 PM, Chris Hyzer <> wrote:

Hey,

I put a fix in, try it out please.
Shilen, please look and see if valid.  I think doing some sql is ok here or there (as opposed to hql).  We could even speed up the reset by just "delete from" with sql, but maybe there are never a lot of records or performance isn't an issue?

If this works we can reply to the list that a workaround is running this query:

update grouper_memberships gm set gm.PARENT_MEMBERSHIP = null

before the reset.  Or we could cut another build at some point.

Also, since we know who is going to fix the problem (someone on internal list), should we just forward problems to the 6 of us instead of grouper-dev?  Then we can put the result to the dev list?  I guess it is good to keep people on the larger list informed asap, but I think we usually respond quickly and could save some traffic (and embarrassment? :) ).

Thanks,
Chris

Ps. Shilen, I also added a dummy source adapter like you suggested to make loading faster, if someone doesn't configure it it wont be used.  Anyways, can you see if that is what you were talking about?  Or is there another one somewhere?  Thanks!


> -----Original Message-----
> From: [mailto:] On Behalf Of Tom
> Zeller
> Sent: Tuesday, May 06, 2008 1:58 PM
> To: Grouper Dev
> Subject: [grouper-dev] 1.3.0 rc2 ant test exception
>
> With grouper 1.3.0 rc2, ant test throws the following exception for me
> on linux (redhat, ant 1.7.0, java 1.5.0_15), which I have also seen
> *sometimes* on leopard but never on solaris. It seems to me that I
> have encountered this before after moving to hib3.
>
> TomZ
>
> [junit]
> edu.internet2.middleware.grouper.internal.dao.GrouperDAOException:
> Problem in HibernateSession: HibernateSession: isNew: true,
> isReadonly: false, grouperTransactionType: READ_WRITE_NEW
>     [junit]     at
> edu.internet2.middleware.grouper.hibernate.HibernateSession.callbackHib
> ernateSession(HibernateSession.java:263)
>     [junit]     at
> edu.internet2.middleware.grouper.internal.dao.hib3.Hib3RegistryDAO.rese
> t(Hib3RegistryDAO.java:84)
>     [junit]     at
> edu.internet2.middleware.grouper.RegistryReset._emptyTables(RegistryRes
> et.java:140)
>     [junit]     at
> edu.internet2.middleware.grouper.RegistryReset.internal_resetRegistryAn
> dAddTestSubjects(RegistryReset.java:104)
>     [junit]     at
> edu.internet2.middleware.grouper.TestPrivCREATE.setUp(Unknown Source)
>
> [junit] Caused by:
> org.hibernate.exception.ConstraintViolationException: could not
> execute update query
>     [junit]     at
> org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.jav
> a:71)
>     [junit]     at
> org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper
> .java:43)
>     [junit]     at
> org.hibernate.hql.ast.exec.BasicExecutor.execute(BasicExecutor.java:84)
>     [junit]     at
> org.hibernate.hql.ast.QueryTranslatorImpl.executeUpdate(QueryTranslator
> Impl.java:396)
>     [junit]     at
> org.hibernate.engine.query.HQLQueryPlan.performExecuteUpdate(HQLQueryPl
> an.java:259)
>     [junit]     at
> org.hibernate.impl.SessionImpl.executeUpdate(SessionImpl.java:1141)
>     [junit]     at
> org.hibernate.impl.QueryImpl.executeUpdate(QueryImpl.java:94)
>     [junit]     at
> edu.internet2.middleware.grouper.internal.dao.hib3.Hib3MembershipDAO.re
> set(Hib3MembershipDAO.java:774)
>     [junit] Tests run: 394, Failures: 0, Errors: 1, Time elapsed:
> 15.609 sec
>     [junit]     at
> edu.internet2.middleware.grouper.internal.dao.hib3.Hib3RegistryDAO$1.ca
> llback(Hib3RegistryDAO.java:90)
>     [junit]     at
> edu.internet2.middleware.grouper.hibernate.HibernateSession.callbackHib
> ernateSession(HibernateSession.java:211)
>     [junit]     ... 20 more
>     [junit] Caused by: java.sql.SQLException: Integrity constraint
> violation FK_MEMBERSHIPS_PARENT table: GROUPER_MEMBERSHIPS in
> statement [delete from grouper_memberships where membership_uuid=?]
>     [junit]     at org.hsqldb.jdbc.jdbcUtil.throwError(Unknown Source)
>     [junit]     at
> org.hsqldb.jdbc.jdbcPreparedStatement.executeUpdate(Unknown Source)
>     [junit]     at
> com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate(NewPro
> xyPreparedStatement.java:105)
>     [junit]     at
> org.hibernate.hql.ast.exec.BasicExecutor.execute(BasicExecutor.java:75)
>     [junit]     ... 27 more

 

 




Archive powered by MHonArc 2.6.16.

Top of Page