glassfish
  1. glassfish
  2. GLASSFISH-16223

admin_gui gets undeployed after my application redeploy

    Details

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

      Description

      After i redeploy my app on server - admin gui shows this error and gets undeployed. Application is redeployed fine but after this i can't access admin_gui anymore: instead of it Server is running page showed.

      See text error below and in attachment

      HTTP Status 500 -

      type Exception report

      message

      descriptionThe server encountered an internal error () that prevented it from fulfilling this request.

      exception

      javax.servlet.ServletException: Application was not properly initialized at startup, could not find Factory: javax.faces.application.ApplicationFactory

      root cause

      java.lang.IllegalStateException: Application was not properly initialized at startup, could not find Factory: javax.faces.application.ApplicationFactory

      note The full stack traces of the exception and its root causes are available in the GlassFish Server Open Source Edition 3.1 logs.
      GlassFish Server Open Source Edition 3.1

      1. fullstacktrace.txt
        11 kB
        mariohmol
      1. Екран.png
        180 kB

        Activity

        Hide
        mariohmol added a comment - - edited

        Same here! Every time i redeploy i have to restart the glassfish.

        Version: GlassFish Server Open Source Edition 3.1 (build 43).

        Full stack trace attached here!

        Regards,

        Show
        mariohmol added a comment - - edited Same here! Every time i redeploy i have to restart the glassfish. Version: GlassFish Server Open Source Edition 3.1 (build 43). Full stack trace attached here! Regards,
        Hide
        Anissa Lam added a comment -

        I don't know if you redeploy your app using CLI or GUI, but i assume both results the same.
        If you undeploy instead of redeploy, you are seeing the same thing also ?

        mariohomol/illia , please provide a test app that i can use to reproduce the problem. Not much i can do without a test app to reproduce the problem. Really appreciate your help here.

        Show
        Anissa Lam added a comment - I don't know if you redeploy your app using CLI or GUI, but i assume both results the same. If you undeploy instead of redeploy, you are seeing the same thing also ? mariohomol/illia , please provide a test app that i can use to reproduce the problem. Not much i can do without a test app to reproduce the problem. Really appreciate your help here.
        Hide
        mariohmol added a comment - - edited

        HY, I'm using reeploy from GUI.

        About the apps, rigth now i'm using 4 projects in early stages. All was created as a Enterprise Application on Netbeans (EAR-EJB-WAR), all using JEE6.

        In this server i'm monitoring and at all times ther is 2.5gb free ram memory and processor dont get up to 50%.

        Doing undeploy I get same error, i didnt have the chance to deploy again. So maybe the problem is related to undeploy.

        Try to create a new EAR on Netbeans and using GF, if you do not get the error, say to me that i can try to get on of this projects, clean it and try to reproduce the error.

        Regards,

        Show
        mariohmol added a comment - - edited HY, I'm using reeploy from GUI. About the apps, rigth now i'm using 4 projects in early stages. All was created as a Enterprise Application on Netbeans (EAR-EJB-WAR), all using JEE6. In this server i'm monitoring and at all times ther is 2.5gb free ram memory and processor dont get up to 50%. Doing undeploy I get same error, i didnt have the chance to deploy again. So maybe the problem is related to undeploy. Try to create a new EAR on Netbeans and using GF, if you do not get the error, say to me that i can try to get on of this projects, clean it and try to reproduce the error. Regards,
        Hide
        Anissa Lam added a comment -

        Can you try using CLI to undeploy ? Does this bring down the GUI as well ?
        This will tell me if this is due to the fact that the deploy/undeploy of app is running in the same thread as the GUI, as reported in GLASSFISH-15905.
        I am currently working on fixing GLASSFISH-15905.
        Still requesting you to attach your app thats created from netbeans. thanks a lot.

        Show
        Anissa Lam added a comment - Can you try using CLI to undeploy ? Does this bring down the GUI as well ? This will tell me if this is due to the fact that the deploy/undeploy of app is running in the same thread as the GUI, as reported in GLASSFISH-15905 . I am currently working on fixing GLASSFISH-15905 . Still requesting you to attach your app thats created from netbeans. thanks a lot.
        Hide
        mariohmol added a comment -

        Hy,

        could you please show me how to do it using CLI?

        I made some tests here and you are ritgh, i simple EAR project on Netbeans works. I will see if it is possible to clean some classes on a project and send to you.

        Regards,

        Show
        mariohmol added a comment - Hy, could you please show me how to do it using CLI? I made some tests here and you are ritgh, i simple EAR project on Netbeans works. I will see if it is possible to clean some classes on a project and send to you. Regards,
        Hide
        Anissa Lam added a comment -

        Hi, here is the instruction using CLI, assuming you did not deploy the app to other cluster or instances.

        %cd <glassfish3>/glassfish/bin

        %asadmin list-applications <== this should give you the list of applications you have deployed.

        %asadmin undeploy hello <== assuming hello is on the list returned from above cmd.

        You can then try go to the console, click on the applications node. IF everything works, the undeployed application should not list here. (of course, if GUI is working).

        thanks for trying to get me the test app.

        Show
        Anissa Lam added a comment - Hi, here is the instruction using CLI, assuming you did not deploy the app to other cluster or instances. %cd <glassfish3>/glassfish/bin %asadmin list-applications <== this should give you the list of applications you have deployed. %asadmin undeploy hello <== assuming hello is on the list returned from above cmd. You can then try go to the console, click on the applications node. IF everything works, the undeployed application should not list here. (of course, if GUI is working). thanks for trying to get me the test app.
        Hide
        mariohmol added a comment -

        Hy,

        same error using CLI.

        If you send me your email and promise to no publish the ear on web, i can send to help you on testing.

        Regards,

        Show
        mariohmol added a comment - Hy, same error using CLI. If you send me your email and promise to no publish the ear on web, i can send to help you on testing. Regards,
        Hide
        Anissa Lam added a comment -

        mariohmol, i have sent the private email to you 2 days ago. waiting for your reply.

        Show
        Anissa Lam added a comment - mariohmol, i have sent the private email to you 2 days ago. waiting for your reply.
        Hide
        Illia Romanenko added a comment -

        Please contact me off the list i will send you war file with the same promise

        Show
        Illia Romanenko added a comment - Please contact me off the list i will send you war file with the same promise
        Hide
        mariohmol added a comment -

        Hy guys,

        with the nightly build works partially.
        http://dlc.sun.com.edgesuite.net/glassfish/3.2/nightly/glassfish-3.2-b01-04_02_2011.zip

        I have 2 applications in two differentes virtual servers. When I redeploy Application 2 it shows me a error about context of Application 1.

        Exception while loading the app : java.lang.Exception: WEB0113: Virtual server [server] already has a web module [App1-war.war] loaded at [/]; therefore web module App2#App2-war.war cannot be loaded at this context path on this virtual server.

        If I Undeploy and Afterwards Deploy, works.

        So the Redploy still not working.

        Regards,

        Show
        mariohmol added a comment - Hy guys, with the nightly build works partially. http://dlc.sun.com.edgesuite.net/glassfish/3.2/nightly/glassfish-3.2-b01-04_02_2011.zip I have 2 applications in two differentes virtual servers. When I redeploy Application 2 it shows me a error about context of Application 1. Exception while loading the app : java.lang.Exception: WEB0113: Virtual server [server] already has a web module [App1-war.war] loaded at [/] ; therefore web module App2#App2-war.war cannot be loaded at this context path on this virtual server. If I Undeploy and Afterwards Deploy, works. So the Redploy still not working. Regards,
        Hide
        Anissa Lam added a comment -

        mariohmol,
        what you described above about 2 app not working properly with re-deploy seems to be a different bug than what is reported here.
        Please open up another bug, maybe filed against deployment.

        What is reported here is about the console no longer works after undeploy or redeploy an existing app.
        I can no longer reproduce that with 3.2 build 01

        Please confirm that with 3.2 build 01, admin console works properly after you undeploy/redeploy your application.

        Show
        Anissa Lam added a comment - mariohmol, what you described above about 2 app not working properly with re-deploy seems to be a different bug than what is reported here. Please open up another bug, maybe filed against deployment. What is reported here is about the console no longer works after undeploy or redeploy an existing app. I can no longer reproduce that with 3.2 build 01 Please confirm that with 3.2 build 01, admin console works properly after you undeploy/redeploy your application.
        Hide
        Anissa Lam added a comment -

        Illia, thanks for the app.
        I have verified that with the changes from DF to using REST API, I no longer see the problem.

        I have tried the following sequence using CLI: deploy, undeploy, deploy, deploy with --force=true, undeploy
        and also with GUI:

        • deploy, undeploy, deploy with force checkbox, undeploy, deploy, redeploy, undeploy

        Admin console works perfectly after each request.
        And your application works fine too.

        Please try that with b01 (you can download that from http://dlc.sun.com.edgesuite.net/glassfish/3.2/promoted/) and let me know if you see any issue.

        Show
        Anissa Lam added a comment - Illia, thanks for the app. I have verified that with the changes from DF to using REST API, I no longer see the problem. I have tried the following sequence using CLI: deploy, undeploy, deploy, deploy with --force=true, undeploy and also with GUI: deploy, undeploy, deploy with force checkbox, undeploy, deploy, redeploy, undeploy Admin console works perfectly after each request. And your application works fine too. Please try that with b01 (you can download that from http://dlc.sun.com.edgesuite.net/glassfish/3.2/promoted/ ) and let me know if you see any issue.
        Hide
        mariohmol added a comment - - edited

        Hy,

        you are right, the admin console still workign after redeploy, what does not work is the redeploy itself.

        Anyway, to me is ok right now because i can undeploy and then deploy afterwards.

        Good work!

        Regards,

        Show
        mariohmol added a comment - - edited Hy, you are right, the admin console still workign after redeploy, what does not work is the redeploy itself. Anyway, to me is ok right now because i can undeploy and then deploy afterwards. Good work! Regards,
        Hide
        Anissa Lam added a comment -

        I am marking this bug resolved.
        The fix is checked in before the 3.1.1 branch created, so I the fix is in both 3.1.1 b01 and 3.2 b01/MS1.

        mariohmol, if i understand it right, there is issue with your app if you 'redeploy' it, but 'undeploy' follow by 'deploy' again works fine. Maybe you should open up a bug against deployment.

        Show
        Anissa Lam added a comment - I am marking this bug resolved. The fix is checked in before the 3.1.1 branch created, so I the fix is in both 3.1.1 b01 and 3.2 b01/MS1. mariohmol, if i understand it right, there is issue with your app if you 'redeploy' it, but 'undeploy' follow by 'deploy' again works fine. Maybe you should open up a bug against deployment.
        Hide
        Illia Romanenko added a comment -

        Sorry for delay - i can confirm now that it works but still my app not being reinitialized after redeploy... But if i'm doing undeploy and then deploy - it works fine

        Show
        Illia Romanenko added a comment - Sorry for delay - i can confirm now that it works but still my app not being reinitialized after redeploy... But if i'm doing undeploy and then deploy - it works fine
        Hide
        Illia Romanenko added a comment -

        Thanks Anissa

        Show
        Illia Romanenko added a comment - Thanks Anissa
        Hide
        Anissa Lam added a comment -

        The fix for GLASSFISH-15905 by using REST API instead of Deployment Facility API for application deployment also fixes this issue.
        The fix is checked in before the 3.1.1 branch created, so I the fix is in since 3.1.1 b01 and 3.2 b01/MS1.

        Show
        Anissa Lam added a comment - The fix for GLASSFISH-15905 by using REST API instead of Deployment Facility API for application deployment also fixes this issue. The fix is checked in before the 3.1.1 branch created, so I the fix is in since 3.1.1 b01 and 3.2 b01/MS1.
        Hide
        rdelaplante added a comment -

        FYI the root cause of this bug may be related to a bug in JSF that was recently fixed: JAVASERVERFACES-1542

        Show
        rdelaplante added a comment - FYI the root cause of this bug may be related to a bug in JSF that was recently fixed: JAVASERVERFACES-1542
        Hide
        Illia Romanenko added a comment -

        rdelaplante, not sure about this - because it works fine on prev versions of glassfish

        Show
        Illia Romanenko added a comment - rdelaplante, not sure about this - because it works fine on prev versions of glassfish
        Hide
        rdelaplante added a comment -

        We've been running on GlassFish since 2.0 and the bug in JAVASERVERFACES-1542 didn't affect us until we upgraded to GlassFish 3.1. I'm not sure why it just started happening, but that's why I thought it could be related to this ticket. When the problem happens to us, we get the same error except it complains about RenderKitFactory instead of ApplicationFactory. The ticket says all factories are affected.

        Show
        rdelaplante added a comment - We've been running on GlassFish since 2.0 and the bug in JAVASERVERFACES-1542 didn't affect us until we upgraded to GlassFish 3.1. I'm not sure why it just started happening, but that's why I thought it could be related to this ticket. When the problem happens to us, we get the same error except it complains about RenderKitFactory instead of ApplicationFactory. The ticket says all factories are affected.
        Hide
        rdelaplante added a comment -

        Earlier I thought that JAVASERVERFACES-1542 was the cause of this bug. JSF 2.1.2 has since been released, and I tried replacing jsf-impl.jar in glassfish/modules to see if it solves this ticket's problem. It does not. I have not yet tried GlassFish 3.1.1.

        Show
        rdelaplante added a comment - Earlier I thought that JAVASERVERFACES-1542 was the cause of this bug. JSF 2.1.2 has since been released, and I tried replacing jsf-impl.jar in glassfish/modules to see if it solves this ticket's problem. It does not. I have not yet tried GlassFish 3.1.1.
        Hide
        Anissa Lam added a comment - - edited

        I am getting confused. Are you saying the issue comes back ?
        Lets start from the beginning.

        1. If you deploy your app, does Admin Console still work correctly ?

        2. If you undeploy your app, does Admin Console still work correctly ?

        3. If you do deploy then undeploy then deploy again, does Admin Console still work correctly ?

        4. If you deploy, then do "deploy --force=true" , does Admin Console still work correctly ?

        If the answer is No to any of the above, please attach a sample app, reopen the bug so I can look into this again.

        You mentioned "I have not yet tried GlassFish 3.1.1.". Please try the above step using latest promoted build available on http://dlc.sun.com.edgesuite.net/glassfish/3.1.1/promoted/

        Show
        Anissa Lam added a comment - - edited I am getting confused. Are you saying the issue comes back ? Lets start from the beginning. 1. If you deploy your app, does Admin Console still work correctly ? 2. If you undeploy your app, does Admin Console still work correctly ? 3. If you do deploy then undeploy then deploy again, does Admin Console still work correctly ? 4. If you deploy, then do "deploy --force=true" , does Admin Console still work correctly ? If the answer is No to any of the above, please attach a sample app, reopen the bug so I can look into this again. You mentioned "I have not yet tried GlassFish 3.1.1.". Please try the above step using latest promoted build available on http://dlc.sun.com.edgesuite.net/glassfish/3.1.1/promoted/
        Hide
        rdelaplante added a comment -

        I was only following up on my own hypothesis from May 26 in case anyone is interested. I suggested that the fix in this ticket may have been unnecessary because the root cause of the problem might be a bug in JSF which is now fixed. Knowing that your fix is in GlassFish 3.1.1 and not 3.1.0, I decided to test my hypothesis by replacing jsf-impl.jar in GlassFish 3.1.0 with a newer version that contains the fix I am talking about. That did not solve the problem, and therefore I was wrong. The bug in JSF is not related to this ticket.

        Show
        rdelaplante added a comment - I was only following up on my own hypothesis from May 26 in case anyone is interested. I suggested that the fix in this ticket may have been unnecessary because the root cause of the problem might be a bug in JSF which is now fixed. Knowing that your fix is in GlassFish 3.1.1 and not 3.1.0, I decided to test my hypothesis by replacing jsf-impl.jar in GlassFish 3.1.0 with a newer version that contains the fix I am talking about. That did not solve the problem, and therefore I was wrong. The bug in JSF is not related to this ticket.
        Hide
        Anissa Lam added a comment -

        I see. Thanks for clarifying this.

        Show
        Anissa Lam added a comment - I see. Thanks for clarifying this.

          People

          • Assignee:
            Anissa Lam
            Reporter:
            Illia Romanenko
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: