glassfish
  1. glassfish
  2. GLASSFISH-15905

UnsupportedOperationException when deploying JSF2 application that uses MyFaces CoDI

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.1_b41
    • Fix Version/s: 3.1.1_b01
    • Component/s: admin_gui
    • Labels:
      None

      Description

      Hi have a simple WAR application that I want to deploy to Glassfish.

      The actual deployment works (I can launch the application), but I am getting an UnsupportedOperationException

        Activity

        Hide
        Anissa Lam added a comment -

        Getting help from Jason.

        Show
        Anissa Lam added a comment - Getting help from Jason.
        Hide
        Jason Lee added a comment -

        Based on the comments in the bugs listed below and a discussion with Ryan Lubke, it seems that deploying the app in the same thread as the console is causing issues with the JSF environment of the newly deployed and started application. The fix, then, is to move the deployment to a new thread, which this patch does via a FutureTask and a Callable.

        How bad is its impact? (Severity)
        I think this is pretty severe, as it affects at least every app that uses CODI, and possibly more apps. See issues GLASSFISH-3133 and GLASSFISH-3022 for some more contet.

        How often does it happen? (Frequency)
        Every time

        How much effort is required to fix it? (Cost)
        Moderate

        What is the risk of fixing it? (Risk)
        We're changing the deployment code used by the console, so there's the risk that this could introduce new bugs on the page. I have tested the fix manually, though, with both ears and wars and have seen no issues.

        Does a work around for the issue exist? Can the workaround be reasonably employed by the end user?
        Yes. The app can be successfully deployed via the CLI or via REST (the console currently uses the DeploymentFacility. These pages were not converted to REST due to time constraints).

        If the issue is not fixed should the issue and its workaround (if applicable) be described in the Release Notes?
        Yes.

        How long has the bug existed in the product?
        Unknown. Probably for quite some time, given the dates on the two issue referenced above.

        Do regression tests exist for this issue?
        There are no automated tests for this due to the use of an iframe on the page. Fixing that test, though, will be given increased priority.

        Which tests should QA (re)run to verify the fix did not destabilize GlassFish?
        Since there are no automated tests, manual deployment of of various application types (ear, war, etc) is suggested.

        When will a tested fix be ready for integration?
        Diff attached.

        Show
        Jason Lee added a comment - Based on the comments in the bugs listed below and a discussion with Ryan Lubke, it seems that deploying the app in the same thread as the console is causing issues with the JSF environment of the newly deployed and started application. The fix, then, is to move the deployment to a new thread, which this patch does via a FutureTask and a Callable. How bad is its impact? (Severity) I think this is pretty severe, as it affects at least every app that uses CODI, and possibly more apps. See issues GLASSFISH-3133 and GLASSFISH-3022 for some more contet. How often does it happen? (Frequency) Every time How much effort is required to fix it? (Cost) Moderate What is the risk of fixing it? (Risk) We're changing the deployment code used by the console, so there's the risk that this could introduce new bugs on the page. I have tested the fix manually, though, with both ears and wars and have seen no issues. Does a work around for the issue exist? Can the workaround be reasonably employed by the end user? Yes. The app can be successfully deployed via the CLI or via REST (the console currently uses the DeploymentFacility. These pages were not converted to REST due to time constraints). If the issue is not fixed should the issue and its workaround (if applicable) be described in the Release Notes? Yes. How long has the bug existed in the product? Unknown. Probably for quite some time, given the dates on the two issue referenced above. Do regression tests exist for this issue? There are no automated tests for this due to the use of an iframe on the page. Fixing that test, though, will be given increased priority. Which tests should QA (re)run to verify the fix did not destabilize GlassFish? Since there are no automated tests, manual deployment of of various application types (ear, war, etc) is suggested. When will a tested fix be ready for integration? Diff attached.
        Hide
        Nazrul added a comment -

        Lets address this in the trunk (3.2).

        Show
        Nazrul added a comment - Lets address this in the trunk (3.2).
        Hide
        Anissa Lam added a comment -

        I have converted all the GUI code from using Deployment Facility to go through REST. This means that deploy/undeploy will not be running in the same thread as GUI.
        Fix checked in. When the nightly build is available (probably in the next 2 days), you can verify that.

        Here is the commit. Fix checked into the trunk before branch, means it will make it to 3.2 b01 AND 3.1.1 b01.

        Project: glassfish
        Repository: svn
        Revision: 45798
        Author: anilam
        Date: 2011-03-31 00:40:08 UTC
        Link:

        Log Message:
        ------------
        GLASSFISH-15905. Remove dependency on Deployment Facility, convert all functions and utilities from using DF to REST. This is so deploy/undeploy of any application will not be run on the same thread as the console.
        Fix the following issues, it wasn't filed, but noticed during testing of the change:

        • shouldn't show the osgi type checkbox for deployed RAR
        • when user 'restart' an application, only call disable/enable on the application IF that target is enabled. Otherwise, it is an no-op.
        • when adding default web module to VS during VS creation/edit, ensure that the selected app is indeed deployed to that VS.

        Revisions:
        ----------
        45798

        Show
        Anissa Lam added a comment - I have converted all the GUI code from using Deployment Facility to go through REST. This means that deploy/undeploy will not be running in the same thread as GUI. Fix checked in. When the nightly build is available (probably in the next 2 days), you can verify that. Here is the commit. Fix checked into the trunk before branch, means it will make it to 3.2 b01 AND 3.1.1 b01. Project: glassfish Repository: svn Revision: 45798 Author: anilam Date: 2011-03-31 00:40:08 UTC Link: Log Message: ------------ GLASSFISH-15905 . Remove dependency on Deployment Facility, convert all functions and utilities from using DF to REST. This is so deploy/undeploy of any application will not be run on the same thread as the console. Fix the following issues, it wasn't filed, but noticed during testing of the change: shouldn't show the osgi type checkbox for deployed RAR when user 'restart' an application, only call disable/enable on the application IF that target is enabled. Otherwise, it is an no-op. when adding default web module to VS during VS creation/edit, ensure that the selected app is indeed deployed to that VS. Revisions: ---------- 45798
        Hide
        Anissa Lam added a comment -

        First nightly build from 3.2 is available. You can download it from
        http://download.java.net/glassfish/3.2/nightly
        mwessendorf , Please verify that this fixes your problem.

        Show
        Anissa Lam added a comment - First nightly build from 3.2 is available. You can download it from http://download.java.net/glassfish/3.2/nightly mwessendorf , Please verify that this fixes your problem.

          People

          • Assignee:
            Anissa Lam
            Reporter:
            mwessendorf
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: