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

ASF subversion and git services commented on WICKET-6834:
---------------------------------------------------------

Commit 9de3e8bcd8ae687cf0d038e9349d86c6131fdd25 in wicket's branch 
refs/heads/master from Andrea Del Bene
[ https://gitbox.apache.org/repos/asf?p=wicket.git;h=9de3e8b ]

WICKET-6834 Fixed guide instructions to set DEPLOYMENT mode via code.


> [Guide] setConfigurationType(RuntimeConfigurationType.DEPLOYMENT) throws 
> exception
> ----------------------------------------------------------------------------------
>
>                 Key: WICKET-6834
>                 URL: https://issues.apache.org/jira/browse/WICKET-6834
>             Project: Wicket
>          Issue Type: Improvement
>          Components: guide
>    Affects Versions: 9.0.0
>            Reporter: Slawek Tuleja
>            Assignee: Andrea Del Bene
>            Priority: Trivial
>
> Hi Wicketers!
> I found in guide in _A.1. Switching Wicket to DEPLOYMENT mode_ section:
> {quote}
> The last option is to set it in your Java code (e.g. in the init-method of 
> your WebApplication):
>  setConfigurationType(RuntimeConfigurationType.DEPLOYMENT);
> {quote}
> however setting up this type in init() method of WicketApplication class 
> throws an exception:
> {code:bash}
> SEVERE [RMI TCP Connection(2)-127.0.0.1] 
> org.apache.catalina.core.StandardContext.filterStart Exception starting 
> filter [WicketFilter] javax.servlet.ServletException: 
> java.lang.IllegalStateException: Configuration type is write-once. You can 
> not change it. Current value='DEPLOYMENT'
> {code}
> In my opinion guide lines in this section should be changed to (e.g.):
> {quote}
> The last option is to override getConfigurationType() method in your class 
> that extends WebApplication):
> {code:java}
> public class WicketApplication extends WebApplication
> {
>     @Override
>     public void init()
>     {
>         super.init();
>         // add your configuration here
>     }
>     @Override
>     public RuntimeConfigurationType getConfigurationType()
>     {
>         return RuntimeConfigurationType.DEPLOYMENT;
>     }
> }
> {code}
> {quote}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to