Hi Kalle,

Okay so I think I'm closer to tracking this down, I found this with some
additional logs

org.apache.shiro.authz.UnauthenticatedException: This subject is anonymous
- it does not have any identifying principals and authorization operations
require an identity to check against. A Subject instance will acquire these
identifying principals automatically after a successful login is performed
be executing org.apache.shiro.subject.Subject.login(AuthenticationToken) or
when 'Remember Me' functionality is enabled by the SecurityManager. This
exception can also occur when a previously logged-in Subject has logged out
which makes it anonymous again. Because an identity is currently not known
due to any of these conditions, authorization is denied.

So this is what I'm thinking is going on, but it is nearly impossible to
reproduce, so difficult to say for sure.

When ldap went down, we immediately started getting the above exception.
The system acted as if the user was still logged in and I'm assuming the
arrayindexoutofboundsexception was related to user roles trying to be
accessed by the template with hasroles or something. Again, just a guess
and a theory. No matter what I tried, I was unable to resolve the
exception, this included redeployes, restarting tomcat, the VM, etc.
Finally we restarted the app server and the issue was resolved.

Now I'm not using remember me or anything, so not quite sure why shiro
would want to be storing any session info, but based on the fact we had to
restart the app server to get things working again, it leads me to believe
shiro is in fact storing some sort of session data on the server which
resulted in the chain of exceptions. Do you know if shiro is storing
anything? and if so, how do you prevent this kind of thing from happening
again?

Thanks Kalle,
George

On Fri, Mar 13, 2015 at 3:38 PM, Kalle Korhonen <kalle.o.korho...@gmail.com>
wrote:

