[jboss-jira] [JBoss JIRA] Created: (JGRP-446) When using an extremely simple protocol stack the app will respond with a NullPointerException.

Anders Persson (JIRA) jira-events at lists.jboss.org
Mon Mar 26 11:15:56 EDT 2007


When using an extremely simple protocol stack the app will respond with a NullPointerException.
-----------------------------------------------------------------------------------------------

                 Key: JGRP-446
                 URL: http://jira.jboss.com/jira/browse/JGRP-446
             Project: JGroups
          Issue Type: Bug
    Affects Versions: 2.4.1 SP1
         Environment: Windows XP
java version "1.5.0_11"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_11-b03)
Java HotSpot(TM) Client VM (build 1.5.0_11-b03, mixed mode)
            Reporter: Anders Persson
         Assigned To: Bela Ban
            Priority: Minor


When using an extremely simple protocol stack the app will respond with a NullPointerException. The communication will however work (at least when running all parties on the same machine). The stack used:

<protocol_stacks>

  <stack name="standard" description="Multicast stack intended for usage on internal highspeed networks.">
    <config>
      <UDP mcast_addr="228.15.15.15"
            mcast_port="45566"/>
      <PING timeout="2000"/>
    </config>
  </stack>

  <stack name="slow" description="Multicast stack intended for usage on external slow connections.">
    <config>
      <UDP mcast_addr="228.15.15.15"
            mcast_port="45567"/>
      <PING timeout="2000"/>
    </config>
  </stack>

</protocol_stacks>

Starting DrawMultiplexer using the stack above will generate the following stack trace

2007-mar-26 16:51:24 org.jgroups.JChannelFactory connect
SEVERE: failed sending SERVICE_UP message
java.lang.NullPointerException
        at org.jgroups.mux.Multiplexer.generateServiceView(Multiplexer.java:953)
        at org.jgroups.mux.Multiplexer.handleServiceUp(Multiplexer.java:781)
        at org.jgroups.mux.Multiplexer.sendServiceUpMessage(Multiplexer.java:224)
        at org.jgroups.JChannelFactory.connect(JChannelFactory.java:372)
        at org.jgroups.mux.MuxChannel.connect(MuxChannel.java:126)
        at org.jgroups.demos.DrawMultiplexer.start(DrawMultiplexer.java:44)
        at org.jgroups.demos.DrawMultiplexer.main(DrawMultiplexer.java:29)


I traced the "problem" to be the lack of a pbcast.GMS entry. (You can try it by removing that entry in the conf/stacks.xml file in your distribution.)

Some additional information:
In order to get DrawMultiplexer to "communicate" you will have to start two instances using the stack above. Then press "leave" in the window that pops up as a result of the FIRST instance started. (Don't know the inner workings of the DrawMultiplexer app, I don't have to resort to these kinds of actions to get my own app to communicate.)
The reason I would like to see this fixed is that I don't want to have NullPointerExceptions in the log file when deploying this at the customer.
The reason for my very simple protocol is that we intend to use JGroups in a configuration where one server pumps out data in a stream to a varying number of clients and we don't care if the data was received correctly or not since the stream of data is repeated every six seconds.

-- 
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