Skip to Content.
Sympa Menu

grouper-users - Re: [grouper-users] Problem with the UI

Subject: Grouper Users - Open Discussion List

List archive

Re: [grouper-users] Problem with the UI


Chronological Thread 
  • From: Steve Lemons <>
  • To:
  • Cc: "GW Brown, Information Systems and Computing" <>
  • Subject: Re: [grouper-users] Problem with the UI
  • Date: Sat, 2 Sep 2006 21:20:03 -0400

I finally figured out what was the root causes of my problem.  Initially when I setup my sources.xml file, I was lazy and decided to use an account that had access to everything in the directory and not specify any return attributes.  Which resulted in all of the attributes for an entry to be returned.
 
How this caused the problem is that we have a couple of binary attributes, jpegPhoto for one, in our directory and the account I used has access to them.  So, each time the Subject.getAttributes() method was called by the grouper UI, an exception of one sort or another was thrown.  Ultimately, the exception getting thrown was a ClassCastException by the JNDISourceAdapter.loadAttributes().  The loadAttributes method cast the returned attribute values as String objects.  This was fine, until it ran up against jpegPhoto, thus the ClassCastException.

As a work around I wrapped in the JNDISourceAdapther.loadAttributes method, the line doing the casting with a try/catch block to catch the ClassCastExeption and then to replace the binary value with, in my case, the following string "[Binary value]".  See the patch below.

279a280
>                
285,286c286,294
<                         String value = (String) en.next();
<                         values.add(value);
---
>                         String value;
>                          try {
>                                 value = (String) en.next();
>                                values.add(value);
>                          } catch (ClassCastException e1) {
>                                log.warn("Unable to cast attribute: " + name + " value to a string");
>                                values.add("[Binary value]");
>                         }
>
304a313
>                        
354d362
<  

I'm sure there is a better way of dealing with binary values, but this works for me.


steve



On Sep 1, 2006, at 7:48 PM, Steve Lemons wrote:


On Sep 1, 2006, at 3:54 AM, GW Brown, Information Systems and Computing wrote:


The isGroup attribute is a UI artifact. I'm not sure why it was breaking for you but it may be to do with the JNDI Adapter behaving differently to the JDBC adapter. I'll add this to my list of things to check.


I have narrowed down the problem a little further. As long as you have attribute elements defined for the JNDI source, the UI works fine out of the box.  If you don't have any attribute elements, as I did initially, then you experience problems with the subjectView.jsp and with the subject summary page.



steve




Archive powered by MHonArc 2.6.16.

Top of Page