Skip to Content.
Sympa Menu

grouper-dev - [grouper-dev] Re: [grouper-core] RE: GrouperStaleObjectStateException

Subject: Grouper Developers Forum

List archive

[grouper-dev] Re: [grouper-core] RE: GrouperStaleObjectStateException


Chronological Thread 
  • From: Shilen Patel <>
  • To: "Klug, Lawrence" <>
  • Cc: Grouper Dev <>, Chris Hyzer <>
  • Subject: [grouper-dev] Re: [grouper-core] RE: GrouperStaleObjectStateException
  • Date: Fri, 26 Aug 2011 12:31:06 +0000
  • Accept-language: en-US

OK cool.  Also, I just ran through all the API tests on SQL Server 2005 with jtds-1.2.5 and they all pass so hopefully you won't see any issues, but let us know how it goes.

(I'm moving this back to the dev list since the core list is actually moderated.)

Thanks!

-- Shilen

From: "Klug, Lawrence" <>
Date: Thu, 25 Aug 2011 13:46:28 -0700
To: Shilen Patel <>, Chris Hyzer <>
Cc: "" <>
Subject: RE: [grouper-core] RE: GrouperStaleObjectStateException

>> Or is there any reason you wouldn't want to use com.microsoft.sqlserver.jdbc.SQLServerDriver?

Not sure why, but I’ve been asked to use jtds – I’ll upgrade to jtds-1.2.5  and see how that works.

 

thanks,

 

Lawrence

 

From: Shilen Patel []
Sent: Thursday, August 25, 2011 12:46 PM
To: Klug, Lawrence; Chris Hyzer
Cc:
Subject: Re: [grouper-core] RE: GrouperStaleObjectStateException

 

So I was able to reproduce the same (or similar) behavior that you're seeing using jtds-1.2, but not with jtds-1.2.5 so can you try the updated driver?  I haven't (yet) tried running all the tests with the jtds driver so it's possible that there may be other issues, but gsh starts up at least.  Or is there any reason you wouldn't want to use com.microsoft.sqlserver.jdbc.SQLServerDriver?

 

Thanks!

 

-- Shilen

 

 

From: "Klug, Lawrence" <>
Date: Thu, 25 Aug 2011 11:51:02 -0700
To: Shilen Patel <>, Chris Hyzer <>
Cc: "" <>
Subject: RE: [grouper-core] RE: GrouperStaleObjectStateException

 

Hi Shilen,

 

One  difference is the driver – I’m using the jtds driver:  jtds-1.2

 

Thanks,

 

Lawrence

 

From: Shilen Patel []
Sent: Thursday, August 25, 2011 11:38 AM
To: Klug, Lawrence; Chris Hyzer
Cc:
Subject: Re: [grouper-core] RE: GrouperStaleObjectStateException

 

I just got my hands on an SQL server 2005 database (9.00.1399.06), but I still can't reproduce the problem you're seeing.

 

Here's what I did:

 

1.  Downloaded and extracted http://www.internet2.edu/grouper/release/2.0.0/grouper.api-2.0.0.tar.gz. And ran 'ant dist'.

2.  Made the following changes to sources.xml (basically moving around comments to use the sql server example):

 

$ diff conf/sources.example.xml conf/sources.xml 

250a251,252

>               -->

>              <param-value>

276c278

<               -->

---

>              </param-value>

278c280

<              <param-value>

---

> <!--

292a295

> -->

 

 

3.  Made the following changes to grouper.hibernate.properties:

 

$ diff conf/grouper.hibernate.example.properties conf/grouper.hibernate.properties 

11c11

< hibernate.dialect               = org.hibernate.dialect.HSQLDialect

---

> hibernate.dialect               = org.hibernate.dialect.SQLServerDialect

28c28

< hibernate.connection.driver_class = org.hsqldb.jdbcDriver

---

> hibernate.connection.driver_class = com.microsoft.sqlserver.jdbc.SQLServerDriver

37c37

< hibernate.connection.url = "jdbc:hsqldb:hsql://localhost/grouper

---

> hibernate.connection.url = "jdbc:sqlserver://dbsvc-test-01.oit.duke.edu:53231;DatabaseName=testing

39c39

< hibernate.connection.username         = sa

---

> hibernate.connection.username         = shilen

43c43

< hibernate.connection.password         = 

---

> hibernate.connection.password         = password

 

4.  ./bin/gsh.sh -registry –check

5.  ./bin/gsh.sh -registry -runsqlfile ddlScripts/grouperDdl_20110825_14_29_16_652.sql 

6.  And then I was able to start gsh without any errors:

 

$ ./bin/gsh.sh 

Using GROUPER_HOME: /srv/mssql2/grouper.api-2.0.0

Using GROUPER_CONF: /srv/mssql2/grouper.api-2.0.0/conf

Using JAVA: java

using MEMORY: 64m-512m

Grouper starting up: version: 2.0.0, build date: 2011/08/25 14:27:08, env: <no label configured>

grouper.properties read from: /srv/mssql2/grouper.api-2.0.0/conf/grouper.properties

Grouper current directory is: /srv/mssql2/grouper.api-2.0.0

log4j.properties read from:   /srv/mssql2/grouper.api-2.0.0/conf/log4j.properties

Grouper is logging to file:   /srv/mssql2/grouper.api-2.0.0/logs/grouper_error.log, at min level WARN for package: edu.internet2.middleware.grouper, based on log4j.properties

grouper.hibernate.properties: /srv/mssql2/grouper.api-2.0.0/conf/grouper.hibernate.properties

grouper.hibernate.properties:

sources.xml read from:        /srv/mssql2/grouper.api-2.0.0/conf/sources.xml

sources.xml groupersource id: g:gsa

sources.xml jdbc source id:   jdbc: GrouperJdbcConnectionProvider

Grouper note: auto-created attributeDefName: etc:attribute:attrExternalSubjectInvite:externalSubjectInvite

Grouper note: auto-created attributeDefName: etc:attribute:attrExternalSubjectInvite:externalSubjectInviteExpireDate

Grouper note: auto-created attributeDefName: etc:attribute:attrExternalSubjectInvite:externalSubjectInviteDate

Grouper note: auto-created attributeDefName: etc:attribute:attrExternalSubjectInvite:externalSubjectEmailAddress

Grouper note: auto-created attributeDefName: etc:attribute:attrExternalSubjectInvite:externalSubjectInviteGroupUuids

Grouper note: auto-created attributeDefName: etc:attribute:attrExternalSubjectInvite:externalSubjectInviteMemberId

Grouper note: auto-created attributeDefName: etc:attribute:attrExternalSubjectInvite:externalSubjectInviteUuid

Grouper note: auto-created attributeDefName: etc:attribute:attrExternalSubjectInvite:externalSubjectInviteEmailWhenRegistered

Grouper note: auto-created attributeDefName: etc:attribute:attrExternalSubjectInvite:externalSubjectInviteEmail

Grouper note: auto-created attributeDefName: etc:attribute:rules:rule

Grouper note: auto-created attributeDefName: etc:attribute:rules:ruleActAsSubjectId

Grouper note: auto-created attributeDefName: etc:attribute:rules:ruleActAsSubjectIdentifier

Grouper note: auto-created attributeDefName: etc:attribute:rules:ruleActAsSubjectSourceId

Grouper note: auto-created attributeDefName: etc:attribute:rules:ruleCheckType

Grouper note: auto-created attributeDefName: etc:attribute:rules:ruleCheckOwnerId

Grouper note: auto-created attributeDefName: etc:attribute:rules:ruleCheckOwnerName

Grouper note: auto-created attributeDefName: etc:attribute:rules:ruleCheckStemScope

Grouper note: auto-created attributeDefName: etc:attribute:rules:ruleCheckArg0

Grouper note: auto-created attributeDefName: etc:attribute:rules:ruleCheckArg1

Grouper note: auto-created attributeDefName: etc:attribute:rules:ruleIfOwnerId

Grouper note: auto-created attributeDefName: etc:attribute:rules:ruleIfOwnerName

Grouper note: auto-created attributeDefName: etc:attribute:rules:ruleIfConditionEl

Grouper note: auto-created attributeDefName: etc:attribute:rules:ruleIfConditionEnum

Grouper note: auto-created attributeDefName: etc:attribute:rules:ruleIfConditionEnumArg0

Grouper note: auto-created attributeDefName: etc:attribute:rules:ruleIfConditionEnumArg1

Grouper note: auto-created attributeDefName: etc:attribute:rules:ruleIfStemScope

Grouper note: auto-created attributeDefName: etc:attribute:rules:ruleThenEl

Grouper note: auto-created attributeDefName: etc:attribute:rules:ruleThenEnum

Grouper note: auto-created attributeDefName: etc:attribute:rules:ruleThenEnumArg0

Grouper note: auto-created attributeDefName: etc:attribute:rules:ruleThenEnumArg1

Grouper note: auto-created attributeDefName: etc:attribute:rules:ruleThenEnumArg2

Grouper note: auto-created attributeDefName: etc:attribute:rules:ruleValid

Grouper note: auto-created attributeDefName: etc:attribute:rules:ruleRunDaemon

Grouper note: auto-created attributeDefName: etc:attribute:permissionLimits:limitExpression

Grouper note: auto-created attributeDefName: etc:attribute:permissionLimits:limitIpOnNetworks

Grouper note: auto-created attributeDefName: etc:attribute:permissionLimits:limitIpOnNetworkRealm

Grouper note: auto-created attributeDefName: etc:attribute:permissionLimits:limitLabelsContain

Grouper note: auto-created attributeDefName: etc:attribute:permissionLimits:limitAmountLessThan

Grouper note: auto-created attributeDefName: etc:attribute:permissionLimits:limitAmountLessThanOrEqual

Grouper note: auto-created attributeDefName: etc:attribute:permissionLimits:limitWeekday9to5

Grouper note: auto-created attributeDefName: etc:attribute:attrLoader:attributeLoader

Grouper note: auto-created attributeDefName: etc:attribute:attrLoader:attributeLoaderType

Grouper note: auto-created attributeDefName: etc:attribute:attrLoader:attributeLoaderDbName

Grouper note: auto-created attributeDefName: etc:attribute:attrLoader:attributeLoaderScheduleType

Grouper note: auto-created attributeDefName: etc:attribute:attrLoader:attributeLoaderQuartzCron

Grouper note: auto-created attributeDefName: etc:attribute:attrLoader:attributeLoaderIntervalSeconds

Grouper note: auto-created attributeDefName: etc:attribute:attrLoader:attributeLoaderPriority

Grouper note: auto-created attributeDefName: etc:attribute:attrLoader:attributeLoaderAttrsLike

Grouper note: auto-created attributeDefName: etc:attribute:attrLoader:attributeLoaderAttrQuery

Grouper note: auto-created attributeDefName: etc:attribute:attrLoader:attributeLoaderAttrSetQuery

Grouper note: auto-created attributeDefName: etc:attribute:attrLoader:attributeLoaderActionQuery

Grouper note: auto-created attributeDefName: etc:attribute:attrLoader:attributeLoaderActionSetQuery

Type help() for instructions

gsh 0% getStems("")

stem: name='etc:attribute:rules' displayName='etc:attribute:rules' uuid='20669ed0cf4241ac9bf501319f892223' 

stem: name='etc' displayName='etc' uuid='355e7aff6df740cb927fc5cd0b2490c7' 

stem: name='etc:attribute:attrLoader' displayName='etc:attribute:attrLoader' uuid='806f8c1e10a744be8ad25bf9fa203da6' 

stem: name='etc:attribute' displayName='etc:attribute' uuid='a6e51aceee43452b9c55b57af6b029c5' 

stem: name='etc:attribute:attrExternalSubjectInvite' displayName='etc:attribute:attrExternalSubjectInvite' uuid='bfa7e7316e4144aeb080e077586b2a0e' 

stem: name='etc:attribute:permissionLimits' displayName='etc:attribute:permissionLimits' uuid='cdd1367c98e742a3a77d8cb3c8fd2307' 

 

Are you doing anything different? 

 

Thanks!

 

-- Shilen

 

 

From: "Klug, Lawrence" <>
Date: Thu, 25 Aug 2011 09:37:02 -0700
To: Chris Hyzer <>, Shilen Patel <>
Cc: "" <>
Subject: RE: [grouper-core] RE: GrouperStaleObjectStateException

 

>>?  BTW, why are you picking SQL server? 

 

Actually, I didn’t pick SQL Server – it was already in place in the dev/qa/prod environments.  There is talk of an upgrade to 2008 at year end – we’ll see.

 

Thanks,

 

Lawrence

 

From: Chris Hyzer []
Sent: Wednesday, August 24, 2011 10:32 PM
To: Klug, Lawrence; Shilen Patel
Cc:
Subject: RE: [grouper-core] RE: GrouperStaleObjectStateException

 

This is an interesting thread.  Lawrence, thanks for the perseverance.  I would like to see what happens on a 2008 DB (Lawrence, if that in the cards?), and if things are different, perhaps officially say that we don’t support 2005.  What do people think?  BTW, why are you picking SQL server?  That is a very unpopular DB with Grouper, which means these expensive issues will probably happen from time to time.  If you can use oracle, or mysql, or even postgres, it will probably be smoother.  That said, SQL server is supported, so if issues pop up, let us know and we will do our best to help.

 

Thanks,

Chris

 

 

From: [] On Behalf Of Klug, Lawrence
Sent: Wednesday, August 24, 2011 11:14 AM
To: Shilen Patel
Cc:
Subject: RE: [grouper-core] RE: GrouperStaleObjectStateException

 

Shilen,

 

Thanks for the suggestions.  Yesterday I was experimenting with various properties.   I turned on hibernate.show_sql and looked at some of the SQL being processed.  Then  I set hibernate.connection.autocommit to true, and the stale object exception stopped happening.  I plan to test with a new empty database next.  Also will Shibbolize the Grouper UI soon.

 

Regards,

 

Lawrence

 

 

 

From: Shilen Patel []
Sent: Wednesday, August 24, 2011 6:17 AM
To: Klug, Lawrence
Cc:
Subject: Re: [grouper-core] RE: GrouperStaleObjectStateException

 

I can try to get access to a 2005 database though it may take a few days.  Apparently our DBAs at Duke only have 2008 databases at the moment at least.  It would be nice if we could replicate the issue.

 

I'm not sure what's best to try next, but here are some thoughts.  Chris may have more ideas.

 

1.  Set hibernate.show_sql to true in grouper.hibernate.properties and let us see the output while you run gsh again.  Not sure if it would help but it may be revealing if something odd is going on.

 

2.  Try disabling savepoints just in case they are somehow causing the problem.  Set jdbc.useSavePoints to false in grouper.properties and then start gsh again.

 

3.  I'm not sure if sql server has any logs you can look at while you're starting gsh that show transactions being started, insert/update statements, commits, etc.  That may help.

 

Thanks!

 

-- Shilen

 

 

From: "Klug, Lawrence" <>
Date: Tue, 23 Aug 2011 11:45:13 -0700
To: Shilen Patel <>
Subject: RE: [grouper-core] RE: GrouperStaleObjectStateException

 

Got the word from above –upgrade to 2008 is not going to happen.  Is there some way I can fix the problem through other means?

 

Thanks,

 

Lawrence

 

From: Shilen Patel []
Sent: Thursday, August 18, 2011 3:53 PM
To: Klug, Lawrence
Subject: Re: [grouper-core] RE: GrouperStaleObjectStateException

 

Those stems should have been populated automatically.  It may be worth trying to upgrade your database like Chris suggested.

 

Thanks!

 

-- Shilen

 

 

From: "Klug, Lawrence" <>
Date: Thu, 18 Aug 2011 08:15:12 -0700
To: Shilen Patel <>
Subject: RE: [grouper-core] RE: GrouperStaleObjectStateException

 

SQLServer 2005 – ran those two queries – no error,  no rows returned.  How do these attributes get populated?  Is there a configuration setting for transactions?

 

Thanks,

 

Lawrence

 

From: Shilen Patel []
Sent: Thursday, August 18, 2011 4:18 AM
To: Klug, Lawrence; Chris Hyzer
Cc:
Subject: Re: [grouper-core] RE: GrouperStaleObjectStateException

 

That seems odd.  A few lines above in the code where this error took place, that stem should have been added (if it didn't already exist).  Does it exist now?

 

select * from grouper_stems where name='etc:attribute:attrExternalSubjectInvite'

 

How about its parent stem?

 

select * from grouper_stems where name='etc:attribute'

 

It almost seems as if transactions aren't working as expected somehow or they aren't committing.  What version of sql server are you running?

 

Thanks!

 

-- Shilen

 

 

From: "Klug, Lawrence" <>
Date: Wed, 17 Aug 2011 11:11:42 -0700
To: Shilen Patel <>, Chris Hyzer <>
Cc: "" <>
Subject: RE: [grouper-core] RE: GrouperStaleObjectStateException

 

Here is the error when starting via GSH command line (grouper.attribute.loader.autoconfigure = true):

 

C:\Users\lklug\Documents\workspace5\grouper.api-2.0.0\bin>gsh

Using GROUPER_HOME:           C:\Users\lklug\Documents\workspace5\grouper.api-2.0.0\bin\..

Using GROUPER_CONF:           C:\Users\lklug\Documents\workspace5\grouper.api-2.0.0\bin\../conf

Using JAVA:                   "C:\Program Files\Java\jdk1.6.0_26/bin/java"

using MEMORY:                 64m-512m

Grouper starting up: version: 2.0.0, build date: 2011/08/17 10:50:47, env: grouper2-dev-8-17

grouper.properties read from: C:\Users\lklug\Documents\workspace5\grouper.api-2.0.0\conf\grouper.properties

Grouper current directory is: C:\Users\lklug\Documents\workspace5\grouper.api-2.0.0\bin

log4j.properties read from:   C:\Users\lklug\Documents\workspace5\grouper.api-2.0.0\conf\log4j.properties

Grouper is logging to file:   C:\Users\lklug\Documents\workspace5\grouper.api-2.0.0\bin\..\logs\grouper_error.log, at min level WARN for package: edu.internet2.

middleware.grouper, based on log4j.properties

grouper.hibernate.properties: C:\Users\lklug\Documents\workspace5\grouper.api-2.0.0\conf\grouper.hibernate.properties

grouper.hibernate.properties:

sources.xml read from:        C:\Users\lklug\Documents\workspace5\grouper.api-2.0.0\conf\sources.xml

sources.xml groupersource id: g:gsa

sources.xml jndi source id:   ldap: uid=lqt,ou=edimi consumers,dc=edtest,dc=ucla,dc=edu@ldap://eds7.ais.ucla.edu:389

sources.xml jdbc source id:   jdbc: GrouperJdbcConnectionProvider

Grouper warning: cannot find group from config: wheel group from grouper.properties key: groups.wheel.group: etc:sysadmingroup

Grouper note: auto-created wheel group from grouper.properties key: groups.wheel.group: etc:sysadmingroup

Couldnt startup grouper: Cant find stem: 'etc:attribute:attrExternalSubjectInvite' (from update on stem name: 'etc:attribute:attrExternalSubjectInvite:externalS

ubjectInviteDef')

edu.internet2.middleware.grouper.exception.StemNotFoundException: Cant find stem: 'etc:attribute:attrExternalSubjectInvite' (from update on stem name: 'etc:attr

ibute:attrExternalSubjectInvite:externalSubjectInviteDef')

        at edu.internet2.middleware.grouper.attr.AttributeDefSave$1$1.callback(AttributeDefSave.java:450)

        at edu.internet2.middleware.grouper.GrouperSession.callbackGrouperSession(GrouperSession.java:644)

        at edu.internet2.middleware.grouper.attr.AttributeDefSave$1.callback(AttributeDefSave.java:419)

        at edu.internet2.middleware.grouper.internal.dao.hib3.Hib3TransactionDAO$1.callback(Hib3TransactionDAO.java:51)

        at edu.internet2.middleware.grouper.hibernate.HibernateSession.callbackHibernateSession(HibernateSession.java:500)

        at edu.internet2.middleware.grouper.internal.dao.hib3.Hib3TransactionDAO.transactionCallback(Hib3TransactionDAO.java:41)

        at edu.internet2.middleware.grouper.hibernate.GrouperTransaction.callbackGrouperTransaction(GrouperTransaction.java:72)

        at edu.internet2.middleware.grouper.hibernate.GrouperTransaction.callbackGrouperTransaction(GrouperTransaction.java:91)

        at edu.internet2.middleware.grouper.attr.AttributeDefSave.save(AttributeDefSave.java:412)

        at edu.internet2.middleware.grouper.misc.GrouperCheckConfig.checkAttributes(GrouperCheckConfig.java:1562)

        at edu.internet2.middleware.grouper.misc.GrouperCheckConfig.checkConfig(GrouperCheckConfig.java:419)

        at edu.internet2.middleware.grouper.misc.GrouperStartup.startup(GrouperStartup.java:109)

        at edu.internet2.middleware.grouper.app.gsh.GrouperShell.main(GrouperShell.java:135)

        at edu.internet2.middleware.grouper.app.gsh.GrouperShellWrapper.main(GrouperShellWrapper.java:16)

Exception in thread "main" edu.internet2.middleware.grouper.exception.StemNotFoundException: Cant find stem: 'etc:attribute:attrExternalSubjectInvite' (from upd

ate on stem name: 'etc:attribute:attrExternalSubjectInvite:externalSubjectInviteDef')

        at edu.internet2.middleware.grouper.attr.AttributeDefSave$1$1.callback(AttributeDefSave.java:450)

        at edu.internet2.middleware.grouper.GrouperSession.callbackGrouperSession(GrouperSession.java:644)

        at edu.internet2.middleware.grouper.attr.AttributeDefSave$1.callback(AttributeDefSave.java:419)

        at edu.internet2.middleware.grouper.internal.dao.hib3.Hib3TransactionDAO$1.callback(Hib3TransactionDAO.java:51)

        at edu.internet2.middleware.grouper.hibernate.HibernateSession.callbackHibernateSession(HibernateSession.java:500)

        at edu.internet2.middleware.grouper.internal.dao.hib3.Hib3TransactionDAO.transactionCallback(Hib3TransactionDAO.java:41)

        at edu.internet2.middleware.grouper.hibernate.GrouperTransaction.callbackGrouperTransaction(GrouperTransaction.java:72)

        at edu.internet2.middleware.grouper.hibernate.GrouperTransaction.callbackGrouperTransaction(GrouperTransaction.java:91)

        at edu.internet2.middleware.grouper.attr.AttributeDefSave.save(AttributeDefSave.java:412)

        at edu.internet2.middleware.grouper.misc.GrouperCheckConfig.checkAttributes(GrouperCheckConfig.java:1562)

        at edu.internet2.middleware.grouper.misc.GrouperCheckConfig.checkConfig(GrouperCheckConfig.java:419)

        at edu.internet2.middleware.grouper.misc.GrouperStartup.startup(GrouperStartup.java:109)

        at edu.internet2.middleware.grouper.app.gsh.GrouperShell.main(GrouperShell.java:135)

       at edu.internet2.middleware.grouper.app.gsh.GrouperShellWrapper.main(GrouperShellWrapper.java:16)

 

C:\Users\lklug\Documents\workspace5\grouper.api-2.0.0\bin>

 

From: Shilen Patel []
Sent: Wednesday, August 17, 2011 2:47 AM
To: Chris Hyzer; Klug, Lawrence
Cc:
Subject: Re: [grouper-core] RE: GrouperStaleObjectStateException

 

If the problem still occurs with the latest code, along with the stack trace, Lawrence it might be interesting to see the results of the following query:

 

select hibernate_version_number, id, name, assign_to_stem, multi_assignable from grouper_attribute_def where name='etc:attribute:attrExternalSubjectInvite:externalSubjectInviteDef'

 

Also, it seems like the first time you're "starting up" Grouper after installing the registry is using the UI.  If you see the error again, could you try reinstalling the registry and just starting GSH (running gsh.bat) with grouper.attribute.loader.autoconfigure set to true and see if that gives you the same exception.  I'm curious if the problem may somehow only be occurring when Grouper is first started by the UI.

 

Chris, the last commit doesn't seem like it will cause any new problems.  I'm also rerunning tests (on Oracle) just to be sure.

 

Thanks!

 

-- Shilen

 

 

From: Chris Hyzer <>
Date: Wed, 17 Aug 2011 04:32:31 +0000
To: "Klug, Lawrence" <>
Cc: "" <>
Subject: [grouper-core] RE: GrouperStaleObjectStateException

 

Lawrence,

 

Thanks for trying this stuff out, it will be helpful for us to figure out the problem since I cant reproduce it.

 

Im using SQL server 2008, I cleared out the DB, installed the registry, set that property, and it worked fine.  I don’t know if the issue is the version of SQL server, or your import from the previous version, not sure.

 

Can you try the latest grouper api binary (or however you do it), I just tweaked a few things, let me know the stack if you get an error.

 

Shilen, do you mind reviewing my last commit?  Im running the tests again on hsql.  I started up Grouper and it autocreated stuff fine.  Basically the change is not to read from cache when seeing if things exist.  Shilen, do you have any other thoughts about what might be going on?

 

http://www.internet2.edu/grouper/release/2.0.0/

 

Thanks!

Chris

 

From: Klug, Lawrence []
Sent: Tuesday, August 16, 2011 1:52 PM
To: Chris Hyzer
Subject: GrouperStaleObjectStateException

 

Hi Chris,

 

Downloaded and rebuilt the project today.  Same result – getting stale object error unless the grouper.attribute.loader.autoconfigure is switched off, in which case the exception goes away.

 

Note:  The SQLServer 2005 database was migrated from an earlier project  (grouper version 1.3, I believe) - is this a possible issue? 

 

Here is the registry check output:

----------------------------------------------------

 

C:\Users\lklug\Documents\workspace5\grouper.api-2.0.0\bin>gsh -registry -check -runscript

Using GROUPER_HOME:           C:\Users\lklug\Documents\workspace5\grouper.api-2.0.0\bin\..

Using GROUPER_CONF:           C:\Users\lklug\Documents\workspace5\grouper.api-2.0.0\bin\../conf

Using JAVA:                   "C:\Program Files\Java\jdk1.6.0_26/bin/java"

using MEMORY:                 64m-512m

Grouper starting up: version: 2.0.0, build date: 2011/08/16 09:17:45, env: grouper2 dev

grouper.properties read from: C:\Users\lklug\Documents\workspace5\grouper.api-2.0.0\conf\grouper.properties

Grouper current directory is: C:\Users\lklug\Documents\workspace5\grouper.api-2.0.0\bin

log4j.properties read from:   C:\Users\lklug\Documents\workspace5\grouper.api-2.0.0\conf\log4j.properties

Grouper is logging to file:   C:\Users\lklug\Documents\workspace5\grouper.api-2.0.0\bin\..\logs\grouper_error.log, at min level WARN for package: edu.internet2.

middleware.grouper, based on log4j.properties

grouper.hibernate.properties: C:\Users\lklug\Documents\workspace5\grouper.api-2.0.0\conf\grouper.hibernate.properties

grouper.hibernate.properties:

sources.xml read from:        C:\Users\lklug\Documents\workspace5\grouper.api-2.0.0\conf\sources.xml

sources.xml groupersource id: g:gsa

sources.xml jndi source id:   ldap: uid=lqt,ou=edimi consumers,dc=edtest,dc=ucla,dc=edu@ldap://eds7.ais.ucla.edu:389

sources.xml jdbc source id:   jdbc: GrouperJdbcConnectionProvider

(note, might need to type in your response multiple times (Java stdin is flaky))

(note, you can whitelist or blacklist db urls and users in the grouper.properties)

Are you sure you want to schemaexport all tables (dropThenCreate=F,writeAndRunScript=T) in db user 'mi_grouper', db url 'jdbc:jtds:sqlserver://aisdevdb.ais.ucla

.edu:1433/mi_grouper-devtest'? (y|n):

y

Continuing...

NOTE: database table/object structure (ddl) is up to date

 

C:\Users\lklug\Documents\workspace5\grouper.api-2.0.0\bin

 

Here is the stale object exception from today:

------------------------------------------------------------

 

edu.internet2.middleware.grouper.exception.GrouperStaleObjectStateException: Problem in HibernateSession: HibernateSession: isNew: false, isReadonly: false, grouperTransactionType: READ_WRITE_NEW,

Problem in HibernateSession: HibernateSession: isNew: true, isReadonly: false, grouperTransactionType: READ_WRITE_NEW

       at edu.internet2.middleware.grouper.hibernate.HibernateSession._internal_hibernateSessionCatch(HibernateSession.java:420)

       at edu.internet2.middleware.grouper.hibernate.HibernateSession.callbackHibernateSession(HibernateSession.java:510)

       at edu.internet2.middleware.grouper.hibernate.ByObjectStatic.saveOrUpdate(ByObjectStatic.java:339)

       at edu.internet2.middleware.grouper.internal.dao.hib3.Hib3AttributeDefDAO.saveOrUpdate(Hib3AttributeDefDAO.java:131)

       at edu.internet2.middleware.grouper.attr.AttributeDef$1.callback(AttributeDef.java:402)

       at edu.internet2.middleware.grouper.hibernate.HibernateSession.callbackHibernateSession(HibernateSession.java:500)

       at edu.internet2.middleware.grouper.attr.AttributeDef.store(AttributeDef.java:382)

       at edu.internet2.middleware.grouper.misc.GrouperCheckConfig.checkAttributes(GrouperCheckConfig.java:1567)

       at edu.internet2.middleware.grouper.misc.GrouperCheckConfig.checkConfig(GrouperCheckConfig.java:420)

       at edu.internet2.middleware.grouper.misc.GrouperStartup.startup(GrouperStartup.java:109)

       at edu.internet2.middleware.grouper.ui.GrouperUiFilter.init(GrouperUiFilter.java:613)

       at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:287)

       at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:422)

       at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:115)

       at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4071)

       at org.apache.catalina.core.StandardContext.start(StandardContext.java:4725)

       at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)

       at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)

       at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)

       at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)

       at org.apache.catalina.core.StandardService.start(StandardService.java:525)

       at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)

       at org.apache.catalina.startup.Catalina.start(Catalina.java:595)

       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

       at java.lang.reflect.Method.invoke(Method.java:597)

       at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)

       at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)

