You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wicket.apache.org by Juliano Viana <ju...@logicstyle.com> on 2010/06/11 16:47:00 UTC

WicketSessionFilter broken in 1.4.9?

Hi,

I have an application that uses WicketSessionFilter for providing access to
the Wicket session to servlets outside Wicket.
Application was working fine with 1.4.5. Migrated to 1.4.9 and now attempts
to retrieve sessions via Session.get() in  servlet fail with the error:

"you can only locate or create sessions in the context of a request cycle"

This excception is being generated on Session.findOrCreate
(Session.java:208):

 RequestCycle requestCycle = RequestCycle.get();
                if (requestCycle == null)
                {
                        throw new IllegalStateException(
                                "you can only locate or create sessions in
the context of a request cycle");
                }


The problem is WicketSessionFilter does not seem to bind the request cycle
to the current thread and hence is broken in 1.4.9. Am I missing something
or should I open a JIRA issue?

Regards,
  - Juliano

Re: WicketSessionFilter broken in 1.4.9?

Posted by Dominik Drzewiecki <do...@gmail.com>.
2010/6/11 Juliano Viana <ju...@logicstyle.com>:
> Hi,
>
> I have an application that uses WicketSessionFilter for providing access to
> the Wicket session to servlets outside Wicket.
> Application was working fine with 1.4.5. Migrated to 1.4.9 and now attempts
> to retrieve sessions via Session.get() in  servlet fail with the error:
>
> "you can only locate or create sessions in the context of a request cycle"
>
> This excception is being generated on Session.findOrCreate
> (Session.java:208):
>
>  RequestCycle requestCycle = RequestCycle.get();
>                if (requestCycle == null)
>                {
>                        throw new IllegalStateException(
>                                "you can only locate or create sessions in
> the context of a request cycle");
>                }
>
>
> The problem is WicketSessionFilter does not seem to bind the request cycle
> to the current thread and hence is broken in 1.4.9. Am I missing something
> or should I open a JIRA issue?

There's on already opened.
https://issues.apache.org/jira/browse/WICKET-2902
Feel free to comment or open a new one and link it against 2902.

regz,
/dd

-- 
/* Spelin donut mader if iz ina coment */