1 Reply Latest reply on Oct 7, 2002 4:29 PM by Adrian Brock

    mbean invoke getting ReflectionException

    garyg Novice

      I have a session bean calling invoke on a method in my mbean service that's getting a ReflectionException. If I leave Object[] and String[] as null, the call works fine. I've taken notes from a few archived posts about this, but to no success.

      --- snip session bean code

      public void scheduleTask(FieldObj fInfo) throws RemoteException {
      ...
      List lServers = MBeanServerFactory.findMBeanServer(null);

      MBeanServer lServer = (MBeanServer) lServers.get(0);

      ObjectName name = new ObjectName("DefaultDomain:service=Scheduler");

      Object[] args = { fInfo };
      String[] sig = { FieldObj.class.toString() };

      lServer.invoke(name, "scheduleJob", args, sig);
      ...

      --- ServiceMBeanSupport

      public void scheduleJob() throws Exception {
      log.debug(Scheduler.class, "calling scheduleJob()");

      return;
      }

      public void scheduleJob(FieldObj obj) throws Exception {
      log.debug(Scheduler.class, "calling scheduleJob(obj)");

      return;
      }

      --- ServiceMBean interface

      public void scheduleJob() throws Exception;
      public void scheduleJob(FieldObj obj) throws Exception;


      Any help much appreciated