Caused by: org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [edu.internet2.middleware.grouper.attr.AttributeDef#ff7183702873412d9265ad4e30fbc7d3],

Exception in save: edu.internet2.middleware.grouper.attr.AttributeDef, : [edu.internet2.middleware.grouper.attr.AttributeDef#ff7183702873412d9265ad4e30fbc7d3]

       at org.hibernate.persister.entity.AbstractEntityPersister.check(AbstractEntityPersister.java:1769)

       at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2412)

       at org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:2312)

       at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2612)

       at org.hibernate.action.EntityUpdateAction.execute(EntityUpdateAction.java:96)

       at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:279)

       at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:263)

       at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:168)

       at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:298)

       at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)

       at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)

       at edu.internet2.middleware.grouper.hibernate.ByObject.saveOrUpdate(ByObject.java:362)

       at edu.internet2.middleware.grouper.hibernate.ByObjectStatic$5.callback(ByObjectStatic.java:352)

       at edu.internet2.middleware.grouper.hibernate.HibernateSession.callbackHibernateSession(HibernateSession.java:500)

       ... 27 more

 

Lawrence Klug

Grouper Integration

UCLA Middleware Services

Office: 310 825-2061

Cell: 818 667-2386

 




Archive powered by MHonArc 2.6.16.

Top of Page