NullPointerException while joining MUC rooms

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

+2007.10.05 10:43:45

org.jivesoftware.openfire.muc.spi.MultiUserChatServerImpl.processPacket(MultiUse rChatServerImpl.java:246)

Internal server error+

java.lang.NullPointerException

at org.jivesoftware.openfire.muc.spi.LocalMUCRoom.sendInitialPresences(LocalMUCRoo m.java:615)

at org.jivesoftware.openfire.muc.spi.LocalMUCRoom.joinRoom(LocalMUCRoom.java:529)

at org.jivesoftware.openfire.muc.spi.LocalMUCUser.process(LocalMUCUser.java:442)

at org.jivesoftware.openfire.muc.spi.LocalMUCUser.process(LocalMUCUser.java:163)

at org.jivesoftware.openfire.muc.spi.MultiUserChatServerImpl.processPacket(MultiUs erChatServerImpl.java:243)

at org.jivesoftware.openfire.muc.spi.MultiUserChatServerImpl.process(MultiUserChat ServerImpl.java:223)

at org.jivesoftware.openfire.spi.RoutingTableImpl.routePacket(RoutingTableImpl.jav a:234)

at org.jivesoftware.openfire.PresenceRouter.handle(PresenceRouter.java:159)

at org.jivesoftware.openfire.PresenceRouter.route(PresenceRouter.java:67)

at org.jivesoftware.openfire.spi.PacketRouterImpl.route(PacketRouterImpl.java:75)

at org.jivesoftware.openfire.net.StanzaHandler.processPresence(StanzaHandler.java: 321)

at org.jivesoftware.openfire.net.ClientStanzaHandler.processPresence(ClientStanzaH andler.java:84)

at org.jivesoftware.openfire.net.StanzaHandler.process(StanzaHandler.java:245)

at org.jivesoftware.openfire.net.StanzaHandler.process(StanzaHandler.java:167)

at org.jivesoftware.openfire.nio.ConnectionHandler.messageReceived(ConnectionHandl er.java:132)

  • at org.apache.mina.common.support.AbstractIoFilterChain$TailFilter.messageReceived (AbstractIoFilterChain.java:570)+
    
  • at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(Ab stractIoFilterChain.java:299)+
    
  • at org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilt erChain.java:53)+
    
  • at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceive d(AbstractIoFilterChain.java:648)+
    
  • at org.apache.mina.filter.codec.support.SimpleProtocolDecoderOutput.flush(SimplePr otocolDecoderOutput.java:58)+
    
  • at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecF ilter.java:176)+
    
  • at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(Ab stractIoFilterChain.java:299)+
    
  • at org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilt erChain.java:53)+
    
  • at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceive d(AbstractIoFilterChain.java:648)+
    
  • at org.apache.mina.filter.executor.ExecutorFilter.processEvent(ExecutorFilter.java :239)+
    
  • at org.apache.mina.filter.executor.ExecutorFilter$ProcessEventsRunnable.run(Execut orFilter.java:283)+
    
  • at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java: 650)+
    
  • at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675) +
    
  • at java.lang.Thread.run(Thread.java:613)+
    

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

Any ideas on this one?