[ 
https://issues.apache.org/jira/browse/WICKET-878?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12523804
 ] 

Matej Knopp commented on WICKET-878:
------------------------------------

The problem now is that your doFilter is invoked before WicketFilter.doFilter, 
thus the Wicket session thread local is not set yet. If you really need this, 
you have to use WicketSessionFilter and make sure that it is invoked before 
your filter. 



> IllegalStateException accessing Session.get() from own Resource implementation
> ------------------------------------------------------------------------------
>
>                 Key: WICKET-878
>                 URL: https://issues.apache.org/jira/browse/WICKET-878
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.0-beta2
>            Reporter: Thomas Singer
>            Assignee: Matej Knopp
>             Fix For: 1.3.0-beta4
>
>
> I'm getting following assertion:
> java.lang.IllegalStateException: you can only locate or create sessions in 
> the context of a request cycle 
> org.apache.wicket.Session.findOrCreate(Session.java:250) 
> org.apache.wicket.Session.get(Session.java:279) 
> com.syntevo.hpsmart.DownloadResource.getResourceStream(DownloadResource.java:18)
>  
> org.apache.wicket.protocol.http.WicketFilter.getLastModified(WicketFilter.java:708)
>  
> org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:122)
> See this thread for details: 
> http://www.nabble.com/DownloadLink-hanging-tf4299990.html

-- 
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