You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Jesse Long (JIRA)" <ji...@apache.org> on 2012/08/30 11:39:07 UTC

[jira] [Created] (WICKET-4737) IllegalStateException on WicketFilter.init() after calling setFilterPath()

Jesse Long created WICKET-4737:
----------------------------------

             Summary: IllegalStateException on WicketFilter.init() after calling setFilterPath()
                 Key: WICKET-4737
                 URL: https://issues.apache.org/jira/browse/WICKET-4737
             Project: Wicket
          Issue Type: Bug
          Components: wicket
    Affects Versions: 6.0.0
         Environment: When you pre-configure the filter path using the setFilterPath() method.
            Reporter: Jesse Long


WICKET-4626 broke the ability to pre-set the filter path using setFilterPath(). The patch introduced by WICKET-4626 calls setFilterPath() from within WicketFilter.init(), and setFilterPath() throws IllegalStateException if it is called more than once.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (WICKET-4737) IllegalStateException on WicketFilter.init() after calling setFilterPath()

Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-4737?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13444833#comment-13444833 ] 

Martin Grigorov commented on WICKET-4737:
-----------------------------------------

Can't you use org.apache.wicket.protocol.http.WicketFilter#FILTER_MAPPING_PARAM ?
I.e. an <init-param><param-name>filterMappingUrlPattern</param-name><param-value>yours</param-value></init-param>
                
> IllegalStateException on WicketFilter.init() after calling setFilterPath()
> --------------------------------------------------------------------------
>
>                 Key: WICKET-4737
>                 URL: https://issues.apache.org/jira/browse/WICKET-4737
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 6.0.0
>         Environment: When you pre-configure the filter path using the setFilterPath() method.
>            Reporter: Jesse Long
>
> WICKET-4626 broke the ability to pre-set the filter path using setFilterPath(). The patch introduced by WICKET-4626 calls setFilterPath() from within WicketFilter.init(), and setFilterPath() throws IllegalStateException if it is called more than once.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (WICKET-4737) IllegalStateException on WicketFilter.init() after calling setFilterPath()

Posted by "Jesse Long (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-4737?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13447614#comment-13447614 ] 

Jesse Long commented on WICKET-4737:
------------------------------------

Good point, yes, that will work.
                
> IllegalStateException on WicketFilter.init() after calling setFilterPath()
> --------------------------------------------------------------------------
>
>                 Key: WICKET-4737
>                 URL: https://issues.apache.org/jira/browse/WICKET-4737
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 6.0.0
>         Environment: When you pre-configure the filter path using the setFilterPath() method.
>            Reporter: Jesse Long
>            Assignee: Martin Grigorov
>             Fix For: 6.0.1
>
>         Attachments: WICKET-4737.patch
>
>
> WICKET-4626 broke the ability to pre-set the filter path using setFilterPath(). The patch introduced by WICKET-4626 calls setFilterPath() from within WicketFilter.init(), and setFilterPath() throws IllegalStateException if it is called more than once.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (WICKET-4737) IllegalStateException on WicketFilter.init() after calling setFilterPath()

Posted by "Emond Papegaaij (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-4737?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Emond Papegaaij updated WICKET-4737:
------------------------------------

    Fix Version/s:     (was: 6.0.1)
                   6.1.0
    
> IllegalStateException on WicketFilter.init() after calling setFilterPath()
> --------------------------------------------------------------------------
>
>                 Key: WICKET-4737
>                 URL: https://issues.apache.org/jira/browse/WICKET-4737
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 6.0.0
>         Environment: When you pre-configure the filter path using the setFilterPath() method.
>            Reporter: Jesse Long
>            Assignee: Martin Grigorov
>             Fix For: 6.1.0
>
>         Attachments: WICKET-4737.patch
>
>
> WICKET-4626 broke the ability to pre-set the filter path using setFilterPath(). The patch introduced by WICKET-4626 calls setFilterPath() from within WicketFilter.init(), and setFilterPath() throws IllegalStateException if it is called more than once.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (WICKET-4737) IllegalStateException on WicketFilter.init() after calling setFilterPath()

Posted by "Christoph Leiter (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-4737?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13447557#comment-13447557 ] 

Christoph Leiter commented on WICKET-4737:
------------------------------------------

I understand the problem. The workaround works for me. See this code in WicketFilter:

		if (getFilterPath() == null)
		{
			log.warn("Unable to determine filter path from filter init-parm, web.xml, "
				+ "or servlet 3.0 annotations. Assuming user will set filter path "
				+ "manually by calling setFilterPath(String)");
		}

setFilterPath() is never called and we have the chance to invoke it in WebApplication#init.
                
> IllegalStateException on WicketFilter.init() after calling setFilterPath()
> --------------------------------------------------------------------------
>
>                 Key: WICKET-4737
>                 URL: https://issues.apache.org/jira/browse/WICKET-4737
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 6.0.0
>         Environment: When you pre-configure the filter path using the setFilterPath() method.
>            Reporter: Jesse Long
>            Assignee: Martin Grigorov
>             Fix For: 6.0.1
>
>         Attachments: WICKET-4737.patch
>
>
> WICKET-4626 broke the ability to pre-set the filter path using setFilterPath(). The patch introduced by WICKET-4626 calls setFilterPath() from within WicketFilter.init(), and setFilterPath() throws IllegalStateException if it is called more than once.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (WICKET-4737) IllegalStateException on WicketFilter.init() after calling setFilterPath()

