1 Reply Latest reply on Oct 13, 2002 8:37 AM by juha

    Invoke creates NullPointerExceprion

    jjanke

      The MBean method is:
      --
      public RowSet getRowSet (String sql_RO);
      --
      which I call via
      --
      RowSet rowSet = (RowSet) m_server.invoke
      (serverName, "getRowSet",
      new Object[]{sql}, new String[]{"java.lang.String"});
      --
      resulting in
      --
      RuntimeMBeanException: RuntimeException in MBean operation 'getRowSet(,java.lang.String)'
      Cause: java.lang.NullPointerException
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:299)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
      at org.jboss.jmx.adaptor.rmi.RMIAdaptorImpl.invoke(RMIAdaptorImpl.java:283)
      --
      using 3.0.3
      ====
      Looking at the code in MBeanServerImpl:
      509: DynamicMBean mbean = entry.getMBean();
      517: return mbean.invoke(operationName, params, signature);
      - It breaks in 517, the likely cause is in 509 returning null.
      - the variable mbean is not checked for null
      - the signature is a bit odd with (,java.lang.String) ??

      Other methods - with multiple parameters, but returning String work fine. The first time, I got it working, retrieving the RowSet on the server correctly - but well, it dow does not.

      -> any clues ??
      -> how would I debug this?