glassfish
  1. glassfish
  2. GLASSFISH-20056

Failed to load admin console, when restarting the server from windows services.

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 4.0_b81
    • Fix Version/s: 4.0_b83
    • Component/s: admin, deployment, installation
    • Labels:
      None
    • Environment:

      Windows 7 SP1
      glassfish-4.0-b81-windows-ml

      Description

      Failed to load admin console, when restarting the server from windows services.

      1- Go to windows services.
      2- Select "domain1 GlassFish Server" service.
      3- From left click --> Start.
      4- Open Admin console at "http://localhost:4848/".

      The GlassFish Server Administration Console appears with the following message:

      Welcome to GlassFish Server Open Source Edition 4.0 (build 81).

      Status: The Admin Console Application is not yet installed.

      If the browser does not refresh the page automatically please reload the page.

      and in the server.log the following errors thrown:

      .............
      [2013-03-26T15:05:44.565+0200] [glassfish 4.0] [INFO] [] [javax.enterprise.system.core] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1364303144565] [levelValue: 800] [[
        Grizzly Framework 2.3 started in: 2ms - bound to [/0.0.0.0:3,700]]]
      
      [2013-03-26T15:05:44.590+0200] [glassfish 4.0] [INFO] [] [org.glassfish.ha.store.spi.BackingStoreFactoryRegistry] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1364303144590] [levelValue: 800] [[
        Registered org.glassfish.ha.store.adapter.cache.ShoalBackingStoreProxy for persistence-type = replicated in BackingStoreFactoryRegistry]]
      
      [2013-03-26T15:05:44.621+0200] [glassfish 4.0] [INFO] [] [] [tid: _ThreadID=1 _ThreadName=Thread-3] [timeMillis: 1364303144621] [levelValue: 800] [[
        ** GlassFishBatchExecutorServiceProvider.postConstruct() called]]
      
      [2013-03-26T15:05:44.671+0200] [glassfish 4.0] [INFO] [NCLS-CORE-00015] [javax.enterprise.system.core] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1364303144671] [levelValue: 800] [[
        Shutdown requested
      MultiException stack 1 of 2
      java.lang.NullPointerException
      	at com.sun.enterprise.v3.server.ApplicationLoaderService.postConstruct(ApplicationLoaderService.java:206)
      	at org.jvnet.hk2.internal.ClazzCreator.postConstructMe(ClazzCreator.java:282)
      	at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:329)
      	at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:448)
      	at org.glassfish.hk2.runlevel.internal.RunLevelContext.findOrCreate(RunLevelContext.java:107)
      	at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2203)
      	at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:93)
      	at org.glassfish.hk2.runlevel.utilities.RunLevelControllerImpl$DefaultActivator.activate(RunLevelControllerImpl.java:359)
      	at org.glassfish.hk2.runlevel.utilities.RunLevelControllerImpl$Worker.activateRunLevel(RunLevelControllerImpl.java:778)
      	at org.glassfish.hk2.runlevel.utilities.RunLevelControllerImpl$Worker.upActiveRecorder(RunLevelControllerImpl.java:734)
      	at org.glassfish.hk2.runlevel.utilities.RunLevelControllerImpl$Worker.run(RunLevelControllerImpl.java:629)
      	at org.glassfish.hk2.runlevel.utilities.RunLevelControllerImpl$SyncProceedToWorker.proceedTo(RunLevelControllerImpl.java:896)
      	at org.glassfish.hk2.runlevel.utilities.RunLevelControllerImpl.proceedTo(RunLevelControllerImpl.java:559)
      	at org.glassfish.hk2.runlevel.utilities.RunLevelControllerImpl.proceedTo(RunLevelControllerImpl.java:339)
      	at com.sun.enterprise.v3.server.AppServerStartup.proceedTo(AppServerStartup.java:483)
      	at com.sun.enterprise.v3.server.AppServerStartup.run(AppServerStartup.java:280)
      	at com.sun.enterprise.v3.server.AppServerStartup.doStart(AppServerStartup.java:179)
      	at com.sun.enterprise.v3.server.AppServerStartup.start(AppServerStartup.java:170)
      	at com.sun.enterprise.glassfish.bootstrap.GlassFishImpl.start(GlassFishImpl.java:79)
      	at com.sun.enterprise.glassfish.bootstrap.GlassFishDecorator.start(GlassFishDecorator.java:63)
      	at com.sun.enterprise.glassfish.bootstrap.osgi.EmbeddedOSGiGlassFishImpl.start(EmbeddedOSGiGlassFishImpl.java:75)
      	at com.sun.enterprise.glassfish.bootstrap.GlassFishDecorator.start(GlassFishDecorator.java:63)
      	at com.sun.enterprise.glassfish.bootstrap.osgi.OSGiGlassFishImpl.start(OSGiGlassFishImpl.java:71)
      	at com.sun.enterprise.glassfish.bootstrap.GlassFishMain$Launcher.launch(GlassFishMain.java:117)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:601)
      	at com.sun.enterprise.glassfish.bootstrap.GlassFishMain.main(GlassFishMain.java:97)
      	at com.sun.enterprise.glassfish.bootstrap.ASMain.main(ASMain.java:54)
      MultiException stack 2 of 2
      java.lang.IllegalStateException: Unable to perform operation: post construct on com.sun.enterprise.v3.server.ApplicationLoaderService
      	at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:347)
      	at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:448)
      	at org.glassfish.hk2.runlevel.internal.RunLevelContext.findOrCreate(RunLevelContext.java:107)
      	at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2203)
      	at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:93)
      	at org.glassfish.hk2.runlevel.utilities.RunLevelControllerImpl$DefaultActivator.activate(RunLevelControllerImpl.java:359)
      	at org.glassfish.hk2.runlevel.utilities.RunLevelControllerImpl$Worker.activateRunLevel(RunLevelControllerImpl.java:778)
      	at org.glassfish.hk2.runlevel.utilities.RunLevelControllerImpl$Worker.upActiveRecorder(RunLevelControllerImpl.java:734)
      	at org.glassfish.hk2.runlevel.utilities.RunLevelControllerImpl$Worker.run(RunLevelControllerImpl.java:629)
      	at org.glassfish.hk2.runlevel.utilities.RunLevelControllerImpl$SyncProceedToWorker.proceedTo(RunLevelControllerImpl.java:896)
      	at org.glassfish.hk2.runlevel.utilities.RunLevelControllerImpl.proceedTo(RunLevelControllerImpl.java:559)
      	at org.glassfish.hk2.runlevel.utilities.RunLevelControllerImpl.proceedTo(RunLevelControllerImpl.java:339)
      	at com.sun.enterprise.v3.server.AppServerStartup.proceedTo(AppServerStartup.java:483)
      	at com.sun.enterprise.v3.server.AppServerStartup.run(AppServerStartup.java:280)
      	at com.sun.enterprise.v3.server.AppServerStartup.doStart(AppServerStartup.java:179)
      	at com.sun.enterprise.v3.server.AppServerStartup.start(AppServerStartup.java:170)
      	at com.sun.enterprise.glassfish.bootstrap.GlassFishImpl.start(GlassFishImpl.java:79)
      	at com.sun.enterprise.glassfish.bootstrap.GlassFishDecorator.start(GlassFishDecorator.java:63)
      	at com.sun.enterprise.glassfish.bootstrap.osgi.EmbeddedOSGiGlassFishImpl.start(EmbeddedOSGiGlassFishImpl.java:75)
      	at com.sun.enterprise.glassfish.bootstrap.GlassFishDecorator.start(GlassFishDecorator.java:63)
      	at com.sun.enterprise.glassfish.bootstrap.osgi.OSGiGlassFishImpl.start(OSGiGlassFishImpl.java:71)
      	at com.sun.enterprise.glassfish.bootstrap.GlassFishMain$Launcher.launch(GlassFishMain.java:117)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:601)
      	at com.sun.enterprise.glassfish.bootstrap.GlassFishMain.main(GlassFishMain.java:97)
      	at com.sun.enterprise.glassfish.bootstrap.ASMain.main(ASMain.java:54)
      ]]
      
      [2013-03-26T15:05:44.672+0200] [glassfish 4.0] [SEVERE] [NCLS-CORE-00016] [javax.enterprise.system.core] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1364303144672] [levelValue: 1000] [[
        Startup service failed to start
      MultiException stack 1 of 2
      java.lang.NullPointerException
      	at com.sun.enterprise.v3.server.ApplicationLoaderService.postConstruct(ApplicationLoaderService.java:206)
      	at org.jvnet.hk2.internal.ClazzCreator.postConstructMe(ClazzCreator.java:282)
      	at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:329)
      	at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:448)
      	at org.glassfish.hk2.runlevel.internal.RunLevelContext.findOrCreate(RunLevelContext.java:107)
      	at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2203)
      	at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:93)
      	at org.glassfish.hk2.runlevel.utilities.RunLevelControllerImpl$DefaultActivator.activate(RunLevelControllerImpl.java:359)
      	at org.glassfish.hk2.runlevel.utilities.RunLevelControllerImpl$Worker.activateRunLevel(RunLevelControllerImpl.java:778)
      	at org.glassfish.hk2.runlevel.utilities.RunLevelControllerImpl$Worker.upActiveRecorder(RunLevelControllerImpl.java:734)
      	at org.glassfish.hk2.runlevel.utilities.RunLevelControllerImpl$Worker.run(RunLevelControllerImpl.java:629)
      	at org.glassfish.hk2.runlevel.utilities.RunLevelControllerImpl$SyncProceedToWorker.proceedTo(RunLevelControllerImpl.java:896)
      	at org.glassfish.hk2.runlevel.utilities.RunLevelControllerImpl.proceedTo(RunLevelControllerImpl.java:559)
      	at org.glassfish.hk2.runlevel.utilities.RunLevelControllerImpl.proceedTo(RunLevelControllerImpl.java:339)
      	at com.sun.enterprise.v3.server.AppServerStartup.proceedTo(AppServerStartup.java:483)
      	at com.sun.enterprise.v3.server.AppServerStartup.run(AppServerStartup.java:280)
      	at com.sun.enterprise.v3.server.AppServerStartup.doStart(AppServerStartup.java:179)
      	at com.sun.enterprise.v3.server.AppServerStartup.start(AppServerStartup.java:170)
      	at com.sun.enterprise.glassfish.bootstrap.GlassFishImpl.start(GlassFishImpl.java:79)
      	at com.sun.enterprise.glassfish.bootstrap.GlassFishDecorator.start(GlassFishDecorator.java:63)
      	at com.sun.enterprise.glassfish.bootstrap.osgi.EmbeddedOSGiGlassFishImpl.start(EmbeddedOSGiGlassFishImpl.java:75)
      	at com.sun.enterprise.glassfish.bootstrap.GlassFishDecorator.start(GlassFishDecorator.java:63)
      	at com.sun.enterprise.glassfish.bootstrap.osgi.OSGiGlassFishImpl.start(OSGiGlassFishImpl.java:71)
      	at com.sun.enterprise.glassfish.bootstrap.GlassFishMain$Launcher.launch(GlassFishMain.java:117)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:601)
      	at com.sun.enterprise.glassfish.bootstrap.GlassFishMain.main(GlassFishMain.java:97)
      	at com.sun.enterprise.glassfish.bootstrap.ASMain.main(ASMain.java:54)
      MultiException stack 2 of 2
      java.lang.IllegalStateException: Unable to perform operation: post construct on com.sun.enterprise.v3.server.ApplicationLoaderService
      	at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:347)
      	at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:448)
      	at org.glassfish.hk2.runlevel.internal.RunLevelContext.findOrCreate(RunLevelContext.java:107)
      	at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2203)
      	at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:93)
      	at org.glassfish.hk2.runlevel.utilities.RunLevelControllerImpl$DefaultActivator.activate(RunLevelControllerImpl.java:359)
      	at org.glassfish.hk2.runlevel.utilities.RunLevelControllerImpl$Worker.activateRunLevel(RunLevelControllerImpl.java:778)
      	at org.glassfish.hk2.runlevel.utilities.RunLevelControllerImpl$Worker.upActiveRecorder(RunLevelControllerImpl.java:734)
      	at org.glassfish.hk2.runlevel.utilities.RunLevelControllerImpl$Worker.run(RunLevelControllerImpl.java:629)
      	at org.glassfish.hk2.runlevel.utilities.RunLevelControllerImpl$SyncProceedToWorker.proceedTo(RunLevelControllerImpl.java:896)
      	at org.glassfish.hk2.runlevel.utilities.RunLevelControllerImpl.proceedTo(RunLevelControllerImpl.java:559)
      	at org.glassfish.hk2.runlevel.utilities.RunLevelControllerImpl.proceedTo(RunLevelControllerImpl.java:339)
      	at com.sun.enterprise.v3.server.AppServerStartup.proceedTo(AppServerStartup.java:483)
      	at com.sun.enterprise.v3.server.AppServerStartup.run(AppServerStartup.java:280)
      	at com.sun.enterprise.v3.server.AppServerStartup.doStart(AppServerStartup.java:179)
      	at com.sun.enterprise.v3.server.AppServerStartup.start(AppServerStartup.java:170)
      	at com.sun.enterprise.glassfish.bootstrap.GlassFishImpl.start(GlassFishImpl.java:79)
      	at com.sun.enterprise.glassfish.bootstrap.GlassFishDecorator.start(GlassFishDecorator.java:63)
      	at com.sun.enterprise.glassfish.bootstrap.osgi.EmbeddedOSGiGlassFishImpl.start(EmbeddedOSGiGlassFishImpl.java:75)
      	at com.sun.enterprise.glassfish.bootstrap.GlassFishDecorator.start(GlassFishDecorator.java:63)
      	at com.sun.enterprise.glassfish.bootstrap.osgi.OSGiGlassFishImpl.start(OSGiGlassFishImpl.java:71)
      	at com.sun.enterprise.glassfish.bootstrap.GlassFishMain$Launcher.launch(GlassFishMain.java:117)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:601)
      	at com.sun.enterprise.glassfish.bootstrap.GlassFishMain.main(GlassFishMain.java:97)
      	at com.sun.enterprise.glassfish.bootstrap.ASMain.main(ASMain.java:54)
      ]]
      
      [2013-03-26T15:05:44.716+0200] [glassfish 4.0] [INFO] [] [javax.enterprise.system.core] [tid: _ThreadID=56 _ThreadName=Thread-6] [timeMillis: 1364303144716] [levelValue: 800] [[
        Server shutdown initiated]]
      
      [2013-03-26T15:05:44.761+0200] [glassfish 4.0] [INFO] [NCLS-BOOTSTRAP-00027] [javax.enterprise.bootstrap] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1364303144761] [levelValue: 800] [[
        Registered com.sun.enterprise.glassfish.bootstrap.osgi.EmbeddedOSGiGlassFishImpl@3f7b7a85 as OSGi service registration: org.apache.felix.framework.ServiceRegistrationImpl@61dce8cd.]]
      
      [2013-03-26T15:05:45.022+0200] [glassfish 4.0] [INFO] [] [org.glassfish.jersey.server.ApplicationHandler] [tid: _ThreadID=57 _ThreadName=pool-10-thread-1] [timeMillis: 1364303145022] [levelValue: 800] [[
        Initiating Jersey application, version Jersey: 2.0-m13-2 2013-03-12 11:01:14...]]
      
      [2013-03-26T15:05:45.718+0200] [glassfish 4.0] [INFO] [NCLS-BOOTSTRAP-00028] [javax.enterprise.bootstrap] [tid: _ThreadID=56 _ThreadName=Thread-6] [timeMillis: 1364303145718] [levelValue: 800] [[
        Unregistered com.sun.enterprise.glassfish.bootstrap.osgi.EmbeddedOSGiGlassFishImpl@3f7b7a85 from service registry.]]
      

        Issue Links

          Activity

          Hide
          Jeremy_Lv added a comment - - edited

          Mohamed:
          I will try your steps to reproduce it...

          Thanks.

          Show
          Jeremy_Lv added a comment - - edited Mohamed: I will try your steps to reproduce it... Thanks.
          Hide
          Jeremy_Lv added a comment -

          Yes, It can be reproduced as the later steps you have list.

          Show
          Jeremy_Lv added a comment - Yes, It can be reproduced as the later steps you have list.
          Hide
          Jeremy_Lv added a comment -

          Here's more information about this failure:
          When the domain is stopped after enable "Load console after DAS startup", it will cause the following SEVERE:

          [2013-03-27T20:46:29.589+0900] [glassfish 4.0] [SEVERE] [] [javax.enterprise.web.util] [tid: _ThreadID=135 _ThreadName=Thread-25] [timeMillis: 1364384789589] [levelValue: 1000] [[
            The web application [] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@136a4ce]) and a value of type [org.glassfish.admingui.theme.AdminguiThemeContext] (value [org.glassfish.admingui.theme.AdminguiThemeContext@7dd207]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.]]
          
          [2013-03-27T20:46:29.590+0900] [glassfish 4.0] [SEVERE] [] [javax.enterprise.web.util] [tid: _ThreadID=135 _ThreadName=Thread-25] [timeMillis: 1364384789590] [levelValue: 1000] [[
            The web application [] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@136a4ce]) and a value of type [org.glassfish.admingui.theme.AdminguiThemeContext] (value [org.glassfish.admingui.theme.AdminguiThemeContext@7dd207]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.]]
          
          [2013-03-27T20:46:29.591+0900] [glassfish 4.0] [SEVERE] [] [javax.enterprise.web.util] [tid: _ThreadID=135 _ThreadName=Thread-25] [timeMillis: 1364384789591] [levelValue: 1000] [[
            The web application [] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@136a4ce]) and a value of type [org.glassfish.admingui.theme.AdminguiThemeContext] (value [org.glassfish.admingui.theme.AdminguiThemeContext@7dd207]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.]]
          
          [2013-03-27T20:46:29.592+0900] [glassfish 4.0] [SEVERE] [] [javax.enterprise.web.util] [tid: _ThreadID=135 _ThreadName=Thread-25] [timeMillis: 1364384789592] [levelValue: 1000] [[
            The web application [] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@136a4ce]) and a value of type [org.glassfish.admingui.theme.AdminguiThemeContext] (value [org.glassfish.admingui.theme.AdminguiThemeContext@7dd207]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.]]
          
          Show
          Jeremy_Lv added a comment - Here's more information about this failure: When the domain is stopped after enable "Load console after DAS startup", it will cause the following SEVERE: [2013-03-27T20:46:29.589+0900] [glassfish 4.0] [SEVERE] [] [javax.enterprise.web.util] [tid: _ThreadID=135 _ThreadName= Thread -25] [timeMillis: 1364384789589] [levelValue: 1000] [[ The web application [] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@136a4ce]) and a value of type [org.glassfish.admingui.theme.AdminguiThemeContext] (value [org.glassfish.admingui.theme.AdminguiThemeContext@7dd207]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.]] [2013-03-27T20:46:29.590+0900] [glassfish 4.0] [SEVERE] [] [javax.enterprise.web.util] [tid: _ThreadID=135 _ThreadName= Thread -25] [timeMillis: 1364384789590] [levelValue: 1000] [[ The web application [] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@136a4ce]) and a value of type [org.glassfish.admingui.theme.AdminguiThemeContext] (value [org.glassfish.admingui.theme.AdminguiThemeContext@7dd207]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.]] [2013-03-27T20:46:29.591+0900] [glassfish 4.0] [SEVERE] [] [javax.enterprise.web.util] [tid: _ThreadID=135 _ThreadName= Thread -25] [timeMillis: 1364384789591] [levelValue: 1000] [[ The web application [] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@136a4ce]) and a value of type [org.glassfish.admingui.theme.AdminguiThemeContext] (value [org.glassfish.admingui.theme.AdminguiThemeContext@7dd207]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.]] [2013-03-27T20:46:29.592+0900] [glassfish 4.0] [SEVERE] [] [javax.enterprise.web.util] [tid: _ThreadID=135 _ThreadName= Thread -25] [timeMillis: 1364384789592] [levelValue: 1000] [[ The web application [] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@136a4ce]) and a value of type [org.glassfish.admingui.theme.AdminguiThemeContext] (value [org.glassfish.admingui.theme.AdminguiThemeContext@7dd207]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.]]
          Hide
          Jeremy_Lv added a comment -

          I have try to change the code as follows:

          ===================================================================
          --- ApplicationLoaderService.java	(revision 60917)
          +++ ApplicationLoaderService.java	(working copy)
          @@ -187,6 +187,12 @@
                   systemApplications = domain.getSystemApplications();
                   for (Application systemApp : systemApplications.getApplications()) {
                     appOrderInfoMap.put(systemApp, new Integer(appOrder++));
          +          if (Boolean.valueOf(systemApp.getDeployProperties().getProperty
          +                  (ServerTags.LOAD_SYSTEM_APP_ON_STARTUP))) {
          +                  if (deployment.isAppEnabled(systemApp) || loadAppOnDAS(systemApp.getName())) {
          +                    DeploymentOrder.addApplicationDeployment(new ApplicationOrderInfo(systemApp, appOrderInfoMap.get(systemApp).intValue()));
          +                  }
          +              }
                   }
                   List<Application> standaloneAdapters =
                       applications.getApplicationsWithSnifferType(ServerTags.CONNECTOR, true);
          @@ -197,16 +203,6 @@
                   for (Application app : allApplications) {
                     appOrderInfoMap.put(app, new Integer(appOrder++));
                   }
          -        
          -        for (Application systemApp : systemApplications.getApplications()) {
          -            // check to see if we need to load up this system application
          -            if (Boolean.valueOf(systemApp.getDeployProperties().getProperty
          -                (ServerTags.LOAD_SYSTEM_APP_ON_STARTUP))) {
          -                if (deployment.isAppEnabled(systemApp) || loadAppOnDAS(systemApp.getName())) {
          -                  DeploymentOrder.addApplicationDeployment(new ApplicationOrderInfo(systemApp, appOrderInfoMap.get(systemApp).intValue()));
          -                }
          -            }
          -        }
          

          After doing this, the domain can be start successfully, but some of the severe messages related to the web comes out as :

          [2013-03-27T20:54:36.910+0900] [glassfish 4.0] [WARNING] [] [javax.enterprise.web] [tid: _ThreadID=88 _ThreadName=Thread-13] [timeMillis: 1364385276910] [levelValue: 900] [[
            java.lang.Exception: Virtual server __asadmin already has a web module __admingui loaded at / therefore web module __admingui cannot be loaded at this context path on this virtual server
          java.lang.Exception: Virtual server __asadmin already has a web module __admingui loaded at / therefore web module __admingui cannot be loaded at this context path on this virtual server
          	at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:2069)
          	at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1924)
          	at com.sun.enterprise.web.WebApplication.start(WebApplication.java:139)
          	at org.glassfish.internal.data.EngineRef.start(EngineRef.java:122)
          	at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:291)
          	at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:352)
          	at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:497)
          	at com.sun.enterprise.v3.server.ApplicationLoaderService.processApplication(ApplicationLoaderService.java:401)
          	at com.sun.enterprise.v3.admin.adapter.InstallerThread.load(InstallerThread.java:201)
          	at com.sun.enterprise.v3.admin.adapter.InstallerThread.run(InstallerThread.java:98)
          ]]
          
          [2013-03-27T20:54:36.911+0900] [glassfish 4.0] [SEVERE] [] [javax.enterprise.system.tools.deployment.common] [tid: _ThreadID=88 _ThreadName=Thread-13] [timeMillis: 1364385276911] [levelValue: 1000] [[
            Exception while invoking class com.sun.enterprise.web.WebApplication start method
          java.lang.Exception: java.lang.Exception: Virtual server __asadmin already has a web module __admingui loaded at / therefore web module __admingui cannot be loaded at this context path on this virtual server
          	at com.sun.enterprise.web.WebApplication.start(WebApplication.java:168)
          	at org.glassfish.internal.data.EngineRef.start(EngineRef.java:122)
          	at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:291)
          	at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:352)
          	at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:497)
          	at com.sun.enterprise.v3.server.ApplicationLoaderService.processApplication(ApplicationLoaderService.java:401)
          	at com.sun.enterprise.v3.admin.adapter.InstallerThread.load(InstallerThread.java:201)
          	at com.sun.enterprise.v3.admin.adapter.InstallerThread.run(InstallerThread.java:98)
          ]]
          
          [2013-03-27T20:54:36.912+0900] [glassfish 4.0] [SEVERE] [NCLS-CORE-00026] [javax.enterprise.system.core] [tid: _ThreadID=88 _ThreadName=Thread-13] [timeMillis: 1364385276912] [levelValue: 1000] [[
            Exception during lifecycle processing
          java.lang.Exception: java.lang.Exception: Virtual server __asadmin already has a web module __admingui loaded at / therefore web module __admingui cannot be loaded at this context path on this virtual server
          	at com.sun.enterprise.web.WebApplication.start(WebApplication.java:168)
          	at org.glassfish.internal.data.EngineRef.start(EngineRef.java:122)
          	at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:291)
          	at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:352)
          	at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:497)
          	at com.sun.enterprise.v3.server.ApplicationLoaderService.processApplication(ApplicationLoaderService.java:401)
          	at com.sun.enterprise.v3.admin.adapter.InstallerThread.load(InstallerThread.java:201)
          	at com.sun.enterprise.v3.admin.adapter.InstallerThread.run(InstallerThread.java:98)
          ]]
          
          [2013-03-27T20:54:36.912+0900] [glassfish 4.0] [SEVERE] [] [javax.enterprise.system.core] [tid: _ThreadID=88 _ThreadName=Thread-13] [timeMillis: 1364385276912] [levelValue: 1000] [[
            Exception while loading the app]]
          
          [2013-03-27T20:54:36.991+0900] [glassfish 4.0] [SEVERE] [NCLS-CORE-00041] [javax.enterprise.system.core] [tid: _ThreadID=88 _ThreadName=Thread-13] [timeMillis: 1364385276991] [levelValue: 1000] [[
            Application deployment failed: Exception while loading the app]]
          
          Show
          Jeremy_Lv added a comment - I have try to change the code as follows: =================================================================== --- ApplicationLoaderService.java (revision 60917) +++ ApplicationLoaderService.java (working copy) @@ -187,6 +187,12 @@ systemApplications = domain.getSystemApplications(); for (Application systemApp : systemApplications.getApplications()) { appOrderInfoMap.put(systemApp, new Integer (appOrder++)); + if ( Boolean .valueOf(systemApp.getDeployProperties().getProperty + (ServerTags.LOAD_SYSTEM_APP_ON_STARTUP))) { + if (deployment.isAppEnabled(systemApp) || loadAppOnDAS(systemApp.getName())) { + DeploymentOrder.addApplicationDeployment( new ApplicationOrderInfo(systemApp, appOrderInfoMap.get(systemApp).intValue())); + } + } } List<Application> standaloneAdapters = applications.getApplicationsWithSnifferType(ServerTags.CONNECTOR, true ); @@ -197,16 +203,6 @@ for (Application app : allApplications) { appOrderInfoMap.put(app, new Integer (appOrder++)); } - - for (Application systemApp : systemApplications.getApplications()) { - // check to see if we need to load up this system application - if ( Boolean .valueOf(systemApp.getDeployProperties().getProperty - (ServerTags.LOAD_SYSTEM_APP_ON_STARTUP))) { - if (deployment.isAppEnabled(systemApp) || loadAppOnDAS(systemApp.getName())) { - DeploymentOrder.addApplicationDeployment( new ApplicationOrderInfo(systemApp, appOrderInfoMap.get(systemApp).intValue())); - } - } - } After doing this, the domain can be start successfully, but some of the severe messages related to the web comes out as : [2013-03-27T20:54:36.910+0900] [glassfish 4.0] [WARNING] [] [javax.enterprise.web] [tid: _ThreadID=88 _ThreadName= Thread -13] [timeMillis: 1364385276910] [levelValue: 900] [[ java.lang.Exception: Virtual server __asadmin already has a web module __admingui loaded at / therefore web module __admingui cannot be loaded at this context path on this virtual server java.lang.Exception: Virtual server __asadmin already has a web module __admingui loaded at / therefore web module __admingui cannot be loaded at this context path on this virtual server at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:2069) at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1924) at com.sun.enterprise.web.WebApplication.start(WebApplication.java:139) at org.glassfish.internal.data.EngineRef.start(EngineRef.java:122) at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:291) at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:352) at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:497) at com.sun.enterprise.v3.server.ApplicationLoaderService.processApplication(ApplicationLoaderService.java:401) at com.sun.enterprise.v3.admin.adapter.InstallerThread.load(InstallerThread.java:201) at com.sun.enterprise.v3.admin.adapter.InstallerThread.run(InstallerThread.java:98) ]] [2013-03-27T20:54:36.911+0900] [glassfish 4.0] [SEVERE] [] [javax.enterprise.system.tools.deployment.common] [tid: _ThreadID=88 _ThreadName= Thread -13] [timeMillis: 1364385276911] [levelValue: 1000] [[ Exception while invoking class com.sun.enterprise.web.WebApplication start method java.lang.Exception: java.lang.Exception: Virtual server __asadmin already has a web module __admingui loaded at / therefore web module __admingui cannot be loaded at this context path on this virtual server at com.sun.enterprise.web.WebApplication.start(WebApplication.java:168) at org.glassfish.internal.data.EngineRef.start(EngineRef.java:122) at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:291) at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:352) at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:497) at com.sun.enterprise.v3.server.ApplicationLoaderService.processApplication(ApplicationLoaderService.java:401) at com.sun.enterprise.v3.admin.adapter.InstallerThread.load(InstallerThread.java:201) at com.sun.enterprise.v3.admin.adapter.InstallerThread.run(InstallerThread.java:98) ]] [2013-03-27T20:54:36.912+0900] [glassfish 4.0] [SEVERE] [NCLS-CORE-00026] [javax.enterprise.system.core] [tid: _ThreadID=88 _ThreadName= Thread -13] [timeMillis: 1364385276912] [levelValue: 1000] [[ Exception during lifecycle processing java.lang.Exception: java.lang.Exception: Virtual server __asadmin already has a web module __admingui loaded at / therefore web module __admingui cannot be loaded at this context path on this virtual server at com.sun.enterprise.web.WebApplication.start(WebApplication.java:168) at org.glassfish.internal.data.EngineRef.start(EngineRef.java:122) at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:291) at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:352) at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:497) at com.sun.enterprise.v3.server.ApplicationLoaderService.processApplication(ApplicationLoaderService.java:401) at com.sun.enterprise.v3.admin.adapter.InstallerThread.load(InstallerThread.java:201) at com.sun.enterprise.v3.admin.adapter.InstallerThread.run(InstallerThread.java:98) ]] [2013-03-27T20:54:36.912+0900] [glassfish 4.0] [SEVERE] [] [javax.enterprise.system.core] [tid: _ThreadID=88 _ThreadName= Thread -13] [timeMillis: 1364385276912] [levelValue: 1000] [[ Exception while loading the app]] [2013-03-27T20:54:36.991+0900] [glassfish 4.0] [SEVERE] [NCLS-CORE-00041] [javax.enterprise.system.core] [tid: _ThreadID=88 _ThreadName= Thread -13] [timeMillis: 1364385276991] [levelValue: 1000] [[ Application deployment failed: Exception while loading the app]]
          Hide
          Hong Zhang added a comment -

          Mohamed: thanks for the detailed steps and now I could reproduce it also on my linux box.

          Jeremy: thanks for the investigation on this, it was very helpful! There does seem to be strange timing issue here associated with the NPE. I tried to get the order information out of the map as a separate step before constructing the ApplicationOrderInfo and that made the NPE disappear also so I made that change. I also saw the already loaded exception afterwards. It seems the InstallerThread (which is to load the console application in normal case) tried to load it again in this case, I added a check there to not load it again if it's already loaded.

          I saw the same severe message about potential memory leak also, but it's not related to set load console on DAS start up. If I just start domain, go to localhost:4848 to access console and then stop domain, I will see the same message in the server.log. I will file an issue for this for the web container team to take a look.

          Show
          Hong Zhang added a comment - Mohamed: thanks for the detailed steps and now I could reproduce it also on my linux box. Jeremy: thanks for the investigation on this, it was very helpful! There does seem to be strange timing issue here associated with the NPE. I tried to get the order information out of the map as a separate step before constructing the ApplicationOrderInfo and that made the NPE disappear also so I made that change. I also saw the already loaded exception afterwards. It seems the InstallerThread (which is to load the console application in normal case) tried to load it again in this case, I added a check there to not load it again if it's already loaded. I saw the same severe message about potential memory leak also, but it's not related to set load console on DAS start up. If I just start domain, go to localhost:4848 to access console and then stop domain, I will see the same message in the server.log. I will file an issue for this for the web container team to take a look.

            People

            • Assignee:
              Hong Zhang
              Reporter:
              Mohamed Taman
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: