[jboss-jira] [JBoss JIRA] Commented: (JGRP-704) Configurator.startProtocolStack() throws NPE if cluster_name is null
Bela Ban (JIRA)
jira-events at lists.jboss.org
Mon Mar 3 04:47:58 EST 2008
[ http://jira.jboss.com/jira/browse/JGRP-704?page=comments#action_12401080 ]
Bela Ban commented on JGRP-704:
-------------------------------
I'll need to investigate this as part of reviving 'pure' unicast communication in JGroups (http://jira.jboss.com/jira/browse/JGRP-705).
JBM misuses the connect() call and must not pass a null argument, this is a bug in JBM. Even if I fix the NPE, JGroups will assume this channel is a unicast channel (obviously not for MuxChannel, but we want to be on the safe side)...
> Configurator.startProtocolStack() throws NPE if cluster_name is null
> --------------------------------------------------------------------
>
> Key: JGRP-704
> URL: http://jira.jboss.com/jira/browse/JGRP-704
> Project: JGroups
> Issue Type: Bug
> Affects Versions: 2.6.2
> Reporter: Brian Stansberry
> Assigned To: Bela Ban
> Priority: Minor
> Fix For: 2.7, 2.6.3
>
>
> Tries to pass the null to ConcurrentMap.keySet().contains(), which throws NPE:
> 2008-02-28 17:43:06,098 ERROR [org.jboss.messaging.util.ExceptionUtil] org.jboss.messaging.core.jmx.MessagingPostOfficeService at 1a0d916 startService
> org.jgroups.ChannelException: failed to start protocol stack
> at org.jgroups.JChannel.startStack(JChannel.java:1440)
> at org.jgroups.JChannel.connect(JChannel.java:362)
> at org.jboss.messaging.core.impl.postoffice.GroupMember.start(GroupMember.java:142)
> ....
> Caused by: java.lang.NullPointerException
> at java.util.concurrent.ConcurrentHashMap.hash(ConcurrentHashMap.java:157)
> at java.util.concurrent.ConcurrentHashMap.containsKey(ConcurrentHashMap.java:745)
> at java.util.concurrent.ConcurrentHashMap$KeySet.contains(ConcurrentHashMap.java:1215)
> at org.jgroups.stack.Configurator.startProtocolStack(Configurator.java:85)
> at org.jgroups.stack.ProtocolStack.startStack(ProtocolStack.java:341)
> at org.jgroups.JChannel.startStack(JChannel.java:1437)
> ... 59 more
> In JChannel.startStack(String cluster_name) there's this which implies a null cluster_name is meant to work:
> if(cluster_name == null) {
> if(log.isDebugEnabled()) log.debug("cluster_name is null, assuming unicast channel");
> }
> If it isn't meant to work any longer, then an IllegalArgumentException is better than NPE.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list