Uploaded image for project: 'Shiro'
  1. Shiro
  2. SHIRO-557

SessionContext must be an HTTP compatible implementation

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Reopened
    • Major
    • Resolution: Unresolved
    • 1.2.4
    • None
    • None

    Description

      It is related with SHIRO-350

      final UsernamePasswordToken token = new UsernamePasswordToken(upUsername, upPassword.toCharArray(), "payment");
      
      final Subject currentUser = SecurityUtils.getSubject();
      
      currentUser.login(token);
      
      Unexpected RuntimeException
      Last cause: SessionContext must be an HTTP compatible implementation.
      WicketMessage: Method onRequest of interface org.apache.wicket.behavior.IBehaviorListener targeted at com.rudiwijaya.payment.pages.LoginButton$1@1cd4d15c on component [LoginButton [Component id = login]] threw an exception
      
      Stacktrace
      Root cause:
      
      java.lang.IllegalArgumentException: SessionContext must be an HTTP compatible implementation.
           at org.apache.shiro.web.session.mgt.ServletContainerSessionManager.createSession(ServletContainerSessionManager.java:103)
           at org.apache.shiro.web.session.mgt.ServletContainerSessionManager.start(ServletContainerSessionManager.java:64)
           at org.apache.shiro.mgt.SessionsSecurityManager.start(SessionsSecurityManager.java:121)
           at org.apache.shiro.subject.support.DelegatingSubject.getSession(DelegatingSubject.java:336)
           at org.apache.shiro.subject.support.DelegatingSubject.getSession(DelegatingSubject.java:312)
           at org.apache.shiro.mgt.DefaultSubjectDAO.mergePrincipals(DefaultSubjectDAO.java:204)
           at org.apache.shiro.mgt.DefaultSubjectDAO.saveToSession(DefaultSubjectDAO.java:166)
           at org.apache.shiro.mgt.DefaultSubjectDAO.save(DefaultSubjectDAO.java:147)
           at org.apache.shiro.mgt.DefaultSecurityManager.save(DefaultSecurityManager.java:383)
           at org.apache.shiro.mgt.DefaultSecurityManager.createSubject(DefaultSecurityManager.java:350)
           at org.apache.shiro.mgt.DefaultSecurityManager.createSubject(DefaultSecurityManager.java:183)
           at org.apache.shiro.mgt.DefaultSecurityManager.login(DefaultSecurityManager.java:283)
           at org.apache.shiro.subject.support.DelegatingSubject.login(DelegatingSubject.java:256)
           at com.rudiwijaya.payment.pages.LoginButton.doAuthenticate(LoginButton.java:138)
           at com.rudiwijaya.payment.pages.LoginButton.onSubmit(LoginButton.java:157)
           at com.rudiwijaya.payment.pages.LoginButton$1.onSubmit(LoginButton.java:91)
           at org.apache.wicket.ajax.form.AjaxFormSubmitBehavior$AjaxFormSubmitter.onSubmit(AjaxFormSubmitBehavior.java:215)
           at org.apache.wicket.markup.html.form.Form.delegateSubmit(Form.java:1305)
           at org.apache.wicket.markup.html.form.Form.process(Form.java:966)
           at org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:788)
           at org.apache.wicket.ajax.form.AjaxFormSubmitBehavior.onEvent(AjaxFormSubmitBehavior.java:171)
           at org.apache.wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java:145)
           at org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest(AbstractDefaultAjaxBehavior.java:649)
           at java.lang.reflect.Method.invoke(Method.java:498)
           at org.apache.wicket.RequestListenerInterface.internalInvoke(RequestListenerInterface.java:258)
           at org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:241)
           at org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.invokeListener(ListenerInterfaceRequestHandler.java:250)
           at org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:236)
           at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:890)
           at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
           at org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:261)
           at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:218)
           at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:289)
           at org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:259)
           at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:201)
           at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:282)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
           at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
           at org.apache.catalina.core.StandardContextValve.__invoke(StandardContextValve.java:123)
           at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java)
           at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
           at org.apache.catalina.core.StandardHostValve.__invoke(StandardHostValve.java:171)
           at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java)
           at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
           at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)
           at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
           at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
           at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)
           at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
           at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
           at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
           at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
           at java.lang.Thread.run(Thread.java:745)
      
      Complete stack:
      
      org.apache.wicket.WicketRuntimeException: Method onRequest of interface org.apache.wicket.behavior.IBehaviorListener targeted at com.rudiwijaya.payment.pages.LoginButton$1@1cd4d15c on component [LoginButton [Component id = login]] threw an exception
           at org.apache.wicket.RequestListenerInterface.internalInvoke(RequestListenerInterface.java:268)
           at org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:241)
           at org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.invokeListener(ListenerInterfaceRequestHandler.java:250)
           at org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:236)
           at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:890)
           at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
           at org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:261)
           at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:218)
           at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:289)
           at org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:259)
      
      java.lang.reflect.InvocationTargetException
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
           at java.lang.reflect.Method.invoke(Method.java:498)
           at org.apache.wicket.RequestListenerInterface.internalInvoke(RequestListenerInterface.java:258)
           at org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:241)
           at org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.invokeListener(ListenerInterfaceRequestHandler.java:250)
           at org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:236)
           at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:890)
           at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
           at org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:261)
           at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:218)
           at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:289)
           at org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:259)
      
      display page view
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            rudi Rudi Wijaya
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: