ICEpush
  1. ICEpush
  2. PUSH-132

ExtensionRegistry's contextInitialized(...) method not being invoked

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0-Alpha3
    • Fix Version/s: 3.0
    • Component/s: Push Library
    • Labels:
      None
    • Environment:
      WebLogic Server 10.3.5.0, ICEfaces 2, ICEpush, .ear

      Description

      Using an .ear containing an ICEfaces 2 application on WebLogic Server results in the following exception when trying to start the application:

      ####<May 18, 2011 12:19:50 AM CEST> <Warning> <HTTP> <stand-alone.o-net.domain> <ICEsoft_Stand-Alone_Server> <[ACTIVE] ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1305670790655> <BEA-101162> <User defined listener
       org.icepush.servlet.MainServlet$ExtensionRegistration failed: java.lang.NullPointerException.
      java.lang.NullPointerException
              at org.icepush.util.ExtensionRegistry.addExtension(ExtensionRegistry.java:52)
              at org.icepush.servlet.MainServlet$ExtensionRegistration.contextInitialized(MainServlet.java:125)
              at weblogic.servlet.internal.EventsManager$FireContextListenerAction.run(EventsManager.java:481)
              at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
              at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
              at weblogic.servlet.internal.EventsManager.notifyContextCreatedEvent(EventsManager.java:181)
              at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1872)
              at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:3153)
              at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1508)
              at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:482)
              at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425)
              at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
              at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
              at weblogic.application.internal.flow.ScopedModuleDriver.start(ScopedModuleDriver.java:200)
              at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:247)
              at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425)
              at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
              at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
              at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:27)
              at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:636)
              at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
              at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:205)
              at weblogic.application.internal.EarDeployment.activate(EarDeployment.java:58)
              at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:161)
              at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:79)
              at weblogic.deploy.internal.targetserver.operations.AbstractOperation.activate(AbstractOperation.java:569)
              at weblogic.deploy.internal.targetserver.operations.ActivateOperation.activateDeployment(ActivateOperation.java:150)
              at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doCommit(ActivateOperation.java:116)
              at weblogic.deploy.internal.targetserver.operations.AbstractOperation.commit(AbstractOperation.java:323)
              at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentCommit(DeploymentManager.java:844)
              at weblogic.deploy.internal.targetserver.DeploymentManager.activateDeploymentList(DeploymentManager.java:1253)
              at weblogic.deploy.internal.targetserver.DeploymentManager.handleCommit(DeploymentManager.java:440)
              at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.commit(DeploymentServiceDispatcher.java:163)
              at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doCommitCallback(DeploymentReceiverCallbackDeliverer.java:195)
              at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$100(DeploymentReceiverCallbackDeliverer.java:13)
              at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$2.run(DeploymentReceiverCallbackDeliverer.java:68)
              at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:528)
              at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
              at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
      >

      This seems to be related to the following code snippets from the ExtensionRegistry class"

          public void contextInitialized(ServletContextEvent servletContextEvent) {
              servletContextEvent.getServletContext().setAttribute(NAME, new HashMap());
          }

          public static void addExtension(ServletContext context, int quality, String name, Object extension) {
              Map extensions = (Map) context.getAttribute(NAME);
              TreeSet namedExtensions = (TreeSet) extensions.get(name); <===--- NPE
              if (namedExtensions == null) {
                  namedExtensions = new TreeSet();
                  extensions.put(name, namedExtensions);
              }

              namedExtensions.add(new ExtensionEntry(quality, extension));
          }

        Issue Links

          Activity

          Repository Revision Date User Message
          ICEsoft Public SVN Repository #24827 Mon Jun 13 15:19:58 MDT 2011 mircea.toma PUSH-132, PUSH-134 Add map containing the extensions when needed, even if the ExtensionRegistry context listener was not notified yet.
          Files Changed
          Commit graph MODIFY /icepush/trunk/core/src/main/java/org/icepush/util/ExtensionRegistry.java

            People

            • Assignee:
              Mircea Toma
              Reporter:
              Jack Van Ooststroom
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: