NullPointerException while joining MUC rooms.

Discussion created by BenV on Oct 5, 2007
Latest reply on Oct 9, 2007 by BenV

I'm getting a NullPointerException while trying to join MUC rooms while clustering is enabled. I am using the Smack 3.0 API to connect and join a room on the server. I can recreate this every time by following these steps:


  1. Have two machines set up with clustering enabled.

  2. Connect using my tester to one machine (BenDesktop) and join a room (1@conference.benxmpp). The tester is also running on BenDesktop.

  3. Connect using my tester to another machine (BenLaptop) and join a room (1@conference.benxmpp). This tester is running on BenLaptop.


The spark client will time out on the call to MultiUserChat.join() on the second client due to a NullPointerException (causing it to never send a response). When I look in the admin console, I can see that both users have actually joined the room. Here is the stack trace from error.log (I only see this on the second machine to have a client join, in this case BenLaptop):





+<span class="hilite"><span class="date">2007.10.05 10:43:45


               Internal server error+


<span class="hilite">at org.jivesoftware.openfire.muc.spi.LocalMUCRoom.sendInitialPresences(LocalMUCRoo

<span class="hilite">at org.jivesoftware.openfire.muc.spi.LocalMUCRoom.joinRoom(

<span class="hilite">at org.jivesoftware.openfire.muc.spi.LocalMUCUser.process(

<span class="hilite">at org.jivesoftware.openfire.muc.spi.LocalMUCUser.process(

<span class="hilite">at org.jivesoftware.openfire.muc.spi.MultiUserChatServerImpl.processPacket(MultiUs

<span class="hilite">at org.jivesoftware.openfire.muc.spi.MultiUserChatServerImpl.process(MultiUserChat

<span class="hilite">at org.jivesoftware.openfire.spi.RoutingTableImpl.routePacket(RoutingTableImpl.jav a:234)

<span class="hilite">at org.jivesoftware.openfire.PresenceRouter.handle(

<span class="hilite">at org.jivesoftware.openfire.PresenceRouter.route(

<span class="hilite">at org.jivesoftware.openfire.spi.PacketRouterImpl.route(

<span class="hilite">at 321)

<span class="hilite">at

<span class="hilite">at

<span class="hilite">at

<span class="hilite">at org.jivesoftware.openfire.nio.ConnectionHandler.messageReceived(ConnectionHandl

               +     at$TailFilter.messageReceived (

               +     at

               +     at$1100(AbstractIoFilt

               +     at$EntryImpl$1.messageReceive d(

               +     at

               +     at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecF

               +     at

               +     at$1100(AbstractIoFilt

               +     at$EntryImpl$1.messageReceive d(

               +     at org.apache.mina.filter.executor.ExecutorFilter.processEvent( :239)+

               +     at org.apache.mina.filter.executor.ExecutorFilter$

               +     at java.util.concurrent.ThreadPoolExecutor$Worker.runTask( 650)+

               +     at java.util.concurrent.ThreadPoolExecutor$ +

               +     at




I should also add that if I connect using BenLaptop FIRST, then everything seems to work fine. This is a very odd issue, I'll keep working to see if I can figure it out. Any ideas?


Message was edited by: BenV