Skip to Content.
Sympa Menu

grouper-users - RE: [grouper-users] UI error for subject previously in wheel group

Subject: Grouper Users - Open Discussion List

List archive

RE: [grouper-users] UI error for subject previously in wheel group


Chronological Thread 
  • From: Chris Hyzer <>
  • To: Scott Koranda <>
  • Cc: "GW Brown, Information Systems and Computing" <>, "" <>
  • Subject: RE: [grouper-users] UI error for subject previously in wheel group
  • Date: Wed, 18 Mar 2009 17:20:38 -0400
  • Accept-language: en-US
  • Acceptlanguage: en-US

Ok, I look at the message again, and it says:

PrivilegeHelper.java 237.

Then I look at that line number, and there is some less than ideal error
handling:

catch (Exception e) {
LOG.error("canViewMemberships: " + e.getMessage());
}
}
return mships;

What this means is that the error logged, without the stack (more underlying
information), and then the user just gets a result anyways, not really
knowing there is a problem (the error doesn't bubble up).

Scott, if you can tweak the source and rebuild, to this (note the comma and
e):

catch (Exception e) {
LOG.error("canViewMemberships: " + e.getMessage(), e );
}
}
return mships;

Then let the user hit it again, look in the logs, and hopefully we will have
the underlying cause here... sorry if that is painful...

I committed this tweak to 1.4 (will propagate in an hour or two to the
anonymous cvs)...

Gary, can you see if you know of a reason not to rethrow the exception and
cause there as an unchecked exception (long term fix)? I think it should not
swallow the exception unless there is a good reason.

Thanks!
Chris



