jsip
  1. jsip
  2. JSIP-392

IllegalStateException caused by NullPointerException

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: current
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      JAIN-SIP rev1962
      Mobicents SIP Servlets 1.6-SNAPSHOT, rev18708

      Seen in logs:

      java.lang.IllegalStateException

      at org.mobicents.servlet.sip.message.SipServletResponseImpl.send(SipServletResponseImpl.java:647)
      at org.mobicents.servlet.sip.message.SipServletResponseImpl.send(SipServletResponseImpl.java:458)
      ....
      at javax.servlet.sip.SipServlet.service(SipServlet.java:332)
      ....
      at org.mobicents.servlet.sip.core.dispatchers.MessageDispatcher.callServlet(MessageDispatcher.java:248)
      at org.mobicents.servlet.sip.core.dispatchers.SubsequentRequestDispatcher$SubsequentDispatchTask.dispatch(SubsequentRequestDispatcher.java:501)
      at org.mobicents.servlet.sip.core.dispatchers.DispatchTask.dispatchAndHandleExceptions(DispatchTask.java:60)
      at org.mobicents.servlet.sip.core.dispatchers.SubsequentRequestDispatcher.dispatchMessage(SubsequentRequestDispatcher.java:313)
      at org.mobicents.servlet.sip.core.SipApplicationDispatcherImpl.processRequest(SipApplicationDispatcherImpl.java:706)
      at gov.nist.javax.sip.EventScanner.deliverEvent(EventScanner.java:230)
      at gov.nist.javax.sip.SipProviderImpl.handleEvent(SipProviderImpl.java:196)
      at gov.nist.javax.sip.DialogFilter.processRequest(DialogFilter.java:1298)
      at gov.nist.javax.sip.stack.SIPServerTransaction.processRequest(SIPServerTransaction.java:863)
      at gov.nist.javax.sip.stack.TLSMessageChannel.processMessage(TLSMessageChannel.java:799)
      at gov.nist.javax.sip.parser.PipelinedMsgParser$Dispatch.run(PipelinedMsgParser.java:285)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      at java.lang.Thread.run(Thread.java:619)
      Caused by: java.lang.NullPointerException
      at java.util.concurrent.ConcurrentHashMap.put(ConcurrentHashMap.java:881)
      at gov.nist.javax.sip.stack.IOHandler.putSocket(IOHandler.java:106)
      at gov.nist.javax.sip.stack.IOHandler.sendBytes(IOHandler.java:593)
      at gov.nist.javax.sip.stack.TLSMessageChannel.sendMessage(TLSMessageChannel.java:341)
      at gov.nist.javax.sip.stack.TLSMessageChannel.sendMessage(TLSMessageChannel.java:432)
      at gov.nist.javax.sip.stack.SIPServerTransaction.sendResponse(SIPServerTransaction.java:469)
      at gov.nist.javax.sip.stack.SIPServerTransaction.sendMessage(SIPServerTransaction.java:975)
      at gov.nist.javax.sip.stack.SIPServerTransaction.sendResponse(SIPServerTransaction.java:1553)
      at org.mobicents.servlet.sip.message.SipServletResponseImpl.send(SipServletResponseImpl.java:628)
      ... 24 more

      Indeed, there is a conflict between using ConcurrentHashMap implementation and code like

      if (clientSock == null) {
      .....
      putSocket(key, clientSock);

      with attempt to put null value to ConcurrentHashMap.

      Please find proposed patch in attachments

      Reported to Mobicents as http://code.google.com/p/mobicents/issues/detail?id=2811

      1. npe.patch
        0.7 kB
        Alex Saveliev

        Activity

        Hide
        deruelle_jean added a comment -

        Patch committed in revision jsip~svn:1981

        Thanks !

        Show
        deruelle_jean added a comment - Patch committed in revision jsip~svn:1981 Thanks !

          People

          • Assignee:
            Unassigned
            Reporter:
            Alex Saveliev
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: