AbstractHttpSessionStore.bind throws null pointer exception
-----------------------------------------------------------

                 Key: WICKET-3120
                 URL: https://issues.apache.org/jira/browse/WICKET-3120
             Project: Wicket
          Issue Type: Bug
            Reporter: EC
             Fix For: 1.4.12


The method gets a n HttpSession, but does not check for null before it uses it.

        HttpSession httpSession = getHttpSession(webRequest);
        // register an unbinding listener for cleaning up
        String applicationKey = application.getApplicationKey();
        httpSession.setAttribute("Wicket:SessionUnbindingListener-" + 
applicationKey,
        ... ...

The method getHttpSession is allowed to return null and most other places in 
the code check for null before using the session.

Stack trace:
Oct 19, 2010 9:39:30 PM org.apache.wicket.RequestCycle onExceptionLoop
SEVERE: unexpected exception when handling another exception: null
java.lang.NullPointerException
        at 
org.apache.wicket.protocol.http.AbstractHttpSessionStore.bind(AbstractHttpSessionStore.java:144)
        at org.apache.wicket.Session.bind(Session.java:422)
        at org.apache.wicket.Page.onBeforeRender(Page.java:1537)
        at org.apache.wicket.Component.internalBeforeRender(Component.java:1071)
        at org.apache.wicket.Component.beforeRender(Component.java:1105)
        at org.apache.wicket.Component.prepareForRender(Component.java:2292)
        at org.apache.wicket.Page.prepareForRender(Page.java:1521)
        at org.apache.wicket.Component.prepareForRender(Component.java:2329)
        at org.apache.wicket.Page.renderPage(Page.java:892)






-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to