RemoteException: java.rmi.UnmarshalException in jdk 1.4.2

i'm implementing an RMI over the jdk 1.4.2 (can't do it in the 1.5 or 1.6) i've seen this topic [http://forum.java.sun.com/thread.jspa?threadID=370196&messageID=1808449] but it didn't help me, or i'm doing something wrong...
i know the RMI code is ok because it runs on java 1.6 (with the automatic generation of stubs and skeletons) but when i change the platform to 1.4 it throws the exception:
RemoteException: java.rmi.UnmarshalException: error unmarshalling return; nested exception is:
java.lang.ClassNotFoundException: servidor.MensageiroImpl_Stub
the VM is configured to use the -Djava.security.policy=C:\Projecto\Policy\permissions.policy both in the client and server
please help me :S i've been burning my head with this for 3 days
i leave my code here:
The interface:
package rmiinterface;
import java.rmi.Remote;
import java.rmi.RemoteException;
public interface Mensageiro extends Remote {
    public void sendMsg(String msg) throws RemoteException;
    public String readMsg() throws RemoteException;
}the implementation:
package servidor;
import rmiinterface.Mensageiro;
import java.rmi.RemoteException;
import java.rmi.server.UnicastRemoteObject;
public class MensageiroImpl extends UnicastRemoteObject implements Mensageiro {
    public MensageiroImpl() throws RemoteException {
        super();
    public void sendMsg(String msg) throws RemoteException {
        System.out.println(msg);
    public String readMsg() throws RemoteException {
        return "This is not a Hello World! message";
}the server:
package servidor;
import rmiinterface.Mensageiro;
import java.rmi.Naming;
import java.rmi.RMISecurityManager;
public class MensageiroServer {
    public MensageiroServer() {
        System.setSecurityManager(new RMISecurityManager());
        try {
            Mensageiro m = new MensageiroImpl();
            java.rmi.registry.LocateRegistry.createRegistry(1099);
            System.out.println("RMI registry successfully initiated");
            Naming.rebind("MensageiroService", m);
            System.out.println("Servidor Online");
        } catch (Exception e) {
            System.out.println("Trouble: " + e.getMessage());
    public static void main(String[] args) {
        new MensageiroServer();
}and the client:
package cliente;
import rmiinterface.Mensageiro;
import java.rmi.RMISecurityManager;
import java.rmi.Naming;
import java.rmi.RemoteException;
import java.rmi.NotBoundException;
import java.net.MalformedURLException;
public class MensageiroClient {
    public MensageiroClient() {
    public static void main(String args[]) {
        System.setSecurityManager(new RMISecurityManager());
        try {
            Mensageiro m = (Mensageiro) Naming.lookup("//localhost/MensageiroService");
            System.out.println(m.readMsg());
            m.sendMsg("Hello World!");
        } catch (MalformedURLException e) {
            System.out.println();
            System.out.println("MalformedURLException: " + e.toString());
        } catch (RemoteException e) {
            System.out.println();
            System.out.println("RemoteException: " + e.toString());
        } catch (NotBoundException e) {
            System.out.println();
            System.out.println("NotBoundException: " + e.toString());
        } catch (Exception e) {
            System.out.println();
            System.out.println("Exception: " + e.toString());
}NOTE: my IDE is Netbeans 6.1. and the client and server are in diffrent projects
thanks in advance
Best Regards,
Carlos Daniel Ribeiro

the stub and the skeleton are being generated, and they are there, in the server project! i don't know why the class defs for the stub filearen't downloded by the client project...I don't know why you think they will be downloaded. They won't be, unless you're using the codebase feature. The client needs the remote interface and the stub on its classpath, and all classes that the remote interface depends on, and so on recursively until closure. You have to do something about that.
It works under 1.6 because it doesn't need the stub at all.

Similar Messages

  • RemoteException,java.rmi.UnmarshalException,java.lang.ClassNotFoundExceptio

    i used the rmi tutorial from the java site.
    i did exactly what written there !
    i operate the java with
    java Djava.rmi.server.codebase=
    file:/c:\tmp\engine.ComputEngine_Stub/
    -Djava.rmi.server.hostname=my host name
    -Djava.security.policy=java.policy engine.ComputeEngine
    i even write classpath = c:\tmp\engine;c:\tmp
    ******** this is the exception ***********
    C:\tmp>java -Djava.rmi.server.codebase=file:/c:\tmp\engine.ComputeEngine_Stub -D
    java.rmi.server.hostname=TRLAN_BPR -Djava.security.policy=java.policy engine.Com
    puteEngine
    ComputeEngine exception: RemoteException occurred in server thread; nested excep
    tion is:
    java.rmi.UnmarshalException: error unmarshalling arguments; nested excep
    tion is:
    java.lang.ClassNotFoundException: engine.ComputeEngine_Stub
    java.rmi.ServerException: RemoteException occurred in server thread; nested exce
    ption is:
    java.rmi.UnmarshalException: error unmarshalling arguments; nested excep
    tion is:
    java.lang.ClassNotFoundException: engine.ComputeEngine_Stub
    java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
    java.lang.ClassNotFoundException: engine.ComputeEngine_Stub
    java.lang.ClassNotFoundException: engine.ComputeEngine_Stub
    at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Stream
    RemoteCall.java:249)
    at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:
    224)
    at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:358)
    at sun.rmi.registry.RegistryImpl_Stub.rebind(Unknown Source)
    at java.rmi.Naming.rebind(Naming.java:165)
    at engine.ComputeEngine.main(ComputeEngine.java:25)
    what can i try now ?
    did i forget anything ?

    ok solve it .
    run rmiregistry (don't forget to specify in the classpath
    the _stub file directory )!!!!!!!!!!

  • Java.rmi.UnmarshalException: skeleton class not found but required for clie

    Hello everyone,
    I am new to RMI and getting a strange exception. I am using Java 1.5.0_07 both on client and server. They are running on the same machine, the rmi registry is started inside the server application.
    I am wondering why java complains about skeletons, I thought they are automatically created when using java 5.0?
    Please have a look at the stacktrace below.
    Thank you for your help.
    Best Regards
    Patric
    java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
         java.rmi.UnmarshalException: error unmarshalling call header; nested exception is:
         java.rmi.UnmarshalException: skeleton class not found but required for client version
         sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:325)
         sun.rmi.transport.Transport$1.run(Transport.java:153)
         java.security.AccessController.doPrivileged(Native Method)
         sun.rmi.transport.Transport.serviceCall(Transport.java:149)
         sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:466)
         sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:707)
         java.lang.Thread.run(Thread.java:595)
         sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247)
         sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)
         sun.rmi.server.UnicastRef.invoke(UnicastRef.java:343)
         sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
         java.rmi.Naming.lookup(Naming.java:84)
         org.apache.jsp.index_jsp._jspService(index_jsp.java:58)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

