1 Reply Latest reply on Oct 9, 2007 3:53 PM by BenV

    NullPointerException while joining MUC rooms.

    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

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

                     Internal server error+

      java.lang.NullPointerException

      <span class="hilite">at org.jivesoftware.openfire.muc.spi.LocalMUCRoom.sendInitialPresences(LocalMUCRoo m.java:615)

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

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

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

      <span class="hilite">at org.jivesoftware.openfire.muc.spi.MultiUserChatServerImpl.processPacket(MultiUs erChatServerImpl.java:243)

      <span class="hilite">at org.jivesoftware.openfire.muc.spi.MultiUserChatServerImpl.process(MultiUserChat ServerImpl.java:223)

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

      <span class="hilite">at org.jivesoftware.openfire.PresenceRouter.handle(PresenceRouter.java:159)

      <span class="hilite">at org.jivesoftware.openfire.PresenceRouter.route(PresenceRouter.java:67)

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

      <span class="hilite">at org.jivesoftware.openfire.net.StanzaHandler.processPresence(StanzaHandler.java: 321)

      <span class="hilite">at org.jivesoftware.openfire.net.ClientStanzaHandler.processPresence(ClientStanzaH andler.java:84)

      <span class="hilite">at org.jivesoftware.openfire.net.StanzaHandler.process(StanzaHandler.java:245)

      <span class="hilite">at org.jivesoftware.openfire.net.StanzaHandler.process(StanzaHandler.java:167)

      <span class="hilite">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