3 Replies Latest reply on Jun 4, 2013 2:56 AM by cyron

    NPE when add ejb3/cache

    cyron Newbie

      In EAP 6.1.0, NPE happens when I add ejb3/cache using the following cli:

       

      ./subsystem=ejb3/cache=my-cache:add(passivation-store=infinispan)

       

      with the next outputs.

       

      ERROR [org.jboss.as.controller.management-operation] (management-handler-thread - 1) JBAS014612: Operation ("add") failed - address: ([

          ("subsystem" => "ejb3"),

          ("cache" => "my-cache")

      ]): java.lang.NullPointerException

          at java.util.HashSet.<init>(HashSet.java:116) [rt.jar:1.6.0_24]

          at org.jboss.as.ejb3.subsystem.CacheFactoryAdd.installRuntimeServices(CacheFactoryAdd.java:83)

          at org.jboss.as.ejb3.subsystem.CacheFactoryAdd.performRuntime(CacheFactoryAdd.java:74)

          at org.jboss.as.controller.AbstractAddStepHandler$1.execute(AbstractAddStepHandler.java:50) [jboss-as-controller-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]

          at org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:440) [jboss-as-controller-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]

       

      When I add the aliases attribute, it becomes OK, but aliases attribute is nillable, it should ok without the aliases attribute.

       

      And it's OK in EAP 6.0.1 withoutthe aliases attribute.

       

      So I did some research, and it turned out the StringListAttributeDefinition#unwrap will return null when the attribute is not defined.

       

      I also believe there are more subsystems have the same problem other than the ejb3/cache.