Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-6834

[Guide] setConfigurationType(RuntimeConfigurationType.DEPLOYMENT) throws exception

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Trivial
    • Resolution: Fixed
    • 9.0.0
    • None
    • guide
    • None

    Description

      Hi Wicketers!

      I found in guide in A.1. Switching Wicket to DEPLOYMENT mode section:

      The last option is to set it in your Java code (e.g. in the init-method of your WebApplication):
      setConfigurationType(RuntimeConfigurationType.DEPLOYMENT);

      however setting up this type in init() method of WicketApplication class throws an exception:

      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'
      

      In my opinion guide lines in this section should be changed to (e.g.):

      The last option is to override getConfigurationType() method in your class that extends WebApplication):

      public class WicketApplication extends WebApplication
      {
          @Override
          public void init()
          {
              super.init();
              // add your configuration here
          }
      
          @Override
          public RuntimeConfigurationType getConfigurationType()
          {
              return RuntimeConfigurationType.DEPLOYMENT;
          }
      }
      

      Attachments

        Activity

          People

            bitstorm Andrea Del Bene
            slawtul Slawek Tuleja
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: