grouper-users - Re: [grouper-users] Problem with the UI
Subject: Grouper Users - Open Discussion List
List archive
- 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:
|
- Re: [grouper-users] Problem with the UI, GW Brown, Information Systems and Computing, 09/01/2006
- Re: [grouper-users] Problem with the UI, Steve Lemons, 09/01/2006
- Re: [grouper-users] Problem with the UI, Steve Lemons, 09/02/2006
- Re: [grouper-users] Problem with the UI, Tom Barton, 09/02/2006
- Re: [grouper-users] Problem with the UI, Steve Lemons, 09/02/2006
- Re: [grouper-users] Problem with the UI, Steve Lemons, 09/01/2006
Archive powered by MHonArc 2.6.16.