> -----Original Message-----
> From: Scott Koranda
> [mailto:]
> Sent: Wednesday, March 18, 2009 5:04 PM
> To: Chris Hyzer
> Cc: GW Brown, Information Systems and Computing; grouper-
>
> Subject: Re: [grouper-users] UI error for subject previously in wheel
> group
>
> Hi,
>
> > More logs would be nice too.
>
> I turned up the logging to DEBUG but did not see
> anything else. I will try to do that again and have
> the user access the UI.
>
> >
> > That error says:
> >
> > Exception in uniqueResult: (class
> edu.internet2.middleware.grouper.Member), ByHqlStatic, query: 'from
> Member as m where m.subjectIdDb = :sid and m.subjectSourceIdDb =
> :source and m.subjectTypeId = :type'
> >
> > Which looks like it might mean there are two or
> > more rows in your grouper_members table with the
> > same subject_id, source_id, and type. I don't know
> > how this is possible since I believe there should
> > be a unique index on those cols. Try running this
> > query, and see if it returns any rows:
> >
> > select gm1.SUBJECT_ID, gm2.SUBJECT_ID,
> > gm1.SUBJECT_SOURCE, gm2.SUBJECT_SOURCE from
> > grouper_members gm1, grouper_members gm2 where
> > gm1.SUBJECT_ID = gm2.SUBJECT_ID and gm1.ID !=
> > gm2.ID
>
> It does not return any rows:
>
> mysql> SELECT gm1.SUBJECT_ID, gm2.SUBJECT_ID,
> gm1.SUBJECT_SOURCE,gm2.SUBJECT_SOURCE FROM
> grouper_members gm1, grouper_members gm2 WHERE
> gm1.SUBJECT_ID = gm2.SUBJECT_ID and gm1.ID != gm2.ID;
> Empty set (0.04 sec)
>
>
> >
> > And see if there is a unique index on that table
> > for those 3 cols...
>
> *************************** 1. row ***************************
> Table: grouper_members
> Non_unique: 0
> Key_name: PRIMARY
> Seq_in_index: 1
> Column_name: id
> Collation: A
> Cardinality: 940
> Sub_part: NULL
> Packed: NULL
> Null:
> Index_type: BTREE
> Comment:
> *************************** 2. row ***************************
> Table: grouper_members
> Non_unique: 0
> Key_name: member_subjectsourcetype_idx
> Seq_in_index: 1
> Column_name: subject_id
> Collation: A
> Cardinality: 940
> Sub_part: NULL
> Packed: NULL
> Null:
> Index_type: BTREE
> Comment:
> *************************** 3. row ***************************
> Table: grouper_members
> Non_unique: 0
> Key_name: member_subjectsourcetype_idx
> Seq_in_index: 2
> Column_name: subject_source
> Collation: A
> Cardinality: 940
> Sub_part: NULL
> Packed: NULL
> Null:
> Index_type: BTREE
> Comment:
> *************************** 4. row ***************************
> Table: grouper_members
> Non_unique: 0
> Key_name: member_subjectsourcetype_idx
> Seq_in_index: 3
> Column_name: subject_type
> Collation: A
> Cardinality: 940
> Sub_part: NULL
> Packed: NULL
> Null:
> Index_type: BTREE
> Comment:
> *************************** 5. row ***************************
> Table: grouper_members
> Non_unique: 1
> Key_name: member_subjectsource_idx
> Seq_in_index: 1
> Column_name: subject_source
> Collation: A
> Cardinality: 1
> Sub_part: NULL
> Packed: NULL
> Null:
> Index_type: BTREE
> Comment:
> *************************** 6. row ***************************
> Table: grouper_members
> Non_unique: 1
> Key_name: member_subjectid_idx
> Seq_in_index: 1
> Column_name: subject_id
> Collation: A
> Cardinality: 940
> Sub_part: NULL
> Packed: NULL
> Null:
> Index_type: BTREE
> Comment:
> *************************** 7. row ***************************
> Table: grouper_members
> Non_unique: 1
> Key_name: member_subjecttype_idx
> Seq_in_index: 1
> Column_name: subject_type
> 7 rows in set (0.03 sec)
>
>
>
> >
> > If there is more in the logs then this might be the
> > wrong path, but Gary asked me to look at the error
> > message, so I did. :)
> >
> > Chris
> >
> >
> >
> > > -----Original Message----- From: GW Brown,
> > > Information Systems and Computing
> > > [mailto:]
> > > Sent:
> > > Wednesday, March 18, 2009 3:31 PM To: Scott
> > > Koranda;
> > >
> > > Subject: Re:
> > > [grouper-users] UI error for subject previously
> > > in wheel group
> > >
> > > Hi Scott,
> > >
> > > You can send me the actual HTML and I'll take a
> > > look.
> > >
> > > Does the problem persist if the ui webapp is
> > > restarted?
> > >
> > > I had a quick go at removing someone from the
> > > wheel group but can't see any problems. May be
> > > Chris can see something in the error?
> > >
> > > Gary
> > >
> > > --On 18 March 2009 12:14 -0700 Scott Koranda
> > > <>
> > > wrote:
> > >
> > > > Hi,
> > > >
> > > > We are running the Grouper UI from 1.4.1.
> > > >
> > > > I had a subject that I had added to our
> > > > etc:sysadmingroup. That is our 'wheel' group,
> > > > i.e. in grouper.properties we have
> > > >
> > > > groups.wheel.use = true groups.wheel.group =
> > > > etc:sysadmingroup
> > > >
> > > > Later I removed that subject from that wheel
> > > > group.
> > > >
> > > > Now when the user browses to the UI after a
> > > > long pause he sees only the words "My
> > > > memberships" and nothing else. I have the
> > > > actual HTML delivered to the browser and can
> > > > post it if that would help.
> > > >
> > > > Note that this happens with whatever browser
> > > > the user uses. It is not browser related.
> > > >
> > > > The only suspicious thing I see in the logs is
> > > > this:
> > > >
> > > > 2009-03-18 14:05:35,159: [TP-Processor6] ERROR
> > > > PrivilegeHelper.canViewMemberships(237) -
> > > > canViewMemberships: Problem
> > > in
> > > > HibernateSession: HibernateSession: isNew:
> > > > true, isReadonly: true, grouperTransactionType:
> > > > READONLY_NEW, Exception in uniqueResult: (class
> > > edu.internet2.middleware.grouper.Memb
> > > > er), ByHqlStatic, query: 'from Member as m
> > > > where m.subjectIdDb = :sid and
> > > > m.subjectSourceIdDb = :source and
> > > > m.subjectTypeId = :type', cacheable: true,
> > > > cacheRegion: edu.internet2.middleware.groupe
> > > > r.internal.dao.hib3.Hib3MemberDAO.FindBySubject,
> > > > tx type: nullBind var[ 0]: 'Param (class
> > > > java.lang.String): 'sid'->'GrouperAll', Bind
> > > > var[1]: 'Param (class java.lang.String):
> > > > 'type'->'application'Bind var[2]: 'Par am
> > > > (class java.lang.String): 'source'->'g:isa',
> > > >
> > > > Any ideas on how I can workaround this problem
> > > > for this user?
> > > >
> > > > All other users/subjects are having no problems
> > > > browsing the UI.
> > > >
> > > > Thanks,
> > > >
> > > > Scott
> > >
> > >
> > >
> > > ---------------------- GW Brown, Information
> > > Systems and Computing
> > >



Archive powered by MHonArc 2.6.16.

Top of Page