This looks like a bug in the IBM JDK implementation to me, I don't see any valid reason why the constructor of Throwable would ever throw an NPE, or, why InheritableTL would have tried to throw the NPE which resulted in the second NPE in the Throwable constructor.
Ollie ________________________________ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Tuesday, 8 November 2005 2:10 PM To: acegisecurity-developer@lists.sourceforge.net Subject: RE: [Acegisecurity-developer] Acegi 0.8.3 to 0.9.0 errors Hi Mark and Ben, I'm using WSAD 5.1 with its built-in Websphere 5.0 Test Environment on Windows XP Pro, then deploying to a Websphere Application Server 5.0 instance on Windows 2000 Server. Websphere 5.0 is still widely used in the financial industry, and uses IBM's JDK 1.3. It isn't practical for me to test the app under Tomcat due to some classloading issue I haven't had time to debug, but I suspect it would work OK (as would running it within WAS 6.0). I'd be glad to switch the code back to ThreadLocal but I'm wondering if the Assert code might actually be the problem? Thanks, Scott ________________________________ From: Mark St.Godard [mailto:[EMAIL PROTECTED] Sent: Monday, November 07, 2005 9:34 PM To: acegisecurity-developer@lists.sourceforge.net Subject: Re: [Acegisecurity-developer] Acegi 0.8.3 to 0.9.0 errors Ben, Scott, Scott what version of Websphere are you running? What JRE/JDK version? Ben the code looks fine... seems abnormal for InheritableThreadLocal to NPE... Scott, try without the InheritableTL or as Ben suggests try a different servlet container / appserver if you can. Cheers, Mark On 11/7/05, Ben Alex <[EMAIL PROTECTED]> wrote: [EMAIL PROTECTED] wrote: > [11/7/05 15:24:43:513 EST] 5a6d5a6d WebGroup E SRVE0026E: > [Servlet Error]-[Filter [Acegi Filter Chain Proxy]: filter is > unavailable.]: java.lang.NullPointerException > at java.lang.Throwable.<init>(Throwable.java) > at java.lang.Throwable .<init>(Throwable.java) > at > java.lang.NullPointerException.<init>(NullPointerException.java:63) > at > java.lang.InheritableThreadLocal.set(InheritableThreadLocal.java :95) > at > net.sf.acegisecurity.context.SecurityContextHolder.setContext(SecurityCo ntextHolder.java:58) > > at > net.sf.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilte r (HttpSessionContextIntegrationFilter.java:207) > > Very odd. If you look at the code for SecurityContextHolder: private static InheritableThreadLocal contextHolder = new InheritableThreadLocal(); public static void setContext(SecurityContext context) { Assert.notNull(context, "Only non-null SecurityContext instances are permitted"); contextHolder.set(context); // this line fails (line 58) } Can anyone see any issue with this? The main difference between 0.8.3 and 0.9.0 is the use of a InheritableThreadLocal instead of a ThreadLocal. If you revert to the latter, does it work? What version of WebSphere are you running? Does it work if you deploy the same WAR to say Tomcat? Cheers Ben ------------------------------------------------------- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php _______________________________________________ Home: http://acegisecurity.sourceforge.net Acegisecurity-developer mailing list Acegisecurity-developer@lists.sourceforge.net <mailto:Acegisecurity-developer@lists.sourceforge.net> https://lists.sourceforge.net/lists/listinfo/acegisecurity-developer ------------------------------------------------------- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php _______________________________________________ Home: http://acegisecurity.sourceforge.net Acegisecurity-developer mailing list Acegisecurity-developer@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/acegisecurity-developer