grouper-users - Re: [grouper-users] Grouper loader: PIT query returns NonUniqueResultException
Subject: Grouper Users - Open Discussion List
List archive
- From: Shilen Patel <>
- To: Francesco Malvezzi <>, "" <>
- Subject: Re: [grouper-users] Grouper loader: PIT query returns NonUniqueResultException
- Date: Fri, 13 Apr 2012 12:47:09 +0000
- Accept-language: en-US
Hi,
So it looks like, based on the point in time data, that your root stem was
created on Jan 16. But for some reason, the temp change log still
contains a stem add change for the root stem. This process should
immediately clear out changes in the temp change log once it is done
processing the change and populating the actual change log table.
Did you by any chance restore a subset of the Grouper tables from a backup
at any point after Jan 16?
Thanks!
-- Shilen
On 4/13/12 4:56 AM, "Francesco Malvezzi"
<>
wrote:
>Hi all,
>
>this time I'm not able to have loader working. When I launch:
>
>sudo ./bin/gsh.sh -loader
>
>Logs report a query is failing with 'NonUniqueResultException'.
>
>the (non-very-readable) output from query:
>
>select p.* from grouper_pit_stems p;
>
>is:
>
>"ID";"NAME";"PARENT_STEM_ID";"ACTIVE";"START_TIME";"END_TIME";"CONTEXT_ID"
>;"HIBERNATE_VERSION_NUMBER";"SOURCE_ID"
>"61e5fc8a4f3a45c9a709878d375c1259";"unimore";"0056301aec754cab9202db509102
>0c4d";"T";"1,326725496143E15";"";"58c63114bda642699040748bc326d961";"0";"6
>1e5fc8a4f3a45c9a709878d375c1259"
>"0056301aec754cab9202db5091020c4d";":";"";"T";"1,326725496143E15";"";"";"0
>";"0056301aec754cab9202db5091020c4d"
>
>grouper version is 2.1.0 (downloaded this morning).
>
>I'm not able to understand what is happening, but from a heuristic point
>of view, there are two duplications is our grouper setup:
>1) simple groups and samba groups in psp.xml and psp-resolver.xml
>2) provisioning to ldap1 and ldap2
>actually loader should not be connected with psp, but these are the only
>duplications I can think about.
>
>Thank you,
>
>Francesco
>
>complete stack is:
>
>2012-04-13 09:31:51,111: [DefaultQuartzScheduler_Worker-5] ERROR
>GrouperLoaderJob.runJob(387) - - Error on job:
>CHANGE_LOG_changeLogTempToChangeLog
>edu.internet2.middleware.grouper.internal.dao.GrouperDAOException:
>Problem in HibernateSession: HibernateSession: isNew: false, isReadonly:
>false, grouperTransactionType: READ_WRITE_NEW,
>Exception in uniqueResult: (class
>edu.internet2.middleware.grouper.pit.PITStem), ByHqlStatic, query:
>'select pitStem from PITStem as pitStem where pitStem.sourceId = :id and
>activeDb = 'T'', cacheable: true, cacheRegion:
>edu.internet2.middleware.grouper.internal.dao.hib3.Hib3PITStemDAO.FindBySo
>urceIdActive,
>tx type: null, tx type: nullBind var[0]: 'Param (class
>java.lang.String): 'id'->'0056301aec754cab9202db5091020c4d', ,
>Problem in HibernateSession: HibernateSession: isNew: true, isReadonly:
>false, grouperTransactionType: READ_WRITE_NEW
> at
>edu.internet2.middleware.grouper.hibernate.HibernateSession._internal_hibe
>rnateSessionCatch(HibernateSession.java:433)
> at
>edu.internet2.middleware.grouper.hibernate.HibernateSession.callbackHibern
>ateSession(HibernateSession.java:519)
> at
>edu.internet2.middleware.grouper.hibernate.ByHqlStatic.uniqueResult(ByHqlS
>tatic.java:297)
> at
>edu.internet2.middleware.grouper.internal.dao.hib3.Hib3PITStemDAO.findBySo
>urceIdActive(Hib3PITStemDAO.java:58)
> at
>edu.internet2.middleware.grouper.internal.dao.hib3.Hib3PITGroupSetDAO.inse
>rtSelfPITGroupSetsByOwner(Hib3PITGroupSetDAO.java:136)
> at
>edu.internet2.middleware.grouper.changeLog.ChangeLogTempToEntity.processSt
>emAdd(ChangeLogTempToEntity.java:332)
> at
>edu.internet2.middleware.grouper.changeLog.ChangeLogTempToEntity.access$30
>0(ChangeLogTempToEntity.java:44)
> at
>edu.internet2.middleware.grouper.changeLog.ChangeLogTempToEntity$1.callbac
>k(ChangeLogTempToEntity.java:92)
> at
>edu.internet2.middleware.grouper.hibernate.HibernateSession.callbackHibern
>ateSession(HibernateSession.java:509)
> at
>edu.internet2.middleware.grouper.changeLog.ChangeLogTempToEntity.convertRe
>cords(ChangeLogTempToEntity.java:76)
> at
>edu.internet2.middleware.grouper.app.loader.GrouperLoaderType$4.runJob(Gro
>uperLoaderType.java:524)
> at
>edu.internet2.middleware.grouper.app.loader.GrouperLoaderJob.runJob(Groupe
>rLoaderJob.java:379)
> at
>edu.internet2.middleware.grouper.app.loader.GrouperLoaderJob.execute(Group
>erLoaderJob.java:281)
> at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
> at
>org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:5
>29)
>Caused by: org.hibernate.NonUniqueResultException: query did not return
>a unique result: 2
> at
>org.hibernate.impl.AbstractQueryImpl.uniqueElement(AbstractQueryImpl.java:
>899)
> at
>org.hibernate.impl.AbstractQueryImpl.uniqueResult(AbstractQueryImpl.java:8
>90)
> at
>edu.internet2.middleware.grouper.hibernate.ByHql.uniqueResult(ByHql.java:2
>42)
> at
>edu.internet2.middleware.grouper.hibernate.ByHqlStatic$1.callback(ByHqlSta
>tic.java:306)
> at
>edu.internet2.middleware.grouper.hibernate.HibernateSession.callbackHibern
>ateSession(HibernateSession.java:509)
> ... 13 more
>2012-04-13 09:31:51,153: [DefaultQuartzScheduler_Worker-5] ERROR
>GrouperLoaderJob.execute(284) - - Error running up job
>edu.internet2.middleware.grouper.internal.dao.GrouperDAOException:
>Problem in HibernateSession: HibernateSession: isNew: false, isReadonly:
>false, grouperTransactionType: READ_WRITE_NEW,
>Exception in uniqueResult: (class
>edu.internet2.middleware.grouper.pit.PITStem), ByHqlStatic, query:
>'select pitStem from PITStem as pitStem where pitStem.sourceId = :id and
>activeDb = 'T'', cacheable: true, cacheRegion:
>edu.internet2.middleware.grouper.internal.dao.hib3.Hib3PITStemDAO.FindBySo
>urceIdActive,
>tx type: null, tx type: nullBind var[0]: 'Param (class
>java.lang.String): 'id'->'0056301aec754cab9202db5091020c4d', ,
>Problem in HibernateSession: HibernateSession: isNew: true, isReadonly:
>false, grouperTransactionType: READ_WRITE_NEW
> at
>edu.internet2.middleware.grouper.hibernate.HibernateSession._internal_hibe
>rnateSessionCatch(HibernateSession.java:433)
> at
>edu.internet2.middleware.grouper.hibernate.HibernateSession.callbackHibern
>ateSession(HibernateSession.java:519)
> at
>edu.internet2.middleware.grouper.hibernate.ByHqlStatic.uniqueResult(ByHqlS
>tatic.java:297)
> at
>edu.internet2.middleware.grouper.internal.dao.hib3.Hib3PITStemDAO.findBySo
>urceIdActive(Hib3PITStemDAO.java:58)
> at
>edu.internet2.middleware.grouper.internal.dao.hib3.Hib3PITGroupSetDAO.inse
>rtSelfPITGroupSetsByOwner(Hib3PITGroupSetDAO.java:136)
> at
>edu.internet2.middleware.grouper.changeLog.ChangeLogTempToEntity.processSt
>emAdd(ChangeLogTempToEntity.java:332)
> at
>edu.internet2.middleware.grouper.changeLog.ChangeLogTempToEntity.access$30
>0(ChangeLogTempToEntity.java:44)
> at
>edu.internet2.middleware.grouper.changeLog.ChangeLogTempToEntity$1.callbac
>k(ChangeLogTempToEntity.java:92)
> at
>edu.internet2.middleware.grouper.hibernate.HibernateSession.callbackHibern
>ateSession(HibernateSession.java:509)
> at
>edu.internet2.middleware.grouper.changeLog.ChangeLogTempToEntity.convertRe
>cords(ChangeLogTempToEntity.java:76)
> at
>edu.internet2.middleware.grouper.app.loader.GrouperLoaderType$4.runJob(Gro
>uperLoaderType.java:524)
> at
>edu.internet2.middleware.grouper.app.loader.GrouperLoaderJob.runJob(Groupe
>rLoaderJob.java:379)
> at
>edu.internet2.middleware.grouper.app.loader.GrouperLoaderJob.execute(Group
>erLoaderJob.java:281)
> at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
> at
>org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:5
>29)
>Caused by: org.hibernate.NonUniqueResultException: query did not return
>a unique result: 2
> at
>org.hibernate.impl.AbstractQueryImpl.uniqueElement(AbstractQueryImpl.java:
>899)
> at
>org.hibernate.impl.AbstractQueryImpl.uniqueResult(AbstractQueryImpl.java:8
>90)
> at
>edu.internet2.middleware.grouper.hibernate.ByHql.uniqueResult(ByHql.java:2
>42)
> at
>edu.internet2.middleware.grouper.hibernate.ByHqlStatic$1.callback(ByHqlSta
>tic.java:306)
> at
>edu.internet2.middleware.grouper.hibernate.HibernateSession.callbackHibern
>ateSession(HibernateSession.java:509)
> ... 13 more
>
>
>PS If I change the active flag to F, the error is in a query to
>grouper_pit_groups
- [grouper-users] Grouper loader: PIT query returns NonUniqueResultException, Francesco Malvezzi, 04/13/2012
- Re: [grouper-users] Grouper loader: PIT query returns NonUniqueResultException, Shilen Patel, 04/13/2012
Archive powered by MHonArc 2.6.16.