Posted by "Christoph Leiter (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-4737?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13447536#comment-13447536 ] 

Christoph Leiter commented on WICKET-4737:
------------------------------------------

The easiest workaround (until 6.0.1 is released) seems to be to call getWicketFilter().setFilterPath(path) in WebApplication#init.
                
> IllegalStateException on WicketFilter.init() after calling setFilterPath()
> --------------------------------------------------------------------------
>
>                 Key: WICKET-4737
>                 URL: https://issues.apache.org/jira/browse/WICKET-4737
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 6.0.0
>         Environment: When you pre-configure the filter path using the setFilterPath() method.
>            Reporter: Jesse Long
>            Assignee: Martin Grigorov
>             Fix For: 6.0.1
>
>         Attachments: WICKET-4737.patch
>
>
> WICKET-4626 broke the ability to pre-set the filter path using setFilterPath(). The patch introduced by WICKET-4626 calls setFilterPath() from within WicketFilter.init(), and setFilterPath() throws IllegalStateException if it is called more than once.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (WICKET-4737) IllegalStateException on WicketFilter.init() after calling setFilterPath()

Posted by "Jesse Long (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-4737?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13447551#comment-13447551 ] 

Jesse Long commented on WICKET-4737:
------------------------------------

No, WicketFilter.setFilterPath() cannot be called more than once in Wicket 1.5.x and Wicket 6. The problem was (now fixed, thanks Martin) that WicketFilter.init() would call WicketFilter.setFilterPath(), even if it was previously called, causing IllegalStateException.

If we call WicketFilter.setFilterPath() from WebApplication.init() then our call will be the second call, and it would still throw an IllegalStateException.
                
> IllegalStateException on WicketFilter.init() after calling setFilterPath()
> --------------------------------------------------------------------------
>
>                 Key: WICKET-4737
>                 URL: https://issues.apache.org/jira/browse/WICKET-4737
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 6.0.0
>         Environment: When you pre-configure the filter path using the setFilterPath() method.
>            Reporter: Jesse Long
>            Assignee: Martin Grigorov
>             Fix For: 6.0.1
>
>         Attachments: WICKET-4737.patch
>
>
> WICKET-4626 broke the ability to pre-set the filter path using setFilterPath(). The patch introduced by WICKET-4626 calls setFilterPath() from within WicketFilter.init(), and setFilterPath() throws IllegalStateException if it is called more than once.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (WICKET-4737) IllegalStateException on WicketFilter.init() after calling setFilterPath()

Posted by "Jesse Long (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-4737?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13444838#comment-13444838 ] 

Jesse Long commented on WICKET-4737:
------------------------------------

Doesn't matter, why take away a nice feature when there is no need to? Right now, setFilterPath() is useless to anyone except WicketFilter.init(). Either it must work, or it should be removed.

I'll use init params to work around in the mean time, but I like the feature and I'd like it to work again in 6.0.1.
                
> IllegalStateException on WicketFilter.init() after calling setFilterPath()
> --------------------------------------------------------------------------
>
>                 Key: WICKET-4737
>                 URL: https://issues.apache.org/jira/browse/WICKET-4737
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 6.0.0
>         Environment: When you pre-configure the filter path using the setFilterPath() method.
>            Reporter: Jesse Long
>         Attachments: WICKET-4737.patch
>
>
> WICKET-4626 broke the ability to pre-set the filter path using setFilterPath(). The patch introduced by WICKET-4626 calls setFilterPath() from within WicketFilter.init(), and setFilterPath() throws IllegalStateException if it is called more than once.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (WICKET-4737) IllegalStateException on WicketFilter.init() after calling setFilterPath()

Posted by "Jesse Long (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-4737?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jesse Long updated WICKET-4737:
-------------------------------

    Attachment: WICKET-4737.patch

This is a patch to solve the problem...
                
> IllegalStateException on WicketFilter.init() after calling setFilterPath()
> --------------------------------------------------------------------------
>
>                 Key: WICKET-4737
>                 URL: https://issues.apache.org/jira/browse/WICKET-4737
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 6.0.0
>         Environment: When you pre-configure the filter path using the setFilterPath() method.
>            Reporter: Jesse Long
>         Attachments: WICKET-4737.patch
>
>
> WICKET-4626 broke the ability to pre-set the filter path using setFilterPath(). The patch introduced by WICKET-4626 calls setFilterPath() from within WicketFilter.init(), and setFilterPath() throws IllegalStateException if it is called more than once.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Resolved] (WICKET-4737) IllegalStateException on WicketFilter.init() after calling setFilterPath()

Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-4737?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Grigorov resolved WICKET-4737.
-------------------------------------

       Resolution: Fixed
    Fix Version/s: 6.0.1
         Assignee: Martin Grigorov
    
> IllegalStateException on WicketFilter.init() after calling setFilterPath()
> --------------------------------------------------------------------------
>
>                 Key: WICKET-4737
>                 URL: https://issues.apache.org/jira/browse/WICKET-4737
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 6.0.0
>         Environment: When you pre-configure the filter path using the setFilterPath() method.
>            Reporter: Jesse Long
>            Assignee: Martin Grigorov
>             Fix For: 6.0.1
>
>         Attachments: WICKET-4737.patch
>
>
> WICKET-4626 broke the ability to pre-set the filter path using setFilterPath(). The patch introduced by WICKET-4626 calls setFilterPath() from within WicketFilter.init(), and setFilterPath() throws IllegalStateException if it is called more than once.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira