Uploaded image for project: 'Red Hat Data Grid'
  1. Red Hat Data Grid
  2. JDG-246

NullPointerException if authentication configuration is not complete

XMLWordPrintable

      If the security authentication is enabled for a cache and the global security configuration is not set the server start will throw a NullPointerException like shown below.

      It should be an error message logged which shows which configuration element is expected but missed.

      2016-04-26 09:11:19,896 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC000001: Failed to start service jboss.datagrid-infinispan.clustered.securedCache: org.jboss.msc.service.StartException in service jboss.datagrid-infinispan.clustered.securedCache: Failed to start service
              at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1904)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      Caused by: java.lang.NullPointerException
              at org.infinispan.security.impl.AuthorizationManagerImpl.init(AuthorizationManagerImpl.java:32)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:498)
              at org.infinispan.commons.util.ReflectionUtil.invokeAccessibly(ReflectionUtil.java:168)
              ... 112 more
      2016-04-26 09:11:20,218 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-6) 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:147)
              at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)
              at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
              at java.lang.Thread.run(Thread.java:745)
      Caused by: java.lang.NullPointerException
              at org.infinispan.server.hotrod.HotRodServer.getCacheInstance(HotRodServer.scala:235)
              at org.infinispan.server.hotrod.HotRodServer$$anonfun$preStartCaches$1.apply(HotRodServer.scala:160)
              at org.infinispan.server.hotrod.HotRodServer$$anonfun$preStartCaches$1.apply(HotRodServer.scala:158)
              at scala.collection.Iterator$class.foreach(Iterator.scala:742)
              at scala.collection.AbstractIterator.foreach(Iterator.scala:1194)
              at org.infinispan.server.hotrod.HotRodServer.preStartCaches(HotRodServer.scala:158)
              at org.infinispan.server.hotrod.HotRodServer.startTransport(HotRodServer.scala:145)
              at org.infinispan.server.core.AbstractProtocolServer.startInternal(AbstractProtocolServer.scala:40)
              at org.infinispan.server.hotrod.HotRodServer.startInternal(HotRodServer.scala:109)
              at org.infinispan.server.hotrod.HotRodServer.startInternal(HotRodServer.scala:49)
              at org.infinispan.server.core.AbstractProtocolServer.start(AbstractProtocolServer.scala:46)
              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:76)
              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:177)
              at org.infinispan.server.endpoint.subsystem.ProtocolServerService.start(ProtocolServerService.java:139)
              ... 5 more
      

        1. server.log
          49 kB
        2. clustered.xml
          18 kB

              rh-ee-galder Galder ZamarreƱo
              rhn-support-wfink Wolf Fink
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: