shiro-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kalle Korhonen <kalle.o.korho...@gmail.com>
Subject Re: IllegalStateException: Subject context map must contain a javax.servlet.ServletRequest instance to support Web Subject construction.
Date Wed, 26 Aug 2009 02:42:59 GMT
Yes works now, thanks!

Kalle


On Tue, Aug 25, 2009 at 3:06 PM, Les Hazlewood<lhazlewood@apache.org> wrote:
> Hi all,
>
> I've committed a fix for the "missing ServletRequest" exceptions seen
> in trunk over the last few days.  Please post to the dev list or
> create a Jira issue if problems persist after updating/rebuilding
> trunk.
>
> Thanks,
>
> Les
>
> On Tue, Aug 25, 2009 at 1:42 PM, Neo
> Anderson<javadeveloper999@yahoo.co.uk> wrote:
>>
>>
>> It looks like revision number r801772 would work.
>>
>> svn co -r r801772 http://svn.apache.org/repos/asf/incubator/shiro/trunk/
>> shiro-r801772
>>
>> Thank you.
>>
>>
>> Neo Anderson wrote:
>>>
>>>
>>> Just to double check because in the svn repos I notice that both branches
>>> and tags folder (e.g.
>>> http://svn.apache.org/repos/asf/incubator/shiro/tags/) doesn't contain
>>> anything; except in import folder, but that looks like the old source used
>>> as jsecurity. So what place I am able to find the snapshot or stable
>>> release?
>>>
>>>
>>>     *  ..
>>>     * KEYS
>>>     * STATUS
>>>     * board/
>>>     * branches/
>>>     * import/
>>>     * sandbox/
>>>     * tags/
>>>     * trunk/
>>>
>>> Thanks again for the help.
>>>
>>>
>>> Les Hazlewood-2 wrote:
>>>>
>>>> Thanks Kalle,
>>>>
>>>> Yep, I'm hoping to clean this up today - this is due to a bug
>>>> introduced on Friday.  Any snapshot Thursday or before should be ok
>>>> for now.
>>>>
>>>> I'll post again to the user list when it is stable again.
>>>>
>>>> - Les
>>>>
>>>> On Tue, Aug 25, 2009 at 12:14 PM, Kalle
>>>> Korhonen<kalle.o.korhonen@gmail.com> wrote:
>>>>> Trunk's currently unstable - this is being discussed on the dev list
-
>>>>> Les is hoping to be able to complete the changes today. Use earlier
>>>>> snapshots in the meantime or build locally from a version before
>>>>> Subject refactoring (see svn log).
>>>>>
>>>>> Kalle
>>>>>
>>>>>
>>>>> On Tue, Aug 25, 2009 at 9:07 AM, Neo
>>>>> Anderson<javadeveloper999@yahoo.co.uk> wrote:
>>>>>>
>>>>>> I download the lastest source from svn and build from scratch using
>>>>>> maven
>>>>>> 2.0.9, deploying sample web appplication
>>>>>> (samples-web-1.0-incubating-SNAPSHOT) to tomcat-6.0.20. Now the
>>>>>> exception
>>>>>> thrown becomes java.lang.IllegalStateException: Subject context map
>>>>>> must
>>>>>> contain a javax.servlet.ServletRequest instance to support Web Subject
>>>>>> construction.
>>>>>>
>>>>>> It looks like the servlet request does not contain in the Map `context'
>>>>>> where if it contains servlet the map should look like
>>>>>>
>>>>>> DefaultWebSubjectFactory.java
>>>>>> context:{org.apache.shiro.mgt.SubjectFactory.SERVLET_RESPONSE
>>>>>> =org.apache.catalina.connector.ResponseFacade@28305d,
>>>>>> org.apache.shiro.mgt.SubjectFactory.SERVLET_REQUEST=org.apache.shiro.web.servlet.ShiroHttpServletRequest@198c6f3,
>>>>>> org.apache.shiro.mgt.SubjectFactory.SESSION=org.apache.shiro.session.mgt.DelegatingSession@12d8ecd}
>>>>>>
>>>>>> However, the fact is that the context doesn't contain serverlet request
>>>>>> object:
>>>>>>
>>>>>> DefaultWebSubjectFactory.java
>>>>>> context:{org.apache.shiro.mgt.SubjectFactory.AUTHENTICATION_TOKEN=org.apach
>>>>>> e.shiro.authc.UsernamePasswordToken - lonestarr, rememberMe=false
>>>>>> (/0:0:0:0:0:0:0:1),
>>>>>> org.apache.shiro.mgt.SubjectFactory.AUTHENTICATION_INFO=org.apache.shiro.subject.SimplePrincipalCollection@2be4d84a,
>>>>>> org.apache.shiro.mgt.SubjectFactory.AUTHENTICATED=true,
>>>>>> org.apache.shiro.mgt.SubjectFactory.SUBJECT=org.apache.shiro.web.subject.WebDelegatingSubject@497062}
>>>>>>
>>>>>> So it goes wrong (stacktrace is as below). Is there any possibility
may
>>>>>> cause such problem? I appreciate any help. Thank you very much.
>>>>>>
>>>>>>
>>>>>> exception
>>>>>>
>>>>>> javax.servlet.ServletException: Filter execution resulted in an
>>>>>> unexpected
>>>>>> Exception (not IOException or ServletException as the Filter api
>>>>>> recommends).  Wrapping in ServletException and propagating.
>>>>>>
>>>>>>  org.apache.shiro.web.servlet.AdviceFilter.cleanup(AdviceFilter.java:205)
>>>>>>
>>>>>> org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:159)
>>>>>>
>>>>>> org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:191)
>>>>>>
>>>>>> org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:65)
>>>>>>
>>>>>>  org.apache.shiro.web.servlet.ShiroFilter.executeChain(ShiroFilter.java:648)
>>>>>>
>>>>>> org.apache.shiro.web.servlet.ShiroFilter.doFilterInternal(ShiroFilter.java:585)
>>>>>>
>>>>>> org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:191)
>>>>>>
>>>>>> root cause
>>>>>>
>>>>>> java.lang.IllegalStateException: Subject context map must contain
a
>>>>>> javax.servlet.ServletRequest instance to support Web Subject
>>>>>> construction.
>>>>>>
>>>>>> org.apache.shiro.web.mgt.DefaultWebSubjectFactory.getServletRequest(DefaultWebSubjectFactory.java:42)
>>>>>>
>>>>>> org.apache.shiro.web.mgt.DefaultWebSubjectFactory.createSubject(DefaultWebSubjectFactory.java:73)
>>>>>>
>>>>>> org.apache.shiro.mgt.DefaultSecurityManager.getSubject(DefaultSecurityManager.java:404)
>>>>>>
>>>>>> org.apache.shiro.mgt.DefaultSecurityManager.createSubject(DefaultSecurityManager.java:274)
>>>>>>
>>>>>> org.apache.shiro.mgt.DefaultSecurityManager.login(DefaultSecurityManager.java:370)
>>>>>>
>>>>>> org.apache.shiro.subject.DelegatingSubject.login(DelegatingSubject.java:245)
>>>>>>
>>>>>> org.apache.shiro.web.filter.authc.AuthenticatingFilter.executeLogin(AuthenticatingFilter.java:51)
>>>>>>
>>>>>> org.apache.shiro.web.filter.authc.FormAuthenticationFilter.onAccessDenied(FormAuthenticationFilter.java:152)
>>>>>>
>>>>>> org.apache.shiro.web.filter.AccessControlFilter.onAccessDenied(AccessControlFilter.java:135)
>>>>>>
>>>>>> org.apache.shiro.web.filter.AccessControlFilter.onPreHandle(AccessControlFilter.java:164)
>>>>>>
>>>>>> org.apache.shiro.web.filter.PathMatchingFilter.preHandle(PathMatchingFilter.java:179)
>>>>>>
>>>>>> org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:133)
>>>>>>
>>>>>> org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:191)
>>>>>>
>>>>>> org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:65)
>>>>>>
>>>>>>  org.apache.shiro.web.servlet.ShiroFilter.executeChain(ShiroFilter.java:648)
>>>>>>
>>>>>> org.apache.shiro.web.servlet.ShiroFilter.doFilterInternal(ShiroFilter.java:585)
>>>>>>
>>>>>> org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:191)
>>>>>>
>>>>>>
>>>>>> --
>>>>>> View this message in context:
>>>>>> http://n2.nabble.com/IllegalStateException-Subject-context-map-must-contain-a-javax-servlet-ServletRequest-instance-to-su-tp3511027p3511027.html
>>>>>> Sent from the Shiro User mailing list archive at Nabble.com.
>>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>> --
>> View this message in context: http://n2.nabble.com/IllegalStateException-Subject-context-map-must-contain-a-javax-servlet-ServletRequest-instance-to-su-tp3511027p3511651.html
>> Sent from the Shiro User mailing list archive at Nabble.com.
>>
>

Mime
View raw message