    The full class path information that I can gather is as follows (some of the library path locations could be suspect...):
    Class path: /edge/node3/hotfix::/edge/node3/current/lib/JMdsApi.jar:/edge/node3/current/lib/MemoryProfilingAgent.jar:/edge/node3/current/lib/T2common-2.6.0-SNAPSHOT.3200.jar:/edge/node3/current/lib/T2scripting-jython.jar:/edge/node3/current/lib/activation.jar:/edge/node3/current/lib/alib.jar:/edge/node3/current/lib/alibom.jar:/edge/node3/current/lib/ant.jar:/edge/node3/current/lib/authapi.jar:/edge/node3/current/lib/bbdlapi.jar:/edge/node3/current/lib/bcpg-jdk15-136.jar:/edge/node3/current/lib/bcprov-jdk15-136.jar:/edge/node3/current/lib/c3p0-0.9.1.2.jar:/edge/node3/current/lib/castor-1.1-codegen-anttask.jar:/edge/node3/current/lib/castor-1.1-codegen.jar:/edge/node3/current/lib/castor-1.1-xml.jar:/edge/node3/current/lib/castor-1.1.jar:/edge/node3/current/lib/colt-1.2.0.jar:/edge/node3/current/lib/common-annotations.jar:/edge/node3/current/lib/commons-beanutils.jar:/edge/node3/current/lib/commons-codec-1.3.jar:/edge/node3/current/lib/commons-collections-3.2.1.jar:/edge/node3/current/lib/commons-jexl-1.1.jar:/edge/node3/current/lib/commons-lang-2.3.jar:/edge/node3/current/lib/commons-logging-1.1.1.jar:/edge/node3/current/lib/commons-net-1.4.1.jar:/edge/node3/current/lib/dsn.jar:/edge/node3/current/lib/eagleapi.jar:/edge/node3/current/lib/ezmorph-1.0.3.jar:/edge/node3/current/lib/f2-loader-1.8.jar:/edge/node3/current/lib/fasttrade-boviewer-1.0.1.jar:/edge/node3/current/lib/hsqldb.jar:/edge/node3/current/lib/icu4j-3.4.4.jar:/edge/node3/current/lib/ivy.jar:/edge/node3/current/lib/janino.jar:/edge/node3/current/lib/janus-sdk-1.7.0.0.jar:/edge/node3/current/lib/jasypt-1.4.1.jar:/edge/node3/current/lib/javolution.jar:/edge/node3/current/lib/jcalendar-1.3.2.jar:/edge/node3/current/lib/jcl-over-slf4j-1.5.6.jar:/edge/node3/current/lib/jcommon-1.0.9.jar:/edge/node3/current/lib/jconn2.jar:/edge/node3/current/lib/jconn3-6.05-b26214.jar:/edge/node3/current/lib/jdom.jar:/edge/node3/current/lib/jfreechart-1.0.5.jar:/edge/node3/current/lib/jgroups-all.jar:/edge/node3/current/lib/jline.jar:/edge/node3/current/lib/jmkv123p1.jar:/edge/node3/current/lib/jna.jar:/edge/node3/current/lib/joda-time-1.5.2.jar:/edge/node3/current/lib/jscience.jar:/edge/node3/current/lib/json-lib-2.2.1-jdk15.jar:/edge/node3/current/lib/jul-to-slf4j-1.5.6.jar:/edge/node3/current/lib/junit.jar:/edge/node3/current/lib/jython.jar:/edge/node3/current/lib/log4j-1.2.15.jar:/edge/node3/current/lib/log4j-over-slf4j-1.5.6.jar:/edge/node3/current/lib/loggablePreparedStatement-1.6.jar:/edge/node3/current/lib/looks-2.1.4.jar:/edge/node3/current/lib/mailapi.jar:/edge/node3/current/lib/model-12021.jar:/edge/node3/current/lib/mysql-connector-java-5.1.7-bin.jar:/edge/node3/current/lib/opencsv-1.8.jar:/edge/node3/current/lib/rfa.jar:/edge/node3/current/lib/rspcore.jar:/edge/node3/current/lib/slf4j-api-1.5.6.jar:/edge/node3/current/lib/slf4j-log4j12-1.5.6.jar:/edge/node3/current/lib/smtp.jar:/edge/node3/current/lib/smtphandler-0.6.jar:/edge/node3/current/lib/spring-2.5.2.jar:/edge/node3/current/lib/statsvn.jar:/edge/node3/current/lib/swingx-0.9.3.jar:/edge/node3/current/lib/t2-12021.jar:/edge/node3/current/lib/testng-5.9-jdk15.jar:/edge/node3/current/lib/tibmsg.jar:/edge/node3/current/lib/tibrvj.jar:/edge/node3/current/lib/trove.jar:/edge/node3/current/lib/velocity-tools.jar:/edge/node3/current/lib/velocity.jar:/edge/node3/current/lib/xalan.jar:/edge/node3/current/lib/xerces.jar:/edge/node3/current/lib/patng/activeio-core-3.0.0-incubator.jar:/edge/node3/current/lib/patng/activemq-core-4.1.1.jar:/edge/node3/current/lib/patng/avalon-framework-4.1.3.jar:/edge/node3/current/lib/patng/backport-util-concurrent-2.2.jar:/edge/node3/current/lib/patng/binding-1.4.0.jar:/edge/node3/current/lib/patng/cglib-nodep-2.1_3.jar:/edge/node3/current/lib/patng/common-1.30.jar:/edge/node3/current/lib/patng/commons-cli-1.0.jar:/edge/node3/current/lib/patng/commons-configuration-1.2.jar:/edge/node3/current/lib/patng/commons-discovery-0.2.jar:/edge/node3/current/lib/patng/commons-math-1.1.jar:/edge/node3/current/lib/patng/concurrent-1.3.4.jar:/edge/node3/current/lib/patng/geronimo-j2ee-management_1.0_spec-1.0.jar:/edge/node3/current/lib/patng/geronimo-jms_1.1_spec-1.0.jar:/edge/node3/current/lib/patng/logkit-1.0.1.jar:/edge/node3/current/lib/patng/mina-core-1.0.1.jar:/edge/node3/current/lib/patng/mina-filter-ssl-1.0.1.jar:/edge/node3/current/lib/patng/mina-java5-1.0.1.jar:/edge/node3/current/lib/patng/mx4j-remote-3.0.1.jar:/edge/node3/current/lib/patng/mx4j-tools-3.0.1.jar:/edge/node3/current/lib/patng/org.apache.felix.framework-1.0.0.jar:/edge/node3/current/lib/patng/org.osgi.core-1.0.0.jar:/edge/node3/current/lib/patng/pat-dt-common-1.18.jar:/edge/node3/current/lib/patng/pat-sdt-1.18.jar:/edge/node3/current/lib/patng/patNg-api-1.27.1.jar:/edge/node3/current/lib/patng/patNg-server-aoc-1.21.jar:/edge/node3/current/lib/patng/patNg-server-common-1.21.jar:/edge/node3/current/lib/patng/patNg-server-session-manager-1.21.jar:/edge/node3/current/lib/patng/patNg-utils-1.27.1.jar:/edge/node3/current/lib/patng/qpid-broker-2.2.2.0.jar:/edge/node3/current/lib/patng/qpid-client-2.2.2.0.jar:/edge/node3/current/lib/patng/qpid-common-2.2.2.0.jar:/edge/node3/current/lib/patng/qpid-mina-core-2.2.2.0.jar:/edge/node3/current/lib/patng/rsee-2.11.jar:/edge/node3/current/lib/patng/servlet-api-2.3.jar:/edge/node3/current/lib/patng/silk-1.3.jar:/edge/node3/current/lib/patng/slf4j-api-1.4.0.jar:/edge/node3/current/lib/patng/slf4j-log4j12-1.4.0.jar:/edge/node3/current/lib/patng/validation-1.2.0.jar
    Boot class path: /apps/jdk/1.6.0_13/linux/jre/lib/resources.jar:/apps/jdk/1.6.0_13/linux/jre/lib/rt.jar:/apps/jdk/1.6.0_13/linux/jre/lib/sunrsasign.jar:/apps/jdk/1.6.0_13/linux/jre/lib/jsse.jar:/apps/jdk/1.6.0_13/linux/jre/lib/jce.jar:/apps/jdk/1.6.0_13/linux/jre/lib/charsets.jar:/apps/jdk/1.6.0_13/linux/jre/classes:/tmp/yjp200811122006.jar
    Library path: /apps/jdk/1.6.0_13/linux/jre/lib/i386/server:/apps/jdk/1.6.0_13/linux/jre/lib/i386:/apps/jdk/1.6.0_13/linux/jre/../lib/i386::/edge/node3/current/lib:/home/eqdev/eqedgeuat/yourkit_7_5_11/yjp-7.5.11/bin/linux-x86-32:/edge/node3/current/lib:/home/eqdev/eqedgeuat/yourkit_7_5_11/yjp-7.5.11/bin/linux-x86-32:/usr/java/packages/lib/i386:/lib:/usr/lib

