grouper-users - Re: [grouper-users] Using a custom attribute for subject display
Subject: Grouper Users - Open Discussion List
List archive
- From: Peter DiCamillo <>
- To: "" <>
- Subject: Re: [grouper-users] Using a custom attribute for subject display
- Date: Fri, 03 Aug 2012 15:37:38 -0400
There may be a problem after all. In addition to adding an attribute, I'm also using the filter to remove some attributes for non-privileged users. However, the attributes are not removed when I used Export Members for a group. Maybe there's another missing call to the subject filter?
Export Member creates a file with all the data (too much data in this case), but also generates a null pointer exception in the log. It appears to be trying to display an error message, but failing. I've attached the log data.
Peter
On 8/3/12 1:50 PM, Peter DiCamillo wrote:
Thanks for the quick fix and example code. I updated from svn, changed2012-08-03 15:09:28,630 ERROR ui.ErrorFilter: < test001
the code for the attribute values I wanted, and it works great now.
Peter
On 8/3/12 1:47 AM, Chris Hyzer wrote:
Unfortunately the subject query method that the UI uses wasnt calling
the subject filter in 2.1.1. I fixed this and tested in 2.1.2
(currently in the svn branch GROUPER_2_1_BRANCH)
I used the subject customizer Java class (attached). I configured it
in the grouper.properties:
# customize subjects by implementing this interface:
edu.internet2.middleware.grouper.subj.SubjectCustomizer
# or extending this class:
edu.internet2.middleware.grouper.subj.SubjectCustomizerBase (recommended)
# note the instance will be reused to make sure it is threadsafe
subjects.customizer.className =
edu.internet2.middleware.grouper.subj.decoratorExamples.SubjectCustomizerForDecoratorUiDisplay
I configured the media.propeties (note that for the lite UI you need
to edit the grouper/media.properties and not the
custom/media.properties, see GRP-829):
# for jdbc subjects in admin ui
subject.display.jdbc=uiLabel
# lite display settings
grouperUi.subjectImg.screenEl.1 = ${subject.getAttributeValue('uiLabel')}
Then I created the group (you can change this in the java source):
etc:privilegedGroup, and added some users to it.
When I logged in as those users, I saw a different display more info),
than when I logged in as users not in that group. If you can pull
Grouper and Grouper-UI from the branch, try it out. Otherwise, 2.1.2
should be out shortly :)
Thanks,
Chris
________________________________________
From:
[]
on behalf of Peter DiCamillo
[]
Sent: Thursday, August 02, 2012 4:08 PM
To:
Subject: [grouper-users] Using a custom attribute for subject display
We're upgrading to Grouper 2.1.1, and I'm trying to improve how we
display subjects in the Grouper UI. Ideally, I'd like to display either:
lastname, firstname or
lastname, firstname (internal_id)
The internal id is confidential, but very convenient for privileged
staff who are allowed to access it. Grouper would include the internal
id in subject displays when a session's subject is privileged.
I tried to do this by defining a new attribute for subjects, and
specifying it for the source's subject.display attribute in
media.properies. First I tried to add the attribute to subjects using an
override for decorateSubjects. However, I never saw decorateSubjects
being called for subject display. After that, I tried overriding
filterSubjects, and adding the attribute to the subjects' attribute
maps. That worked for search results, but didn't work for group
membership results. Finally, while still using filterSubjects, I tried
defining a virtual attribute from the added attribute, and that didn't
work at all.
Is there a way to do what I want to do, or is it to too ambitious? The
new video regarding this topic was very helpful, and gave me the idea
this might be possible. Even if it isn't, I'm impressed by what clearly
is possible now.
Peter
C5F6B3443634B07295F7DEE1FA579633-0011 46c90cc2ff244ac889b474ab11bf62c8
999999001 brown:LDAP > java.lang.NullPointerException
at
edu.internet2.middleware.grouper.ui.actions.GrouperCapableAction.execute(GrouperCapableAction.java:333)
at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:439)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:241)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646)
at
org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
at
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
at
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
at
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1074)
at
org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:276)
at
org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:406)
at
org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:331)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:246)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
edu.internet2.middleware.grouper.ui.LoginCheckFilter$1.callback(LoginCheckFilter.java:188)
at
edu.internet2.middleware.grouper.GrouperSession.callbackGrouperSession(GrouperSession.java:801)
at
edu.internet2.middleware.grouper.ui.LoginCheckFilter.doFilter(LoginCheckFilter.java:183)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
edu.internet2.middleware.grouper.ui.ErrorFilter.doFilter(ErrorFilter.java:147)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
edu.internet2.middleware.grouper.ui.GrouperUiFilter.doFilter(GrouperUiFilter.java:822)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:470)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at
org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:877)
at
org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:594)
at
org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1675)
at java.lang.Thread.run(Thread.java:662)
2012-08-03 15:09:28,634 ERROR ui.TileRecorderTag: < test001
C5F6B3443634B07295F7DEE1FA579633-0011 46c90cc2ff244ac889b474ab11bf62c8
999999001 brown:LDAP > java.lang.IllegalStateException: getOutputStream() has
already been called for this response
2012-08-03 15:09:28,637 ERROR ui.ErrorFilter: < test001
C5F6B3443634B07295F7DEE1FA579633-0011 46c90cc2ff244ac889b474ab11bf62c8
999999001 brown:LDAP > Failed to include error page:
org.apache.jasper.JasperException: java.lang.IllegalStateException:
getOutputStream() has already been called for this response
at
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:502)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:424)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646)
at
org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:551)
at
org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:488)
at
org.apache.struts.action.RequestProcessor.doInclude(RequestProcessor.java:1105)
at
org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:273)
at
org.apache.struts.tiles.TilesRequestProcessor.processTilesDefinition(TilesRequestProcessor.java:252)
at
org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:315)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:246)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646)
at
org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:551)
at
org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:488)
at
edu.internet2.middleware.grouper.ui.ErrorFilter.doFilter(ErrorFilter.java:171)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
edu.internet2.middleware.grouper.ui.GrouperUiFilter.doFilter(GrouperUiFilter.java:822)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:470)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at
org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:877)
at
org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:594)
at
org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1675)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.IllegalStateException: getOutputStream() has already
been called for this response
at org.apache.catalina.connector.Response.getWriter(Response.java:611)
at
org.apache.catalina.connector.ResponseFacade.getWriter(ResponseFacade.java:198)
at
javax.servlet.ServletResponseWrapper.getWriter(ServletResponseWrapper.java:112)
at
javax.servlet.ServletResponseWrapper.getWriter(ServletResponseWrapper.java:112)
at
org.apache.jasper.runtime.JspWriterImpl.initOut(JspWriterImpl.java:125)
at
org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java:118)
at
org.apache.jasper.runtime.PageContextImpl.release(PageContextImpl.java:180)
at
org.apache.jasper.runtime.JspFactoryImpl.internalReleasePageContext(JspFactoryImpl.java:118)
at
org.apache.jasper.runtime.JspFactoryImpl.releasePageContext(JspFactoryImpl.java:77)
at
org.apache.jsp.WEB_002dINF.jsp.template_jsp._jspService(template_jsp.java:291)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:388)
... 39 more
2012-08-03 15:09:28,649 ERROR ui.GrouperUiFilter: UI error
java.lang.IllegalStateException
at
org.apache.catalina.connector.ResponseFacade.sendError(ResponseFacade.java:421)
at
edu.internet2.middleware.grouper.ui.ErrorFilter.doFilter(ErrorFilter.java:175)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
edu.internet2.middleware.grouper.ui.GrouperUiFilter.doFilter(GrouperUiFilter.java:822)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:470)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at
org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:877)
at
org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:594)
at
org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1675)
at java.lang.Thread.run(Thread.java:662)
2012-08-03 15:09:28,651 ERROR ui.TileRecorderTag:
java.lang.IllegalStateException: getOutputStream() has already been called
for this response
2012-08-03 15:09:28,653 ERROR ui.GrouperUiFilter: Failed to include error
page:
org.apache.jasper.JasperException: java.lang.IllegalStateException:
getOutputStream() has already been called for this response
at
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:502)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:424)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646)
at
org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:551)
at
org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:488)
at
org.apache.struts.action.RequestProcessor.doInclude(RequestProcessor.java:1105)
at
org.apache.struts.tiles.TilesRequestProcessor.processTilesDefinition(TilesRequestProcessor.java:250)
at
org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:315)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:246)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646)
at
org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:551)
at
org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:488)
at
edu.internet2.middleware.grouper.ui.GrouperUiFilter.doFilter(GrouperUiFilter.java:843)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:470)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at
org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:877)
at
org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:594)
at
org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1675)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.IllegalStateException: getOutputStream() has already
been called for this response
at org.apache.catalina.connector.Response.getWriter(Response.java:611)
at
org.apache.catalina.connector.ResponseFacade.getWriter(ResponseFacade.java:198)
at
javax.servlet.ServletResponseWrapper.getWriter(ServletResponseWrapper.java:112)
at
javax.servlet.ServletResponseWrapper.getWriter(ServletResponseWrapper.java:112)
at
org.apache.jasper.runtime.JspWriterImpl.initOut(JspWriterImpl.java:125)
at
org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java:118)
at
org.apache.jasper.runtime.PageContextImpl.release(PageContextImpl.java:180)
at
org.apache.jasper.runtime.JspFactoryImpl.internalReleasePageContext(JspFactoryImpl.java:118)
at
org.apache.jasper.runtime.JspFactoryImpl.releasePageContext(JspFactoryImpl.java:77)
at
org.apache.jsp.WEB_002dINF.jsp.template_jsp._jspService(template_jsp.java:291)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:388)
... 35 more
- [grouper-users] Using a custom attribute for subject display, Peter DiCamillo, 08/02/2012
- RE: [grouper-users] Using a custom attribute for subject display, Chris Hyzer, 08/03/2012
- Re: [grouper-users] Using a custom attribute for subject display, Peter DiCamillo, 08/03/2012
- Re: [grouper-users] Using a custom attribute for subject display, Peter DiCamillo, 08/03/2012
- Re: [grouper-users] Using a custom attribute for subject display, Peter DiCamillo, 08/03/2012
- RE: [grouper-users] Using a custom attribute for subject display, Chris Hyzer, 08/06/2012
- Re: [grouper-users] Using a custom attribute for subject display, Peter DiCamillo, 08/07/2012
- RE: [grouper-users] Using a custom attribute for subject display, Chris Hyzer, 08/06/2012
- Re: [grouper-users] Using a custom attribute for subject display, Peter DiCamillo, 08/03/2012
- Re: [grouper-users] Using a custom attribute for subject display, Peter DiCamillo, 08/03/2012
- Re: [grouper-users] Using a custom attribute for subject display, Peter DiCamillo, 08/03/2012
- RE: [grouper-users] Using a custom attribute for subject display, Chris Hyzer, 08/03/2012
Archive powered by MHonArc 2.6.16.