2 Replies Latest reply: Aug 31, 2010 1:54 PM by 843793 RSS

    Cajo - problem returning objects

    843793
      Hello,
      I'm using Cajo Api and fall into a problem. When returning a bigger stuff I get:

      java.lang.ArrayIndexOutOfBoundsException: 0
           at gnu.cajo.utils.extra.TransparentItemProxy.getItem(Unknown Source)
           at gnu.cajo.invoke.Remote.invoke(Unknown Source)
           at gnu.cajo.invoke.Remote.invoke(Unknown Source)
           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:619)
           at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:255)
           at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:233)
           at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:142)
           at gnu.cajo.invoke.Remote_Stub.invoke(Unknown Source)
           at gnu.cajo.invoke.Remote.invoke(Unknown Source)
           at gnu.cajo.utils.extra.TransparentItemProxy.invoke(Unknown Source)
           at $Proxy1.getDescription(Unknown Source)
           at cjt.metaprocess.ClentRunner$1.run(ClentRunner.java:22)

      On the client side.

      On the server side no exception as object returned by method.

      When intentionally returning some thing simple like null or String it works ok.

      What seems to be the problem? Serialization or what?
        • 1. Re: Cajo - problem returning objects
          843793
          Maybe asking the people who made Cajo would help more.

          We can't generally give support for third-party libraries. You might get lucky for some of the well-known ones, but you shouldn't depend on it.
          • 2. Re: Cajo - problem returning objects
            843793
            This appears to be neither a cajo nor RMI problem.

            Since you are getting an ArrayIndexOutOfBoundsException, particularly at index 0, it seems your client is expecting an array to be returned, but one is not.

            Best wishes in your debugging, please feel free to post any additional information to this thread.

            John Catherino
            Project Lead
            [The cajo project|https://cajo.dev.java.net]