[
https://issues.apache.org/jira/browse/WICKET-6834?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Slawek Tuleja updated WICKET-6834:
----------------------------------
Description:
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}
was:
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 set it in your Java code (e.g. in the init-method of your
WebApplication):
setConfigurationType(RuntimeConfigurationType.DEPLOYMENT);
{quote}
> [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
> 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)