Skip to Content.
Sympa Menu

grouper-users - [grouper-users] Grouper loader: PIT query returns NonUniqueResultException

Subject: Grouper Users - Open Discussion List

List archive

[grouper-users] Grouper loader: PIT query returns NonUniqueResultException


Chronological Thread 
  • From: Francesco Malvezzi <>
  • To: "" <>
  • Subject: [grouper-users] Grouper loader: PIT query returns NonUniqueResultException
  • Date: Fri, 13 Apr 2012 10:56:01 +0200
  • Unimore-x-sa-score: -1.2

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";"0056301aec754cab9202db5091020c4d";"T";"1,326725496143E15";"";"58c63114bda642699040748bc326d961";"0";"61e5fc8a4f3a45c9a709878d375c1259"
"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.FindBySourceIdActive,
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_hibernateSessionCatch(HibernateSession.java:433)
at
edu.internet2.middleware.grouper.hibernate.HibernateSession.callbackHibernateSession(HibernateSession.java:519)
at
edu.internet2.middleware.grouper.hibernate.ByHqlStatic.uniqueResult(ByHqlStatic.java:297)
at
edu.internet2.middleware.grouper.internal.dao.hib3.Hib3PITStemDAO.findBySourceIdActive(Hib3PITStemDAO.java:58)
at
edu.internet2.middleware.grouper.internal.dao.hib3.Hib3PITGroupSetDAO.insertSelfPITGroupSetsByOwner(Hib3PITGroupSetDAO.java:136)
at
edu.internet2.middleware.grouper.changeLog.ChangeLogTempToEntity.processStemAdd(ChangeLogTempToEntity.java:332)
at
edu.internet2.middleware.grouper.changeLog.ChangeLogTempToEntity.access$300(ChangeLogTempToEntity.java:44)
at
edu.internet2.middleware.grouper.changeLog.ChangeLogTempToEntity$1.callback(ChangeLogTempToEntity.java:92)
at
edu.internet2.middleware.grouper.hibernate.HibernateSession.callbackHibernateSession(HibernateSession.java:509)
at
edu.internet2.middleware.grouper.changeLog.ChangeLogTempToEntity.convertRecords(ChangeLogTempToEntity.java:76)
at
edu.internet2.middleware.grouper.app.loader.GrouperLoaderType$4.runJob(GrouperLoaderType.java:524)
at
edu.internet2.middleware.grouper.app.loader.GrouperLoaderJob.runJob(GrouperLoaderJob.java:379)
at
edu.internet2.middleware.grouper.app.loader.GrouperLoaderJob.execute(GrouperLoaderJob.java:281)
at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
at
org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:529)
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:890)
at
edu.internet2.middleware.grouper.hibernate.ByHql.uniqueResult(ByHql.java:242)
at
edu.internet2.middleware.grouper.hibernate.ByHqlStatic$1.callback(ByHqlStatic.java:306)
at
edu.internet2.middleware.grouper.hibernate.HibernateSession.callbackHibernateSession(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.FindBySourceIdActive,
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_hibernateSessionCatch(HibernateSession.java:433)
at
edu.internet2.middleware.grouper.hibernate.HibernateSession.callbackHibernateSession(HibernateSession.java:519)
at
edu.internet2.middleware.grouper.hibernate.ByHqlStatic.uniqueResult(ByHqlStatic.java:297)
at
edu.internet2.middleware.grouper.internal.dao.hib3.Hib3PITStemDAO.findBySourceIdActive(Hib3PITStemDAO.java:58)
at
edu.internet2.middleware.grouper.internal.dao.hib3.Hib3PITGroupSetDAO.insertSelfPITGroupSetsByOwner(Hib3PITGroupSetDAO.java:136)
at
edu.internet2.middleware.grouper.changeLog.ChangeLogTempToEntity.processStemAdd(ChangeLogTempToEntity.java:332)
at
edu.internet2.middleware.grouper.changeLog.ChangeLogTempToEntity.access$300(ChangeLogTempToEntity.java:44)
at
edu.internet2.middleware.grouper.changeLog.ChangeLogTempToEntity$1.callback(ChangeLogTempToEntity.java:92)
at
edu.internet2.middleware.grouper.hibernate.HibernateSession.callbackHibernateSession(HibernateSession.java:509)
at
edu.internet2.middleware.grouper.changeLog.ChangeLogTempToEntity.convertRecords(ChangeLogTempToEntity.java:76)
at
edu.internet2.middleware.grouper.app.loader.GrouperLoaderType$4.runJob(GrouperLoaderType.java:524)
at
edu.internet2.middleware.grouper.app.loader.GrouperLoaderJob.runJob(GrouperLoaderJob.java:379)
at
edu.internet2.middleware.grouper.app.loader.GrouperLoaderJob.execute(GrouperLoaderJob.java:281)
at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
at
org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:529)
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:890)
at
edu.internet2.middleware.grouper.hibernate.ByHql.uniqueResult(ByHql.java:242)
at
edu.internet2.middleware.grouper.hibernate.ByHqlStatic$1.callback(ByHqlStatic.java:306)
at
edu.internet2.middleware.grouper.hibernate.HibernateSession.callbackHibernateSession(HibernateSession.java:509)
... 13 more


PS If I change the active flag to F, the error is in a query to
grouper_pit_groups



Archive powered by MHonArc 2.6.16.

Top of Page