[infinispan-issues] [JBoss JIRA] (ISPN-9563) Intermittent NPE when starting the server

Gustavo Fernandes (JIRA) issues at jboss.org
Mon Oct 1 07:19:00 EDT 2018


Gustavo Fernandes created ISPN-9563:
---------------------------------------

             Summary: Intermittent NPE when starting the server
                 Key: ISPN-9563
                 URL: https://issues.jboss.org/browse/ISPN-9563
             Project: Infinispan
          Issue Type: Bug
          Components: Core, Server
            Reporter: Gustavo Fernandes
            Priority: Blocker


Sometime the server throws NPE when starting due to missing components in the internal component registry. One of the exceptions is:

{noformat}
2018-09-27 14:14:43,163 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC000001: Failed to start service jboss.datagrid-infinispan-endpoint.hotrod.hotrod-connector: org.jboss.msc.service.StartException in service jboss.datagrid-infinispan-endpoint.hotrod.hotrod-connector: DGENDPT10004: Failed to start HotRodServer
        at org.infinispan.server.endpoint.subsystem.ProtocolServerService.start(ProtocolServerService.java:160)
        at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1736)
        at org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1698)
        at org.jboss.msc.service.ServiceControllerImpl$ControllerTask.run(ServiceControllerImpl.java:1556)
        at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
        at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1985)
        at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1487)
        at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1378)
        at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NullPointerException
        at org.infinispan.counter.EmbeddedCounterManagerFactory.asCounterManager(EmbeddedCounterManagerFactory.java:28)
        at org.infinispan.server.hotrod.HotRodServer.startInternal(HotRodServer.java:236)
        at org.infinispan.server.hotrod.HotRodServer.startInternal(HotRodServer.java:108)
        at org.infinispan.server.core.AbstractProtocolServer.start(AbstractProtocolServer.java:79)
        at org.infinispan.server.endpoint.subsystem.SecurityActions$6.run(SecurityActions.java:136)
        at org.infinispan.server.endpoint.subsystem.SecurityActions$6.run(SecurityActions.java:133)
        at org.infinispan.security.Security.doPrivileged(Security.java:44)
        at org.infinispan.server.endpoint.subsystem.SecurityActions.doPrivileged(SecurityActions.java:42)
        at org.infinispan.server.endpoint.subsystem.SecurityActions.startProtocolServer(SecurityActions.java:140)
        at org.infinispan.server.endpoint.subsystem.ProtocolServerService.startProtocolServer(ProtocolServerService.java:194)
        at org.infinispan.server.endpoint.subsystem.ProtocolServerService.start(ProtocolServerService.java:152)
        ... 8 more
{noformat}

This was due to the fact that the {{ModuleLifecycle}} from the several modules in the server are sometimes simply ignored.

The cause is a {{WeakReference<ClassLoader>}} present in {{org.infinispan.configuration.global.GlobalConfiguration}} that sometimes is {{null}} and when the GlobalConfigurationRegistry is started, the Classloader used will default to {{Thread.currentThread().getContextClassLoader()}} that cannot detect the Lifecycle implementations



--
This message was sent by Atlassian JIRA
(v7.5.0#75005)


More information about the infinispan-issues mailing list