Closed glassfishrobot closed 14 years ago
@glassfishrobot Commented Reported by shreedhar_ganapathy
@glassfishrobot Commented shreedhar_ganapathy said: Relevant Checkins https://shoal.dev.java.net/servlets/ReadMsg?list=cvs&msgNo=611
And
User: shreedhar_ganapathy Date: 2008-06-28 15:06:07+0000 Modified: shoal/gms/src/java/com/sun/enterprise/jxtamgmt/ClusterManager.java
Log: Fix for issue 67 : NPE in setting Bind interface address in ClusterManager Line 161: Added check for empty Properties object.
File Changes:
— ClusterManager.java 2008-06-26 12:56:11+0000 1.38 +++ ClusterManager.java 2008-06-28 15:06:05+0000 1.39 @@ -36,41 +36,23 @@
package com.sun.enterprise.jxtamgmt;
-import static com.sun.enterprise.jxtamgmt.JxtaUtil.getObjectFromByteArray; import com.sun.enterprise.ee.cms.core.MemberNotInViewException; -import net.jxta.document.AdvertisementFactory; -import net.jxta.document.MimeMediaType; -import net.jxta.document.StructuredDocument; -import net.jxta.document.StructuredDocumentFactory; -import net.jxta.document.XMLDocument; -import net.jxta.endpoint.ByteArrayMessageElement; -import net.jxta.endpoint.EndpointAddress; -import net.jxta.endpoint.Message; -import net.jxta.endpoint.MessageElement; -import net.jxta.endpoint.TextDocumentMessageElement; +import static com.sun.enterprise.jxtamgmt.JxtaUtil.getObjectFromByteArray; +import net.jxta.document.; +import net.jxta.endpoint.; import net.jxta.exception.PeerGroupException; import net.jxta.id.ID; import net.jxta.impl.endpoint.tcp.TcpTransport; import net.jxta.impl.pipe.BlockingWireOutputPipe; import net.jxta.peer.PeerID; import net.jxta.peergroup.PeerGroup; -import net.jxta.pipe.InputPipe; -import net.jxta.pipe.OutputPipe; -import net.jxta.pipe.PipeMsgEvent; -import net.jxta.pipe.PipeMsgListener; -import net.jxta.pipe.PipeService; +import net.jxta.pipe.*; import net.jxta.protocol.PipeAdvertisement; import net.jxta.protocol.RouteAdvertisement;
import java.io.IOException; import java.io.Serializable; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashMap; -import java.util.Hashtable; -import java.util.Iterator; -import java.util.List; -import java.util.Map; +import java.util.*; import java.util.concurrent.ConcurrentHashMap; import java.util.logging.Level; import java.util.logging.Logger; @@ -158,8 +140,9 @@ LOG.log(Level.WARNING, ioe.getLocalizedMessage()); } NetworkManagerRegistry.add(groupName, netManager);
if ( props != null )
systemAdv = createSystemAdv(netManager.getNetPeerGroup(), instanceName, identityMap, bindInterfaceAddress); LOG.log(Level.FINER, "Instance ID :" + getSystemAdvertisement().getID()); this.clusterViewManager = new ClusterViewManager(getSystemAdvertisement(), this, viewListeners);
@glassfishrobot Commented Was assigned to sheetalv
@glassfishrobot Commented This issue was imported from java.net JIRA SHOAL-67
@glassfishrobot Commented Marked as fixed on Wednesday, June 23rd 2010, 4:11:06 am
Multiple users have pointed out this NPE. Cause is known and a fix is ready to be checked in. Thanks to David Taylor for the following stack trace : init: deps-jar: compile: run: Jun 27, 2008 2:59:38 PM SimpleGMSSample runSimpleSample INFO: Starting SimpleGMSSample.... Jun 27, 2008 2:59:38 PM SimpleGMSSample initializeGMS INFO: Initializing Shoal for member: server1214603978093 group:Group1 Jun 27, 2008 2:59:38 PM SimpleGMSSample registerForGroupEvents INFO: Registering for group event notifications Jun 27, 2008 2:59:38 PM SimpleGMSSample joinGMSGroup INFO: Joining Group Group1 Exception in thread "main" java.lang.NullPointerException at com.sun.enterprise.jxtamgmt.ClusterManager.(ClusterManager.java:162)
at
com.sun.enterprise.ee.cms.impl.jxta.GroupCommunicationProviderImpl.initializ
eGroupCommunicationProvider(GroupCommunicationProviderImpl.java:138)
at
com.sun.enterprise.ee.cms.impl.jxta.GMSContext.join(GMSContext.java:122)
at
com.sun.enterprise.ee.cms.impl.common.GroupManagementServiceImpl.join(GroupM
anagementServiceImpl.java:331)
at SimpleGMSSample.joinGMSGroup(SimpleGMSSample.java:76)
at SimpleGMSSample.runSimpleSample(SimpleGMSSample.java:46)
at SimpleGMSSample.main(SimpleGMSSample.java:25)
Also, Mike W provided the following stack trace in his email : Also has anyone run the tests lately? GroupLeaderTest fails,
looks as though ClusterManager line 161
è this.bindInterfaceAddress = (String)props.get(JxtaConfigConstants.BIND_INTERFACE_ADDRESS.toString());
requires the BIND_INTERFACE_ADDRESS property to be given or throws null pointer?
--ekiM
Environment
Operating System: All Platform: All
Affected Versions
[current]