> As log message shows, you need to find out where the
> ArrayIndexOutOfBoundsException comes from, everything else is incidental.
>
> Kalle
>
> On Fri, Mar 13, 2015 at 9:31 AM, George Christman <gchrist...@cardaddy.com
> >
> wrote:
>
> > *Hi I'm using 5.3.7*
> >
> > *Tapestry-Security 0.4.1*
> >
> > We had an ldap server go down this morning and from there on out, all we
> > have been getting is this exception on our application that connects to
> > that server. I can not seem to figure out how to repair issue. Could
> > someone help me to understand what is going on?
> >
> >
> > Thanks in advance.
> >
> >
> > *type* Exception report
> >
> > *message* *org.apache.tapestry5.ioc.internal.OperationException*
> >
> > *description* *The server encountered an internal error that prevented it
> > from fulfilling this request.*
> >
> > *exception*
> >
> > org.apache.shiro.subject.ExecutionException:
> > org.apache.tapestry5.ioc.internal.OperationException
> >
> >
> org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:382)
> >
> >
> org.tynamo.security.services.impl.SecurityConfiguration.service(SecurityConfiguration.java:104)
> >         $HttpServletRequestFilter_f1dbaa8739.service(Unknown Source)
> >         $HttpServletRequestHandler_f1dbaa873c.service(Unknown Source)
> >
> >
> org.apache.tapestry5.upload.internal.services.MultipartServletRequestFilter.service(MultipartServletRequestFilter.java:44)
> >         $HttpServletRequestHandler_f1dbaa873c.service(Unknown Source)
> >
> >
> org.got5.tapestry5.jquery.services.AjaxUploadServletRequestFilter.service(AjaxUploadServletRequestFilter.java:27)
> >         $HttpServletRequestHandler_f1dbaa873c.service(Unknown Source)
> >
> >
> org.apache.tapestry5.internal.services.IgnoredPathsFilter.service(IgnoredPathsFilter.java:62)
> >         $HttpServletRequestFilter_f1dbaa8736.service(Unknown Source)
> >         $HttpServletRequestHandler_f1dbaa873c.service(Unknown Source)
> >
> >
> org.apache.tapestry5.services.TapestryModule$1.service(TapestryModule.java:852)
> >         $HttpServletRequestHandler_f1dbaa873c.service(Unknown Source)
> >         $HttpServletRequestHandler_f1dbaa872e.service(Unknown Source)
> >
> > org.apache.tapestry5.TapestryFilter.doFilter(TapestryFilter.java:171)
> >
> > *root cause*
> >
> > org.apache.tapestry5.ioc.internal.OperationException
> >
> >
> org.apache.tapestry5.ioc.internal.OperationTrackerImpl.logAndRethrow(OperationTrackerImpl.java:121)
> >
> >
> org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:88)
> >
> >
> org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:87)
> >
> >
> org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:1124)
> >
> >
> org.apache.tapestry5.internal.services.TemplateParserImpl.parseTemplate(TemplateParserImpl.java:57)
> >         $TemplateParser_f1dbaa87a0.parseTemplate(Unknown Source)
> >
> >
> org.apache.tapestry5.internal.services.ComponentTemplateSourceImpl.parseTemplate(ComponentTemplateSourceImpl.java:175)
> >
> >
> org.apache.tapestry5.internal.services.ComponentTemplateSourceImpl.getTemplate(ComponentTemplateSourceImpl.java:147)
> >         $ComponentTemplateSource_f1dbaa879f.getTemplate(Unknown Source)
> >
> >
> org.apache.tapestry5.internal.pageload.PageLoaderImpl$4.invoke(PageLoaderImpl.java:229)
> >
> >
> org.apache.tapestry5.internal.pageload.PageLoaderImpl$4.invoke(PageLoaderImpl.java:222)
> >
> >
> org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:74)
> >
> >
> org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:87)
> >
> >
> org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:1124)
> >
> >
> org.apache.tapestry5.internal.pageload.PageLoaderImpl.createAssembler(PageLoaderImpl.java:221)
> >
> >
> org.apache.tapestry5.internal.pageload.PageLoaderImpl.getAssembler(PageLoaderImpl.java:211)
> >
> >
> org.apache.tapestry5.internal.pageload.PageLoaderImpl$3.invoke(PageLoaderImpl.java:183)
> >
> >
> org.apache.tapestry5.internal.pageload.PageLoaderImpl$3.invoke(PageLoaderImpl.java:178)
> >
> >
> org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:74)
> >
> >
> org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:87)
> >
> >
> org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:1124)
> >
> >
> org.apache.tapestry5.internal.pageload.PageLoaderImpl.loadPage(PageLoaderImpl.java:177)
> >         $PageLoader_f1dbaa879d.loadPage(Unknown Source)
> >
> >
> org.apache.tapestry5.internal.services.PageSourceImpl.getPage(PageSourceImpl.java:104)
> >         $PageSource_f1dbaa879a.getPage(Unknown Source)
> >
> >
> org.apache.tapestry5.internal.services.NonPoolingRequestPageCacheImpl.get(NonPoolingRequestPageCacheImpl.java:82)
> >         $RequestPageCache_f1dbaa8799.get(Unknown Source)
> >         $RequestPageCache_f1dbaa877e.get(Unknown Source)
> >
> >
> org.apache.tapestry5.internal.services.DefaultRequestExceptionHandler.handleRequestException(DefaultRequestExceptionHandler.java:77)
> >
> >
> $RequestExceptionHandler_f1dbaa8781.advised$handleRequestException_f1dbaa8783(Unknown
> > Source)
> >
> >
> $RequestExceptionHandler_f1dbaa8781$Invocation_handleRequestException_f1dbaa8782.proceedToAdvisedMethod(Unknown
> > Source)
> >
> >
> org.apache.tapestry5.internal.plastic.AbstractMethodInvocation.proceed(AbstractMethodInvocation.java:84)
> >
> > org.healthresearch.eprs.services.AppModule$6.advise(AppModule.java:356)
> >
> >
> org.apache.tapestry5.internal.plastic.AbstractMethodInvocation.proceed(AbstractMethodInvocation.java:86)
> >
>  $RequestExceptionHandler_f1dbaa8781.handleRequestException(Unknown
> > Source)
> >
> >
> org.tynamo.exceptionpage.services.ConfigurableRequestExceptionHandler.handleRequestException(ConfigurableRequestExceptionHandler.java:84)
> >
>  $RequestExceptionHandler_f1dbaa8746.handleRequestException(Unknown
> > Source)
> >
> >
> org.apache.tapestry5.internal.services.RequestErrorFilter.service(RequestErrorFilter.java:42)
> >         $RequestHandler_f1dbaa8748.service(Unknown Source)
> >
> >
> org.apache.tapestry5.services.TapestryModule$3.service(TapestryModule.java:902)
> >         $RequestHandler_f1dbaa8748.service(Unknown Source)
> >
> >
> org.apache.tapestry5.services.TapestryModule$2.service(TapestryModule.java:892)
> >         $RequestHandler_f1dbaa8748.service(Unknown Source)
> >
> >
> org.apache.tapestry5.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:90)
> >         $RequestHandler_f1dbaa8748.service(Unknown Source)
> >         $RequestHandler_f1dbaa873a.service(Unknown Source)
> >
> >
> org.apache.tapestry5.services.TapestryModule$HttpServletRequestHandlerTerminator.service(TapestryModule.java:253)
> >
> >
> org.tynamo.security.services.impl.SecurityConfiguration$2.call(SecurityConfiguration.java:106)
> >
> >
> org.tynamo.security.services.impl.SecurityConfiguration$2.call(SecurityConfiguration.java:104)
> >
> >
> org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
> >
> >
> org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
> >
> >
> org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:380)
> >
> >
> org.tynamo.security.services.impl.SecurityConfiguration.service(SecurityConfiguration.java:104)
> >         $HttpServletRequestFilter_f1dbaa8739.service(Unknown Source)
> >         $HttpServletRequestHandler_f1dbaa873c.service(Unknown Source)
> >
> >
> org.apache.tapestry5.upload.internal.services.MultipartServletRequestFilter.service(MultipartServletRequestFilter.java:44)
> >         $HttpServletRequestHandler_f1dbaa873c.service(Unknown Source)
> >
> >
> org.got5.tapestry5.jquery.services.AjaxUploadServletRequestFilter.service(AjaxUploadServletRequestFilter.java:27)
> >         $HttpServletRequestHandler_f1dbaa873c.service(Unknown Source)
> >
> >
> org.apache.tapestry5.internal.services.IgnoredPathsFilter.service(IgnoredPathsFilter.java:62)
> >         $HttpServletRequestFilter_f1dbaa8736.service(Unknown Source)
> >         $HttpServletRequestHandler_f1dbaa873c.service(Unknown Source)
> >
> >
> org.apache.tapestry5.services.TapestryModule$1.service(TapestryModule.java:852)
> >         $HttpServletRequestHandler_f1dbaa873c.service(Unknown Source)
> >         $HttpServletRequestHandler_f1dbaa872e.service(Unknown Source)
> >
> > org.apache.tapestry5.TapestryFilter.doFilter(TapestryFilter.java:171)
> >
> > *root cause*
> >
> > java.lang.ArrayIndexOutOfBoundsException
> >
> > *note* *The full stack trace of the root cause is available in the Apache
> > Tomcat/7.0.47 logs.*
> >
> >
> > -
>
>

Reply via email to