Wicket
  1. Wicket
  2. WICKET-5146

Application not destroyed if WicketFilter#init() fails

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.5.10, 6.7.0
    • Fix Version/s: 6.8.0, 1.5.11
    • Component/s: None
    • Labels:
      None

      Description

      WicketFilter calls Application#initApplication() which calls Application#init().

      In case of Exception thrown in the application's init() method, there is no cleanup in WicketFilter's finally block.

      The result of this is, in case where Wicket is in the application server's libraries (not deployed with the war file), that the application cannot be re-deployed withhout re-starting the application server.

      That is because Application#setName() crashes with IllegalStateException("Application name can only be set once.").

      In Application, private static final Map<String, Application> applicationKeyToApplication holds a reference to the crashed instance after the application is undeployed.

      1. fix-WICKET-5146-2.patch
        1 kB
        Cedric Gatay
      2. testcase.zip
        24 kB
        bernard

        Activity

        bernard created issue -
        Cedric Gatay made changes -
        Field Original Value New Value
        Attachment fix-WICKET-5146.patch [ 12579380 ]
        bernard made changes -
        Attachment testcase.zip [ 12579400 ]
        Cedric Gatay made changes -
        Attachment fix-WICKET-5146-2.patch [ 12579439 ]
        Cedric Gatay made changes -
        Attachment fix-WICKET-5146.patch [ 12579380 ]
        Sven Meier made changes -
        Affects Version/s 1.5.10 [ 12323510 ]
        Sven Meier made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Assignee Sven Meier [ svenmeier ]
        Fix Version/s 6.8.0 [ 12324068 ]
        Fix Version/s 1.5.11 [ 12324069 ]
        Resolution Fixed [ 1 ]

          People

          • Assignee:
            Sven Meier
            Reporter:
            bernard
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development