1 Reply Latest reply on Jun 26, 2003 12:47 AM by duckdodgers

    Standalone AOP with RMI

    duckdodgers

      I'm using the standalone AOP framework on the client and not using it on the RMI server end. I'm passing an instrumented POJO to an RMI method that changes some data in the POJO and returns it back. It gets to the RMI server fine, I can read the data, change it, etc. When I return it back to the client, however, the client can't read back any properties or anything, it throws a NullPointerException. Here's a couple snippets:

      [Client side]
      myObj = remote.doSomething(myObj);
      System.out.print(myObj.getName()); // <-- null pointer here inside .getName at unknown line, myObj is not null
      System.out.print(":");
      System.out.println(myObj.getCounter());
      [/Client side]

      [Server side]
      public MyObj doSomething(MyObj obj) throws RemoteException {
      int i = obj.getCounter();
      obj.setCounter(++i);
      return obj;
      }
      [/Server side]

      Any ideas on what I'm doing wrong here?