uPortal IRC Logs-2011-05-03
[12:20:21 CDT(-0500)] <athena> huh.
[12:20:26 CDT(-0500)] <athena> ERROR [http-443-2] May/03 13:08:31,951 pags.PersonAttributesGroupStore.[] - Exception acquiring attributes for member En
[12:20:26 CDT(-0500)] <athena> tityImpl (org.jasig.portal.security.IPerson) jbourey@unicon.net while checking if group EntityGroupImpl (pags.all_users)
[12:20:26 CDT(-0500)] <athena> All Users (PAGS) contains this member.
[12:20:26 CDT(-0500)] <athena> java.lang.NullPointerException
[12:20:26 CDT(-0500)] <athena> at org.jasig.portal.url.PortalRequestUtilsImpl.getCurrentPortalRequest(PortalRequestUtilsImpl.java:123)
[12:21:02 CDT(-0500)] <EricDalquist> that's neat
[12:21:08 CDT(-0500)] <EricDalquist> can you pastebin a full stack trace?
[12:22:17 CDT(-0500)] <athena> http://pastebin.com/FK0HhYsX
[12:22:22 CDT(-0500)] <athena> wondering if this is actually a tomcat issue
[12:23:15 CDT(-0500)] <athena> though dunno, don't see anything in catalina.out
[12:27:14 CDT(-0500)] <EricDalquist> well getCurrentPortalRequest should be getting the data from a ThreadLocal
[12:27:35 CDT(-0500)] <EricDalquist> actually no
[12:27:39 CDT(-0500)] <EricDalquist> that isn't how that works ...
[12:28:02 CDT(-0500)] <EricDalquist> though I guess this logic should be turned into a generic filter
[12:28:08 CDT(-0500)] <EricDalquist> so that it works everywhere ...
[12:28:12 CDT(-0500)] <EricDalquist> finding the code now
[12:30:18 CDT(-0500)] <EricDalquist> athena: can you paste what PortalRequestUtilsImpl.java:123 is for you?
[12:30:30 CDT(-0500)] <EricDalquist> in the latest trunk it is "catch (IllegalArgumentException iae) {"
[12:30:36 CDT(-0500)] <EricDalquist> which I don't think can throw a npe
[12:31:47 CDT(-0500)] <athena> ah, uhoh
[12:32:03 CDT(-0500)] <athena> looks like that's some of the debugging left over from that weird server issue i had before
[12:32:06 CDT(-0500)] <athena> however
[12:32:08 CDT(-0500)] <athena> log.info("Found current request " + requestAttributes.toString());
[12:32:17 CDT(-0500)] <athena> inside of getCurrentPortalRequest()
[12:32:22 CDT(-0500)] <EricDalquist> so requestAttributes is null
[12:32:36 CDT(-0500)] <athena> yeah, so it probably would have thrown an illegalstateexception
[12:32:40 CDT(-0500)] <EricDalquist> right
[12:32:46 CDT(-0500)] <EricDalquist> this is on a portal render?
[12:33:01 CDT(-0500)] <athena> yes i believe so
[12:33:41 CDT(-0500)] <athena> though kinda looks liek this was triggered by a permissions lookup
[12:34:05 CDT(-0500)] <EricDalquist> ok
[12:34:17 CDT(-0500)] <EricDalquist> I think the problem is we're doing those lookups before the Spring DispatcherServlet runs
[12:34:34 CDT(-0500)] <EricDalquist> which is what sets the ThreadLocal that RequestContextHolder uses
[12:34:40 CDT(-0500)] <athena> ah
[12:34:53 CDT(-0500)] <EricDalquist> so the fix is probably a little bit of work
[12:35:40 CDT(-0500)] <EricDalquist> but it would be to convert MaxInactiveFilter from a generic servlet Filter into a HandlerInterceptor
[12:35:45 CDT(-0500)] <athena> gotcha
[12:35:51 CDT(-0500)] <EricDalquist> and configure it against the main dispatcher servlet for the portal
[12:36:02 CDT(-0500)] <EricDalquist> so that the Spring environment is setup before the filter runs
[12:36:05 CDT(-0500)] <athena> ah
[12:36:09 CDT(-0500)] <athena> makes sense
[12:37:11 CDT(-0500)] <athena> think i can take a look at that today
[12:37:41 CDT(-0500)] <EricDalquist> great
[12:37:45 CDT(-0500)] <EricDalquist> should be a pretty easy fix
[12:37:51 CDT(-0500)] <athena> awesome
[12:38:18 CDT(-0500)] <EricDalquist> just change that fitler class to extend HandlerInterceptorAdapter
[12:38:32 CDT(-0500)] <EricDalquist> move its logic into preHandle
[12:39:12 CDT(-0500)] <EricDalquist> and configure the interceptor on the controller
[12:43:13 CDT(-0500)] <athena> sounds good
[12:44:04 CDT(-0500)] <athena> looks like we already have something similar for the guest session