  • New @ RMI need help with  java.rmi.UnmarshalException: error unmarshalling

    Hi @ all out there,
    I'm new with Java RMI and have to write a EventSystem for an college project where clients can subscribe to a topic and get notified when someone publishes a message to the subscribed topic.
    At server-side I have a class called EventSystem that provides methods for subscribing and unsubscribing from topics, and also for posting messages (for publishers).
    To subscribe i thought that the client must specify the topic and also itself ( means that a client calls in this way: obj.subscribe("mytopic", this).
    The EventSystem handles a list of all clients, and whenever a new message is posted it goes trough all clients and invokes the handleMessage(String msg) method that all Clients have to provide.
    On my local machine without RMi this concept works just great.
    I now tried to get it working using RMI , but I get the following Exception when starting the client (the server starts fine) :
    Looking up for rmiregistry at 138.232.248.22:1099
    Subscriber exception:
    java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
            java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
            java.io.InvalidClassException: SubscriberImpl; SubscriberImpl; class invalid for deserialization
            at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:336)
            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:885)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
            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 java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(RemoteObjectInvocationHandler.java:178)
            at java.rmi.server.RemoteObjectInvocationHandler.invoke(RemoteObjectInvocationHandler.java:132)
            at $Proxy0.subscribe(Unknown Source)
            at SubscriberImpl.main(SubscriberImpl.java:48)
    Caused by: java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
            java.io.InvalidClassException: SubscriberImpl; SubscriberImpl; class invalid for deserialization
            at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:293)
            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:885)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
            at java.lang.Thread.run(Thread.java:619)
    Caused by: java.io.InvalidClassException: SubscriberImpl; SubscriberImpl; class invalid for deserialization
            at java.io.ObjectStreamClass.checkDeserialize(ObjectStreamClass.java:713)
            at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1733)
            at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
            at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
            at sun.rmi.server.UnicastRef.unmarshalValue(UnicastRef.java:306)
            at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:290)
            ... 9 more
    Caused by: java.io.InvalidClassException: SubscriberImpl; class invalid for deserialization
            at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:587)
            at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1583)
            at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1496)
            at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1732)
            ... 13 moreI googled now for 2 hours but can't resolve the problem alone. As far as I can understand I have to serialize Objects that I want to send to the server, right?
    So how can i do this? I've never used serialization till now.
    any ideas how to solve this problem?
    greets from italy and sorry for my very weak english
    bd_italy

    A class has been modified after deployment. Stop the Registry, clean, recompile, and redeploy.

  • JSP client in RMI system - java.rmi.UnmarshalException: error unmarshalling

    Hi,
    Im developing a login part for a distributed airline reservation system using JSP as the client but while executing the jsp, the error that is being catched is :
    java.rmi.UnmarshalException: error unmarshalling return; nested exception is: java.lang.ClassNotFoundException: AirlineImpl_Stub (no security manager: RMI class loader disabled)
    Here are my codes:
    //Interface - Airline.java
    package Air;
    import java.rmi.*;
    public interface Airline extends Remote
         public int CheckUname(String username) throws RemoteException;
    }//implementation - AirlineImpl.java
    import java.net.*;
    import java.io.*;
    import java.sql.*;
    import java.rmi.*;
    import java.rmi.server.UnicastRemoteObject;
    public class AirlineImpl extends UnicastRemoteObject implements Airline
         public AirlineImpl() throws RemoteException
              super();
         public int CheckUname(String username) throws RemoteException
              try
                   int UnameCount = 0;
                   String xxx = "eaglebeta";
                   if(username.equals(xxx)
                        UnameCount++;
                   return UnameCount;
              catch (Exception e3)
                   System.out.println("Error: " + e3);
                   return 0;
    }//Server - AirlineServer.java
    import java.rmi.*;
    import java.rmi.server.UnicastRemoteObject;
    public class AirlineServer
         public static void main(String arg[])
              try
                   Airline myAirline = new AirlineImpl();
                   Naming.rebind("Airline", myAirline);
                   System.out.println();
                   System.out.println("************************************");
                   System.out.println(" >>> Airline Reservation System <<< ");
                   System.out.println("    >>> Server is Listening! <<<    ");
                   System.out.println("************************************");
                   System.out.println();
              catch (RemoteException e)
                   //System.out.println("Error: " + e);
                   System.out.println("RMI Registry is not active!");
                   System.out.println("Activate RMI Registry and retry!");
                   System.out.println("Bye bye, exiting...");
              catch (java.net.MalformedURLException e)
                   //System.out.println("URL Error: "+ e);
                   System.out.println("URL Malformed!");
                   System.out.println("Bye bye, exiting...");
    }//JSP client - newuser.jsp
    <%@ page contentType="text/html; charset=iso-8859-1" language="java" import="java.sql.*" errorPage="" %>
    <%@ page import="java.rmi.*, javax.servlet.*" %>
    <%@ page import="java.util.*, java.lang.*, java.io.*, Air.Airline" %>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    </head>
    <body bgcolor="#99CCFF">
    <%
    Object Airline = null;
    try
    Airline Air = (Airline)Naming.lookup("rmi://localhost/Airline");
    String Name = "eaglebeta";
    if(Air.CheckUname(Name)>0)
         %>
              Username already exists, choose another name
         <%
    else
         %>
         <%=Name%>
         <%
    catch (Exception e1)
    %>
    <%=e1%>
    <%
    %>
    </body>
    </html>The server, implementation, interface and stub are in a folder named "Airline Server" located on my desktop.
    The interface and stub again are in another folder named "Air" located in the "classes\Air" directory which is located in the tomcat 5.5 installation directory!
    The JSP client is located in the "Root" folder in the tomcat 5.5 installation derectory!
    1. I start the registry in the "Airline Server" folder by typing rmiregistry
    2. Load the Airline Server - java AirlineServer
    3. Call the jsp - http://localhost/newuser.jsp
    And i get the following error:
    java.rmi.UnmarshalException: error unmarshalling return; nested exception is: java.lang.ClassNotFoundException: AirlineImpl_Stub (no security manager: RMI class loader disabled)
    Please help me to solve this problem!

    When I am including security manager in my JSP code, the browser just get blank without any display
    if(System.getSecurityManager() == null)
         System.setProperty("java.security.policy", "java.policy");
        System.setSecurityManager(new RMISecurityManager());
    }Please, someone solve my problem! Im realy stuck and I don't know how to proceed! Provide me with a solution or any tutorial that would help me...

  • Java.rmi.UnmarshalException:error

    hi,
    A rmi program does not work on my pc but it worked on others pc there are three programs ie RMIServer.java which is the server application ,RMIClient.java which is the client application and RMIInterface.java which has two methods which are remote all these programs gets compiled but while running it from the dos prompt it gives these errors:
    RemoteException occured in serverthread;nested exception is:java.rmi.UnmarshalException:error unmarshalling arguments;nested exception is:java.lang.ClassNotFoundException:RMIServer_stub
    what is the problem how does it work on others pc and not on mine how should i handle these exception what are the reasons for its occurrance please help

    It might help to start the rmiregistry from the directory where your class files are stored.
    In this case the rmiregistry adds its working directory to its codebase.
    Just keep in mind that the rmiregistry works in a similar fashion to the javac compiler & needs to be able to find the _Stub & _Skel class files.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Java.rmi.UnmarshalException: error unmarshalling arguments;

    Hi!
    I'm a newbe with rmi, and I try to use a test program, from Thinking in Java:
    ITiempoPerfecto.java
    package c15.rmi;
    import java.rmi.*;
    interface ITiempoPerfecto extends Remote {
         long obtenerTiempoPerfecto() throws RemoteException;
    TiempoPerfecto.java
    package c15.rmi;
    import java.rmi.*;
    import java.rmi.server.*;
    import java.rmi.registry.*;
    import java.net.*;
    public class TiempoPerfecto extends UnicastRemoteObject implements ITiempoPerfecto {
         public long obtenerTiempoPerfecto () throws RemoteException {
              return System.currentTimeMillis();
         public TiempoPerfecto() throws RemoteException {
               super();
         public static void main(String[] args) throws Exception {
              System.setSecurityManager(new RMISecurityManager());
              TiempoPerfecto tp=new TiempoPerfecto();
              Naming.bind("//localhost/TiempoPerfecto",tp);
              System.out.println("Preparado para dar la hora");
    }and
    MostrarTiempoPerfecto.java
    package c15.rmi;
    import java.rmi.*;
    import java.rmi.registry.*;
    public class MostrarTiempoPerfecto {
         public static void main(String[] args) throws Exception {
              System.setSecurityManager( new RMISecurityManager());
              ITiempoPerfecto t=(ITiempoPerfecto)Naming.lookup("//localhost/TiempoPerfecto");
              for (int i=0;i<10;i++)
                   System.out.println("Tiempo perfecto: "+t.obtenerTiempoPerfecto());
    }I compile all the files normally.
    Later I do:
    rmiregistry &
    rmic c15.rmi.TiempoPerfecto(This only generate the file TiempoPerfecto_Stub.class, it's ok?)
    Without warnings or errors. But when I try to create a server object
    java c15/rmi/TiempoPerfectoI obtain this:
    Exception in thread "main" java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
            java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
            java.lang.ClassNotFoundException: c15.rmi.TiempoPerfecto_Stub
            at sun.rmi.server.UnicastServerRef.oldDispatch(UnicastServerRef.java:385)
            at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:240)
            at sun.rmi.transport.Transport$1.run(Transport.java:153)
            at java.security.AccessController.doPrivileged(Native Method)
            at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
            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:595)
    .......What is the mistake? What may I do to run this programs?
    Thank you!

    You must change your current directory to your class path (EX: java c15/rmi/TiempoPerfecto) then execute command remiregistry.

  • Please help, I am having java.rmi.UnmarshalException.

    First I would like to show you the interface code i want to implement, following is the code.
    package bis.opencontrol.opcconnector;
    import java.rmi.Remote;
    import java.rmi.RemoteException;
    import javax.swing.tree.*;
    public interface ReceiveNodeInterface extends Remote
    DefaultMutableTreeNode getRootNode(String x) throws RemoteException;
    The server class which implements this interface is as follows...
    package bis.opencontrol.opcconnector;
    public class RMIServiceToSendNodesHierarchy extends java.rmi.server.UnicastRemoteObject implements ReceiveNodeInterface
    public DefaultMutableTreeNode getRootNode(String x) throws RemoteException
    System.out.println(x);
    return(TimerToGetNodesHierarchy.getRootNode());
    public RMIServiceToSendNodesHierarchy() throws RemoteException
    try
    thisAddress= (InetAddress.getLocalHost()).toString();
    catch(Exception e)
    throw new RemoteException("can't get inet address.");
    thisPort = 1099;
    System.out.println("Starting RMI service at address = "+thisAddress+" and PortNo = "+thisPort);
    System.getProperties().setProperty("java.security.policy", "wideopen.policy");
    if(System.getSecurityManager() == null)
    System.setSecurityManager(new RMISecurityManager());
    try
    registry = LocateRegistry.createRegistry(thisPort);
    registry.rebind("RMIServiceToSendNodesHierarchy", this);
    The client class which will send request to server is as follows...
    package tagbrowser;
    public class TagBrowser extends javax.swing.JFrame
    ReceiveNodeInterface rmiServer;
    public TagBrowser() throws MalformedURLException
    getRootNodeIntoTree();
    void getRootNodeIntoTree() throws MalformedURLException
    String text = "Please, send us the root node.";
    try
    registry = LocateRegistry.getRegistry(serverAddress, 1099);
    String[] list = registry.list();
                   if( list == null )
                        throw new RemoteException( "list == null" );
    else
    for (int k=0; k < list.length; k++)
    System.out.println("registry" + k + ": " + list[k].toString());
    System.getProperties().setProperty("java.security.policy", "wideopen.policy");
    if(System.getSecurityManager() == null)
    System.setSecurityManager(new RMISecurityManager());
    rmiServer = (ReceiveNodeInterface)(registry.lookup("RMIServiceToSendNodesHierarchy"));
    rootNode = rmiServer.getRootNode(text);
    catch(RemoteException e){
    e.printStackTrace();
    catch(NotBoundException e){
    e.printStackTrace();
    Well, when I run this rmi client application I get this following error...
    registry0: RMIServiceToSendNodesHierarchy
    java.rmi.UnmarshalException: error unmarshalling return; nested exception is:
    java.lang.ClassNotFoundException: bis.opencontrol.opcconnector.ReceiveNodeInterface
    at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
    at tagbrowser.TagBrowser.getRootNodeIntoTree(TagBrowser.java:126)
    at tagbrowser.TagBrowser.<init>(TagBrowser.java:39)
    at tagbrowser.Main.main(Main.java:19)
    Caused by: java.lang.ClassNotFoundException: bis.opencontrol.opcconnector.ReceiveNodeInterface
    at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
    ... 4 more
    BUILD SUCCESSFUL (total time: 1 second)

    System.out.println("Starting RMI service at address = "+thisAddress+" and PortNo = "+thisPort);That's not true unless you call super(1099) inside this constructor. So at this point you are printing misleading information.
    System.getProperties().setProperty("java.security.policy", "wideopen.policy");
    if(System.getSecurityManager() == null)
    System.setSecurityManager(new RMISecurityManager());
    }You normally don't need a security manager in an RMI server. You can delete all this.
    package tagbrowser;I would expect to see either import bis.opencontrol.opcconnector.* or import bis.opencontrol.opcconnector.ReceiveNodeInterface here. So there is clearly something wrong with your project structure. I suspect you have copied ReceiveNodeInterface from the server package to the client. That isn't valid. The remote interface is the same at both client and server.
    I am having java.rmi.UnmarshalExceptionWell, actually you are having java.lang.ClassNotFoundException: bis.opencontrol.opcconnector.ReceiveNodeInterface
    at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
    due to the error described above. This also implies that bis.opencontrol.opcconnector.ReceiveNodeInterface needs to be available to the client via its classpath, i.e. usually via the same JAR that the client classes are in.

  • Java.rmi.UnmarshalException after some time without a process restart.

    Hello,
    I am having a problem when I use RMI connection. I run a process which creates its own RMI registry and binds to it in the following way:
        private void registerRmi() throws Exception {
            // Register an instance of RunServices with the
            // RMI Naming service
            // Install a security manager that can handle remote stubs
            System.setSecurityManager(new RMISecurityManager());
            String serviceName = IScannerRmiCommands.RMI_NAME;
            log.infoF("General.Info.RegisteringRMIService", serviceName);
            try {
                if (s_registry == null) {
                    s_registry = LocateRegistry.createRegistry(IScannerRmiCommands.RMI_PORT);
                s_registry.rebind(serviceName, this);
                s_registredRmi = true;
                log.infoF("General.Info.RMIServiceRegistered");
            } catch (RemoteException e) {
                log.fatalF(e, "General.Fatal.RMIServiceRegistrationFailed");
        }The client applications are able to connect to this process, but after some time clients start to receive the following exceptions:
    java.rmi.UnmarshalException: error unmarshalling return; nested exception is:
         java.io.EOFException
         at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
         at java.rmi.Naming.lookup(Unknown Source)
         at com.x1.util.RMIHelper.doLookup(RMIHelper.java:23)
         at com.x1.util.RMIHelper.lookup(RMIHelper.java:83)
         at com.x1.setup.admin.Administration.lookupRemoteScanner(Administration.java:123)
         at com.x1.infrastructure.statistics.StatisticResponseHandler.createMPResponse(StatisticsProvider.java:1337)
         at com.x1.infrastructure.statistics.StatisticResponseHandler.run(StatisticsProvider.java:157)
         at java.lang.Thread.run(Unknown Source)
    Caused by: java.io.EOFException
         at java.io.ObjectInputStream$BlockDataInputStream.peekByte(Unknown Source)
         at java.io.ObjectInputStream.readObject0(Unknown Source)
         at java.io.ObjectInputStream.readObject(Unknown Source)
         ... 8 moreI can't reproduce this on my dev environment but a customer experiences this quite often. They don't have any firewall running or antivirus software on these machines.
    Any help will be highly appreciated.
    Thanks in advance.
    Edited by: rossenv on Oct 2, 2009 2:18 PM

    No, I don't see any errors at server's site and this is the most strange thing. It seems that server operates normally except it stopped execute RMI commands until it is restarted. After that it responds properly and after some time stops again with the same client exception.

  • RMI Problem --   java.rmi.UnmarshalException:

    I am having a client and a server.... when i am trying to bring the client into server. but when i am doing it... i am getting an exception as below as...
    java.rmi.UnmarshalException: Error unmarshaling return header; nested exception is:
         java.io.EOFException
         at sun.rmi.transport.StreamRemoteCall.executeCall(Unknown Source)
         at sun.rmi.server.UnicastRef.invoke(Unknown Source)
         at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
         at java.rmi.Naming.lookup(Unknown Source)
         at hsmsgui.rmtmgmt.RmtMgmtHandler.contactClient(RmtMgmtHandler.java:176)
         at hsmsgui.display.AddClientWzd.onFinishBtnClicked(AddClientWzd.java:488)
         at hsmsgui.display.AddClientWzd.actionPerformed(AddClientWzd.java:346)
         at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
         at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
         at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
         at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
         at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
         at java.awt.Component.processMouseEvent(Unknown Source)
         at javax.swing.JComponent.processMouseEvent(Unknown Source)
         at java.awt.Component.processEvent(Unknown Source)
         at java.awt.Container.processEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Window.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
         at java.awt.Dialog$1.run(Unknown Source)
         at java.awt.Dialog$3.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.awt.Dialog.show(Unknown Source)
         at hsmsgui.display.AddClientAction.actionPerformed(AddClientAction.java:38)
         at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
         at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
         at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
         at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
         at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
         at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
         at java.awt.Component.processMouseEvent(Unknown Source)
         at javax.swing.JComponent.processMouseEvent(Unknown Source)
         at java.awt.Component.processEvent(Unknown Source)
         at java.awt.Container.processEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Window.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)
    Caused by: java.io.EOFException
         at java.io.DataInputStream.readByte(Unknown Source)
         ... 60 more
    can any one help me out to solve this problem.......

    Thanks for ur reply...Now i' m getting the access denied problem..
    I am able to create the rmi registry successfully on the server, Then Binding is also done successfully. but when i try to connect the client to the server the exception is thrown Please help me..
    TEST - client PC name.
    java.security.AccessControlException: access denied (java.net.SocketPermission TEST resolve)
         at java.security.AccessControlContext.checkPermission(Unknown Source)
         at java.security.AccessController.checkPermission(Unknown Source)
         at java.lang.SecurityManager.checkPermission(Unknown Source)
         at java.lang.SecurityManager.checkConnect(Unknown Source)
         at java.net.InetAddress.getAllByName0(Unknown Source)
         at java.net.InetAddress.getAllByName0(Unknown Source)
         at java.net.InetAddress.getAllByName(Unknown Source)
         at java.net.InetAddress.getByName(Unknown Source)
         at java.net.InetSocketAddress.<init>(Unknown Source)
         at java.net.Socket.<init>(Unknown Source)
         at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(Unknown Source)
         at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(Unknown Source)
         at sun.rmi.transport.tcp.TCPEndpoint.newSocket(Unknown Source)
         at sun.rmi.transport.tcp.TCPChannel.createConnection(Unknown Source)
         at sun.rmi.transport.tcp.TCPChannel.newConnection(Unknown Source)
         at sun.rmi.server.UnicastRef.newCall(Unknown Source)
         at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
         at java.rmi.Naming.lookup(Unknown Source)
         at hsmsgui.rmtmgmt.RmtMgmtHandler.contactClient(RmtMgmtHandler.java:176)
         at hsmsgui.display.AddClientWzd.onFinishBtnClicked(AddClientWzd.java:488)
         at hsmsgui.display.AddClientWzd.actionPerformed(AddClientWzd.java:346)
         at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
         at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
         at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
         at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
         at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
         at java.awt.Component.processMouseEvent(Unknown Source)
         at javax.swing.JComponent.processMouseEvent(Unknown Source)
         at java.awt.Component.processEvent(Unknown Source)
         at java.awt.Container.processEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Window.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
         at java.awt.Dialog$1.run(Unknown Source)
         at java.awt.Dialog$3.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.awt.Dialog.show(Unknown Source)
         at hsmsgui.display.AddClientAction.actionPerformed(AddClientAction.java:38)
         at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
         at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
         at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
         at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
         at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
         at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
         at java.awt.Component.processMouseEvent(Unknown Source)
         at javax.swing.JComponent.processMouseEvent(Unknown Source)
         at java.awt.Component.processEvent(Unknown Source)
         at java.awt.Container.processEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Window.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)

  • Java.rmi.UnmarshalException:

    hai,
    I am facing a problem in rmi , when running my RMI server program, I am a beginner to this area, earlier it was working and i got the output, i didnt change anything, i used three windows to test my program, one for rmiregistry, another for running the server and other for running the client.
    But when i execute server, after two seconds i got the following error,
    Trouble java.rmi.UnmarshalException: Error unmarshaling return; nested exception is:
    java.net.SocketException: Connection reset
    please help me to solve this.
    rajesh kumar

    I am a beginner to this area, earlier
    it was working and i got the output, i didnt change
    anythingevidently, you did, or it would still be working

  • Java.rmi.UnmarshalException: Error unmarshaling return header

    Hi,
    We are running an RMI server instance to serve data ( from memory) to clients. It works fine if fewer number of inquiries goes in. But when the number of inquiries are larger, I am getting some exceptions at the client side. The server crashes without throwing any exceptions. Following are the exceptions received at client side:
    java.rmi.UnmarshalException: Error unmarshaling return header; nested exception is:
         java.net.SocketException: Connection reset
         at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:203)
         at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:133)
         at com.emf1.dataserver.KeyFrequencyKeeper_Stub.getDUNSCounts(Unknown Source)
         at com..match.KeyFrequencyKeeperProxy.getKeyKQSs(KeyFrequencyKeeperProxy.java:307)
         at com.emf1.match.KeyGenerator.generateKeys(KeyGenerator.java:453)
         at com.emf1.match.InquiryProcessor.run(InquiryProcessor.java:870)
         at java.lang.Thread.run(Thread.java:534)
    Caused by: java.net.SocketException: Connection reset
         at java.net.SocketInputStream.read(SocketInputStream.java:168)
         at java.io.BufferedInputStream.fill(BufferedInputStream.java:183)
         at java.io.BufferedInputStream.read(BufferedInputStream.java:201)
         at java.io.DataInputStream.readByte(DataInputStream.java:331)
         at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:189)
         ... 6 more
    The period of time, the server keeps on running (before it crashes) is also not the same. Sometimes it works fine without any problem. But most of the time the server crashes after processing some records.
    I don't know why this is happening.
    Please help...
    Thanks in advance..

    I have this error too when I running my rmi server site program.
    I am running it in Linux Environment.
    Anyone got any idea about this?

  • "java.rmi.UnmarshalException: error unmarshalling" at Applet with RMI comm.

    Hello,
    I am trying to make an Applet work with an RMI server, but i keep getting the same exception again and again whatever i do.
    More specifically, i get the following :
    java.rmi.UnmarshalException: error unmarshalling return; nested exception is:
         java.net.MalformedURLException: unknown protocol: c
         at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
         at server.ClientDemo.initGUI(ClientDemo.java:100)
         at server.ClientDemo.<init>(ClientDemo.java:85)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
         at java.lang.reflect.Constructor.newInstance(Unknown Source)
         at java.lang.Class.newInstance0(Unknown Source)
         at java.lang.Class.newInstance(Unknown Source)
         at sun.applet.AppletPanel.createApplet(Unknown Source)
         at sun.applet.AppletPanel.runLoader(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Caused by: java.net.MalformedURLException: unknown protocol: c
         at java.net.URL.<init>(Unknown Source)
         at java.net.URL.<init>(Unknown Source)
         at java.net.URL.<init>(Unknown Source)
         at sun.rmi.server.LoaderHandler.pathToURLs(Unknown Source)
         at sun.rmi.server.LoaderHandler.loadProxyClass(Unknown Source)
         at java.rmi.server.RMIClassLoader$2.loadProxyClass(Unknown Source)
         at java.rmi.server.RMIClassLoader.loadProxyClass(Unknown Source)
         at sun.rmi.server.MarshalInputStream.resolveProxyClass(Unknown Source)
         at java.io.ObjectInputStream.readProxyDesc(Unknown Source)
         at java.io.ObjectInputStream.readClassDesc(Unknown Source)
         at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
         at java.io.ObjectInputStream.readObject0(Unknown Source)
         at java.io.ObjectInputStream.readObject(Unknown Source)
         ... 13 more
    The exeption is thrown at the following line :
                   remoteReference = (RMIServer) registry.lookup(RMIServer.REGISTRY_NAME);
    This is the code of the server which seems to be running ok:
    if(System.getSecurityManager()==null)
                   System.setSecurityManager(new SecurityManager());
              registry = LocateRegistry.createRegistry(1099);
              RMIServer sr=(RMIServer) UnicastRemoteObject.exportObject(new ServerDemo(),1099);
              registry.rebind(RMIServer.REGISTRY_NAME, sr);
    and the client:
    registry = LocateRegistry.getRegistry("localhost");
    remoteReference = (RMIServer) registry.lookup(RMIServer.REGISTRY_NAME);
    Thank you in advance
    Alex
    Forgot to mention that i am setting the security policy and codebase programmatically:
    System.setProperty("java.security.policy","C:\\Users\\Alex\\workspace\\Demo\\grantall.policy");
              System.setProperty("java.rmi.server.codebase","C:\\Users\\Alex\\workspace\\Demo\\bin");
    Edited by: Alkon on May 15, 2008 4:31 PM

    I edited the code that sets the security and i am now getting the following error, again at the lookup:
    java.rmi.UnmarshalException: Error unmarshaling return header; nested exception is:
         java.io.EOFException
         at sun.rmi.transport.StreamRemoteCall.executeCall(Unknown Source)
         at sun.rmi.server.UnicastRef.invoke(Unknown Source)
         at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
         at server.ClientDemo.initGUI(ClientDemo.java:101)
         at server.ClientDemo.<init>(ClientDemo.java:91)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
         at java.lang.reflect.Constructor.newInstance(Unknown Source)
         at java.lang.Class.newInstance0(Unknown Source)
         at java.lang.Class.newInstance(Unknown Source)
         at sun.applet.AppletPanel.createApplet(Unknown Source)
         at sun.applet.AppletPanel.runLoader(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Caused by: java.io.EOFException
         at java.io.DataInputStream.readByte(Unknown Source)
         ... 15 more

  • RemoteException: java.rmi.ConnectIOException: error during JRMP connection

    We have a Java application implementing a RMI server.
    The server uses with the jacob api in order to generate Word files in a windows system.
    My clients work in linux.
    The RMI method is synchronized in order not to have problems executing Word from multiple threads.
    The application and the RMI server work all right for some time, but after some hours (sometimes days) the client throws the following error:
    RemoteException: java.rmi.ConnectIOException: error during JRMP connection establishment; nested exception is:
    java.net.SocketException: Connection reset

    Hi Varun,
    This is definitely required even if you are on WAS6.40.
    After copying this , you have to also follow the register dll using this command
    rgsvr32 "c:\Winnt\system32\librfc32.dll"
    check the OS your using wether it is windowsXP/2003 or 2000.
    there are seperate commands for them to register the dll.
    This is available in the installation guide.
    we also had the same problem and then we did this and it worked for us.
    f you have done this, then there are other possibilities also
    1. Install SOAP toolkit on the CRM server as this is required to establish the connectivity
    2. See whether the MAPBOX services are deployed on the SAP J2EE engine
    3. Create RFC through SM59 only for mapbox and register them.
    4. See if there are any old versions of Java on your machine then uninstall them and install the required java components.
    Let us know if it resolved the problem
    Thanks
    Yash
    reward points if it helps.

  • Calling a service through the EJB results in java.rmi.UnmarshalException

    I have created a service on WLAI that does a simple query against a table (inventory
    count by product ID). I have also created a command line class to call this service,
    provide the correct XML schema input, and wait for a returning XML response.
    The class compiles fine, but at runtime I am hitting a java.rmi.UnmarshalException,
    with a nested exception of a java.lang.ClassNotFoundException on the class com.bea.wlai.client.bean.ApplicationViewBeanEOImpl_WLStub.
    However, I am positive this class is in the classpath on the remote computer
    running WLAI in the %INTEGRATION_HOME%\applinteg\lib\WLAIlib.jar file.
    I have been told that RMI calls run off a separate classpath, and that may be
    why this class cannot be found. However, I am not familiar with such situations.
    Any ideas or thoughts would be greatly appreciated. Please respond to this thread
    with any thoughts or if you need any more information. Thanks.
    Dan Kim

    Maybe u must cast appMod to the generated class 'TestbcModuleEJBClient', in the automatically generated client project, instead of 'TestbcModule', that's only an interface. In this way appMod should find the implementation of your methods, and not only the declaration. That is:
    appMod = (TestbcModuleEJBClient) home.create ();
    Christian T.
    null

Maybe you are looking for

  • Workaround for non-SAP mitigating control reminders

    Dear all, Our business users would like to document mitigating controls in RAR 5.3 regardless of whether they are connected with an SAP report. They would also like to receive email reminders for those controls. Unfortunately, the frequency of the co

  • Custom Top creation in oracle applications

    Hi When we create a custom top in oracle applications 11i/R12, is it mandatory to run autoconfig? Are there any manual entry steps to be performed in adding custom top entry other than xml file like topfile.txt????

  • Create PR header text for local PR only

    Dear all, I want to create a new PR header text which is used for local PR ONLY. I used tran. code SE75 to craeted a new text ID for PR. After created, the new header text item appeared in all PR types. May I ask how to do if I wan this PR header tex

  • Interact with web site

    I'm programming a chatbot that will be able to get information from web site if it isnt in the script. Im at the stage where I want to use a web site's search engine, namely www.imdb.com/search to continue. The idea is I will send the search term on

  • Error in Credit Card biling address line

    https://developer.apple.com/ios/enroll/individualEnrollmentIndex.action When I try to fill out this page, it keeps saying there are errors in my credit card billing address, which I am sure is correct. What is going on?