Uploaded image for project: 'ServiceMix'
  1. ServiceMix
  2. SM-2129

NullPointerException at org.apache.servicemix.jbi.framework.DeploymentService.start(DeploymentService.java:390)

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.3.2
    • Fix Version/s: 3.4.0
    • Component/s: servicemix-core
    • Labels:
      None
    • Patch Info:
      Patch Available

      Description

      There is NPE exception in DeploymentService during attempt to start, stop or shutdown SAs which are not exist.
      It can be reproduced with Ant tasks or JConsole invoking corresponding method on corresponding MBean.

      Below is example of NPE exception in DeploymentService on start not existing SA and steps to reproduce the issue.

      #> ant -d -f servicemix-ant-task.xml  start-service-assembly -Dsm.service.assembly.name=no-such-sa
      ...
      Caused by: java.lang.NullPointerException
              at org.apache.servicemix.jbi.framework.DeploymentService.start(DeploymentService.java:390)
              at org.apache.servicemix.jbi.framework.AdminCommandsService.startServiceAssembly(AdminCommandsService.java:233)
              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.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:216)
              at org.apache.servicemix.jbi.management.BaseStandardMBean.invoke(BaseStandardMBean.java:323)
              at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836)
              at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761)
              at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1427)
              at javax.management.remote.rmi.RMIConnectionImpl.access$200(RMIConnectionImpl.java:72)
              at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1265)
              at java.security.AccessController.doPrivileged(Native Method)
              at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1367)
              at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:788)
              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 sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:305)
              at sun.rmi.transport.Transport$1.run(Transport.java:159)
              at java.security.AccessController.doPrivileged(Native Method)
              at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
              at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
              at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
              at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
              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:662)
      

        Activity

        Hide
        alexanderz Alexander Zobkov added a comment -

        A patch to fix NPE in start, stop and shutdown methods of DeploymentService class.

        Show
        alexanderz Alexander Zobkov added a comment - A patch to fix NPE in start, stop and shutdown methods of DeploymentService class.
        Hide
        ffang Freeman Fang added a comment -

        Hi Alexander,

        Thanks for the patch.
        Could you please re-attach the patch and select "Grant Apache License" radio button so that we could be able to apply it?

        Freeman

        Show
        ffang Freeman Fang added a comment - Hi Alexander, Thanks for the patch. Could you please re-attach the patch and select "Grant Apache License" radio button so that we could be able to apply it? Freeman
        Hide
        alexanderz Alexander Zobkov added a comment -

        Same patch but now granted to ASF.

        Show
        alexanderz Alexander Zobkov added a comment - Same patch but now granted to ASF.
        Hide
        ffang Freeman Fang added a comment -

        apply patch on behalf of Alexander Zobkov with thanks
        http://svn.apache.org/viewvc?rev=1186746&view=rev

        Show
        ffang Freeman Fang added a comment - apply patch on behalf of Alexander Zobkov with thanks http://svn.apache.org/viewvc?rev=1186746&view=rev

          People

          • Assignee:
            ffang Freeman Fang
            Reporter:
            alexanderz Alexander Zobkov
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development