Uploaded image for project: 'ServiceMix Components'
  1. ServiceMix Components
  2. SMXCOMP-149

Null pointer exception if publisher reference not specified properly

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • 2013.02
    • servicemix-wsn2005
    • None

    Description

      Using the WSN-HTTP-Binding example, and sending in a RegisterPublisher message to ServiceMix without a valid PublisherReference results in this stack trace (and a null pointer exception returned to the publisher):

      [Fatal Error] :-1:-1: Premature end of file.
      ERROR - WSNComponent - Error processing exchange InOut[
      id: ID:MELBA-2288-1173131624682-2:0
      status: Active
      role: provider
      service:

      {http://servicemix.org/wsnotification}

      NotificationBroker
      endpoint: Broker
      in: Unable to display: org.xml.sax.SAXParseException: Premature end of file.
      ]
      java.lang.NullPointerException
      at org.apache.servicemix.wsn.jbi.JbiPublisher.validatePublisher(JbiPublisher.java:87)
      at org.apache.servicemix.wsn.AbstractPublisher.create(AbstractPublisher.java:90)
      at org.apache.servicemix.wsn.AbstractNotificationBroker.handleRegisterPublisher(AbstractNotificationBroker.java:253)
      at org.apache.servicemix.wsn.AbstractNotificationBroker.registerPublisher(AbstractNotificationBroker.java:234)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.apache.servicemix.wsn.component.WSNEndpoint.process(WSNEndpoint.java:137)
      at org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:489)
      at org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:441)
      at org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:46)
      at org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:593)
      at org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:174)
      at org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:176)
      at org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134)
      at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665)
      at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690)
      at java.lang.Thread.run(Thread.java:619)
      WARN - jetty - EXCEPTION
      javax.servlet.ServletException: Failed to process request: java.lang.Exception: java.lang.NullPointerException
      at org.apache.servicemix.http.HttpBridgeServlet.doPost(HttpBridgeServlet.java:79)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
      at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:445)
      at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:356)
      at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:627)
      at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:149)
      at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:123)
      at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:141)
      at org.mortbay.jetty.Server.handle(Server.java:269)
      at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:430)
      at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:333)
      at org.mortbay.jetty.nio.HttpChannelEndPoint.run(HttpChannelEndPoint.java:270)
      at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:475)
      WARN - jetty - Nested in javax.servlet.ServletException: Failed to process request: java.lang.Exception: java.lang.NullPointerException:
      java.lang.Exception: java.lang.NullPointerException
      at org.apache.servicemix.http.processors.ConsumerProcessor.process(ConsumerProcessor.java:214)
      at org.apache.servicemix.http.HttpBridgeServlet.doPost(HttpBridgeServlet.java:71)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
      at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:445)
      at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:356)
      at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:627)
      at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:149)
      at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:123)
      at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:141)
      at org.mortbay.jetty.Server.handle(Server.java:269)
      at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:430)
      at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:333)
      at org.mortbay.jetty.nio.HttpChannelEndPoint.run(HttpChannelEndPoint.java:270)
      at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:475)
      Caused by: java.lang.NullPointerException
      at org.apache.servicemix.wsn.jbi.JbiPublisher.validatePublisher(JbiPublisher.java:87)
      at org.apache.servicemix.wsn.AbstractPublisher.create(AbstractPublisher.java:90)
      at org.apache.servicemix.wsn.AbstractNotificationBroker.handleRegisterPublisher(AbstractNotificationBroker.java:253)
      at org.apache.servicemix.wsn.AbstractNotificationBroker.registerPublisher(AbstractNotificationBroker.java:234)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.apache.servicemix.wsn.component.WSNEndpoint.process(WSNEndpoint.java:137)
      at org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:489)
      at org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:441)
      at org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:46)
      at org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:593)
      at org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:174)
      at org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:176)
      at org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134)
      at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665)
      at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690)
      at java.lang.Thread.run(Thread.java:619)
      WARN - jetty - /Broker/:
      java.lang.Exception: java.lang.NullPointerException
      at org.apache.servicemix.http.processors.ConsumerProcessor.process(ConsumerProcessor.java:214)
      at org.apache.servicemix.http.HttpBridgeServlet.doPost(HttpBridgeServlet.java:71)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
      at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:445)
      at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:356)
      at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:627)
      at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:149)
      at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:123)
      at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:141)
      at org.mortbay.jetty.Server.handle(Server.java:269)
      at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:430)
      at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:333)
      at org.mortbay.jetty.nio.HttpChannelEndPoint.run(HttpChannelEndPoint.java:270)
      at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:475)
      Caused by: java.lang.NullPointerException
      at org.apache.servicemix.wsn.jbi.JbiPublisher.validatePublisher(JbiPublisher.java:87)
      at org.apache.servicemix.wsn.AbstractPublisher.create(AbstractPublisher.java:90)
      at org.apache.servicemix.wsn.AbstractNotificationBroker.handleRegisterPublisher(AbstractNotificationBroker.java:253)
      at org.apache.servicemix.wsn.AbstractNotificationBroker.registerPublisher(AbstractNotificationBroker.java:234)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.apache.servicemix.wsn.component.WSNEndpoint.process(WSNEndpoint.java:137)
      at org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:489)
      at org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:441)
      at org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:46)
      at org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:593)
      at org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:174)
      at org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:176)
      at org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134)
      at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665)
      at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690)
      at java.lang.Thread.run(Thread.java:619)
      WARN - jetty - /Broker/
      java.lang.Exception: java.lang.NullPointerException
      at org.apache.servicemix.http.processors.ConsumerProcessor.process(ConsumerProcessor.java:214)
      at org.apache.servicemix.http.HttpBridgeServlet.doPost(HttpBridgeServlet.java:71)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
      at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:445)
      at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:356)
      at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:627)
      at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:149)
      at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:123)
      at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:141)
      at org.mortbay.jetty.Server.handle(Server.java:269)
      at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:430)
      at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:333)
      at org.mortbay.jetty.nio.HttpChannelEndPoint.run(HttpChannelEndPoint.java:270)
      at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:475)
      Caused by: java.lang.NullPointerException
      at org.apache.servicemix.wsn.jbi.JbiPublisher.validatePublisher(JbiPublisher.java:87)
      at org.apache.servicemix.wsn.AbstractPublisher.create(AbstractPublisher.java:90)
      at org.apache.servicemix.wsn.AbstractNotificationBroker.handleRegisterPublisher(AbstractNotificationBroker.java:253)
      at org.apache.servicemix.wsn.AbstractNotificationBroker.registerPublisher(AbstractNotificationBroker.java:234)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.apache.servicemix.wsn.component.WSNEndpoint.process(WSNEndpoint.java:137)
      at org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:489)
      at org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:441)
      at org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:46)
      at org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:593)
      at org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:174)
      at org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:176)
      at org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134)
      at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665)
      at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690)
      at java.lang.Thread.run(Thread.java:619)

      Attachments

        Activity

          People

            Unassigned Unassigned
            chilson Jeremy Clark
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: