Step to reproduce (using jmx-console):
download a clean jboss-6.0.0-Final.
go to ${JBOSS_HOME}/bin
launch ./run.sh -b 0.0.0.0 -c all
point the browser to http://localhost:8080/jmx-console/
open MBean service=JNDIView
invoke list method.
The results will be 500 - An error as occurred.
The console output will be:
23:16:31,494 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/jmx-console].[HtmlAdaptor]] Servlet.service() for servlet HtmlAdaptor threw exception: java.lang.NullPointerException: Null keys are not supported!
at org.infinispan.util.AbstractMap.assertKeyNotNull(AbstractMap.java:33) [:4.2.0.FINAL]
at org.infinispan.util.FastCopyHashMap.containsKey(FastCopyHashMap.java:177) [:4.2.0.FINAL]
at org.infinispan.atomic.AtomicHashMap.containsKey(AtomicHashMap.java:107) [:4.2.0.FINAL]
at org.infinispan.atomic.AtomicHashMapProxy.containsKey(AtomicHashMapProxy.java:143) [:4.2.0.FINAL]
at org.infinispan.tree.NodeImpl.hasChild(NodeImpl.java:383) [:4.2.0.FINAL]
at org.infinispan.tree.NodeImpl.hasChild(NodeImpl.java:373) [:4.2.0.FINAL]
at org.jboss.ha.jndi.ispn.DistributedTreeManager.list(DistributedTreeManager.java:348) [:1.0.0.Final]
at org.jboss.ha.jndi.HAJNDI.list(HAJNDI.java:151) [:6.0.0.Final]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_22]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_22]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_22]
at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_22]
at org.jboss.ha.framework.interfaces.HARMIClient.invoke(HARMIClient.java:318) [:2.0.0.Final]
at $Proxy183.list(Unknown Source) at org.jnp.interfaces.NamingContext.list(NamingContext.java:939) [:5.0.5.Final]
at org.jnp.interfaces.NamingContext.list(NamingContext.java:922) [:5.0.5.Final]
at javax.naming.InitialContext.list(InitialContext.java:436) [:1.6.0_22]
at org.jboss.naming.JNDIView.list(JNDIView.java:537) [:5.0.5.Final]
Step to reproduce (using code):
Hashtable jndiEvn = new Hashtable();
jndiEvn.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
jndiEvn.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");
jndiEvn.put(Context.PROVIDER_URL, "localhost:1100");
InitialContext ctx = null;
try
{
ctx = new InitialContext(jndiEvn);
}
catch (Exception e)
{
e.printStackTrace();
System.exit(0);
}
try {
NamingEnumeration<NameClassPair> o = ctx.list("");
while(o.hasMore())
{
System.out.println(o.next().getName());
}
} catch (Exception e)
{
e.printStackTrace();
}
The output will be:
java.lang.NullPointerException: Null keys are not supported!
at org.infinispan.util.AbstractMap.assertKeyNotNull(AbstractMap.java:33)
at org.infinispan.util.FastCopyHashMap.containsKey(FastCopyHashMap.java:177)
at org.infinispan.atomic.AtomicHashMap.containsKey(AtomicHashMap.java:107)
at org.infinispan.atomic.AtomicHashMapProxy.containsKey(AtomicHashMapProxy.java:143)
at org.infinispan.tree.NodeImpl.hasChild(NodeImpl.java:383)
at org.infinispan.tree.NodeImpl.hasChild(NodeImpl.java:373)
at org.jboss.ha.jndi.ispn.DistributedTreeManager.list(DistributedTreeManager.java:348)
at org.jboss.ha.jndi.HAJNDI.list(HAJNDI.java:151)