Discussions

EJB design: java.rmi.UnmarshalException

  1. java.rmi.UnmarshalException (4 messages)

    hello,

    I'm working with ejbs and I got this exception:

    java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
            java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
            java.net.MalformedURLException: no protocol: and
            at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:292)
            at org.objectweb.carol.rmi.jrmp.server.JUnicastServerRef.runDispatch

    (JUnicastServerRef.java:160)
            at org.objectweb.carol.rmi.jrmp.server.JUnicastServerRef.dispatch

    (JUnicastServerRef.java:145)
            at sun.rmi.transport.Transport$1.run(Transport.java:148)
            at java.security.AccessController.doPrivileged(Native Method)
            at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
            at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
            at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
            at java.lang.Thread.run(Thread.java:534)
            at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Unknown Source)
            at org.objectweb.carol.rmi.jrmp.server.JRemoteCall.executeCall(JRemoteCall.java:89)
            at org.objectweb.carol.rmi.jrmp.server.JUnicastRef.invoke(JUnicastRef.java:161)


    the big problem is the following: if I use a method that recieve a parameter of a different class

    than class that belong the java standard classes, the method throws the exception above.

    Nevertheless, if I used a java standard class (like String), my methods don't have problems.

    for example, I have an ejb called BuscadorBean with two different methods:

    The first one


    public Salida buscaSalida(String numeroDocumento){
            Salida s =(Salida)buscaExacto(numeroDocumento, Salida.class, "numeroDocumento");
            return s;
        }

    and the second one

        public String mensaje(mx.com.daysoft.neuron.entidad.Salida s){
            return "Estoy Vivo>>>>>>>>>>>>>>>>>>>>>>>" + s.getCliente().getNombre();
        }

    The first one works perfectly, but the second one throws the exception.

    Please, help me. Thanks

    Threaded Messages (4)

  2. This exception generally occurs when you are de-serializing some object which is not serialized. Check whether your argument classes implement Serializable interface.
  3. thank you...[ Go to top ]

    Abhinav srivastava:
    I can solve the problem... Well, the problem wasn't the interface, the problem was Windows (I hate windows but I need to develop in it). There are spaces in the directory names and as you know, url doesn't allow spaces. Therefore, java takes the directory 'Documents and setting' like:

    url: 'Documents'
    protocol: 'and'

    The solution is to run the client.jar (I'm using a client.jar with JONAS) with another temp directory, something like this:

    java -jar client.jar neuron.ear -tmpDir c:\temp

    Regards

    Luis
  4. Calling ejb from a servlet[ Go to top ]

    Hi there

    Even i am facing problem while making call to EJB from a servlet.
    My tomcat installation is done in a directory having space, and i have to live with it...

    So any suggestions how to over come this problem....
    Any workaround etc available

    Regards
    Beena
  5. Thanks but...[ Go to top ]

    Thanks, I tried implementing the interface Serializable but it doesn't work. Does any have another idea? What about the third line of the exception (malformedurl):

    java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
            java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
            java.net.MalformedURLException: no protocol: and

    Thanks, again.