Unmarshalling arguments Problem

I'm new to RMI. I opened the rmi registry on windows , tried to run my server , but every time I run this server I get the exception:
java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
        java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
        java.lang.ClassNotFoundException: rmi.MyRemoteServer
        at sun.rmi.server.UnicastServerRef.oldDispatch(UnicastServerRef.java:396)
        at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:250)
        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)
.........Here is the code of my Remote Interface:
package rmi;
import java.rmi.Remote;
import java.rmi.RemoteException;
public interface MyRemoteServer extends Remote{
    String sayHi() throws RemoteException;
}and here is the code of my simple Server:
package rmi;
import java.rmi.RemoteException;
public class Server  implements MyRemoteServer{
    public String sayHi() {
        return "Hi , I'm the fuckin' server.";
    public Server() throws RemoteException{
    super();
}I searched for the answer and I noticed there is something called code base, Is this my problem ,If any one has an idea please let me know.

Thanks I used c , and it worked , but when I tried to run the client I got an exception:
java.security.AccessControlException: access denied (java.net.SocketPermission 127.0.0.1:5000 connect,resolve)
        at java.security.AccessControlContext.checkPermission(AccessControlContext.java:323)
        at java.security.AccessController.checkPermission(AccessController.java:546)
        at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
        at java.lang.SecurityManager.checkConnect(SecurityManager.java:1034)and here is the code of the client:
package rmiclient;
import java.rmi.registry.LocateRegistry;
import java.rmi.registry.Registry;
public class Client {
    public static void main(String[] args) {
       if(System.getSecurityManager()==null){
       System.setSecurityManager(new SecurityManager());
        try{
        Registry reg = LocateRegistry.getRegistry(5000);
        MyRemoteServer server = (MyRemoteServer) reg.lookup("HelloServer");
            System.out.println(server);
        }catch(Exception e){
        e.printStackTrace();
}do you know what should I do?

Similar Messages

  • Error unmarshalling arguments

    I have written an RMI application I have completed all the steps but I am stuck when I start the server. By issuing the following command on the prompt:
    C:> java �Djava.security.policy=java.policy FileServer
    I get the following error message:
    File Server: java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
         java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
         java.lang.ClassNotFoundException: FileImplement_Stub
    I tried my best to solve it but failed� Sir, how can I solve this problem?

    http://onesearch.sun.com/search/onesearch/index.jsp?qt=ClassNotFoundException&qp_name=null&subCat=siteforumid%3Ajava58&site=dev&dftab=siteforumid%3Ajava58&chooseCat=javaall&col=developer-forums

  • 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.

  • Nested exception, unmarshalling arguments, ClassNotFountException:AImp_stub

    java.rmi.ServerException: Server RemoteException; nested exception:
    java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
    java.lang.ClassNotFoundException:AddServerImpl_Stub
    Kindly look at my face......full of burden kindly eradicate the erorrs
    looking for ur help

    hi sam,
    all the files including stub, skeleton and others are in the same directory(in jdk1.1.8/bin). and i've given set classpath=c:\jdk1.1.8\bin\
    once after giving the codebase....it's not telling the errors. it just displays the option what r all v can do with java -options.
    i've given the codebase as follows:
    java -Djava.rmi.server.codebase=file///c:/jdk1.1.8/bin/AddServer.class
    i've trying to run the server for past 4 days....but i don't get the correct response

  • Command line Argument Problem - '*'

    Hi, Is there any problem in giving * as Command line argument.
    My student was trying to write a calculator program but stuck :
    Code Sample
    public class test
    public static void main(String[] args)
    System.out.println(args[1]);
    java test 2 + 2
    No Problem
    java test 2 * 2
    gives Problem

    It's not relevant to the programming language. The shell is what expands the *.
    OTOH, I heard that MS-DOS filename expansion is spotty (that's been my experience actually) and that Java has a workaround built into it to make it make sense.
    I'd encourage you to change the assignment (or however this is working out) to allow your student to submit the entire expression as a single argument:
    java Calculator '2 * (3 + 2)'

  • Screenflow argument problems - Expense Management Tutorial

    Hi All,
    I'm new with ALBPM, and I get started with Expense Management tutorial, all its ok until:
    After I Implemented the Activity 4 (http://download.oracle.com/docs/cd/E13154_01/bpm/docs65/tutorial/index.html) of this tutorial, I've gotten a "Problem"
    All arguments must be fulfilled when defining the incoming argument mapping of a screenflow invocation task (Activity:Edit Report, task: Edit Report)
    This message it seems self explained, but I review and I can't see where missing some data.
    Someone can help me?
    Thanks Gurus
    C.Arruda
    Edited by: user7996916 on May 7, 2009 1:14 PM
    Edited by: user7996916 on May 7, 2009 6:16 PM

    Without knowing the tutorial very well, it sounds like you either have 'extra' incoming arguments, or that you are not mapping them at all.
    If you right click the 'sub screenflow' activity in your main process, go down to 'Main Task'
    From here, select 'Argument Mapping', and then click the 'plus' sign on the right. It will create a drop down on the left that lists all the 'incoming arguments' If you have any there that aren't accounted for, you will need to select one from the right side to populate into it.
    Hope that helps!
    -Kevin

  • WebService - Multiple arguments problems

    Hi everyone,
    I need to call a method of a given Webservice which is
    described by the following code in the WSDL file :
    <s:element name="loadWorkspace">
    <s:complexType>
    <s:sequence>
    <s:element minOccurs="1" maxOccurs="1" name="nServer"
    type="s:int"/>
    <s:element minOccurs="0" maxOccurs="1" name="sWorkspace"
    type="s:string"/>
    </s:sequence>
    </s:complexType>
    </s:element>
    When the WSDL is parsed, and when I call
    MyWS.LoadWorkspace(0,"MyWorkspace"), the second parameter is not
    caught in the trace. Here is the result :
    3/30 17:0:29 [INFO] SOAP: Asynchronously invoking SOAPCall:
    LoadWorkspace(0,"plop")
    param:loadWorkspace1 0
    param:LoadWorkspaceResult plop
    3/30 17:0:29 [INFO] : Invoking call LoadWorkspace
    loadWorkspaceResponse :-1
    Someone can help me to call this method with the two
    arguments ?

    I up my topic... I realise that I also have problems passing
    only one arguments...
    It seems that FMS is uncompatible with WebService with
    complex types.
    Is there a solution to adapt my application to this
    Webservice ? Or, have I to re-write a compatible Webservice
    ?

  • JAXB XML Unmarshalling validation problem

    Hello,
    I'm using toplink JAXB to map XML document to an object hierarchy. The set of objects was built using Toplink workbench from the corresponding XSD file. The XSD file is specified in <toplink:resource> element using an absolute path. If I use unmarshaller validation (Unmarshaller u = jc.createUnmarshaller(); u.setValidating(true)) it works fine in embedded oc4j, but fails withan UnmarshalException "An internal error condition occurred" for Line N 1.
    It looks like the cause of the exception is that toplink cannot find the XSD file. I've tried to put the XSD file into META-INF and into classes directly, and specify the relative path, but it has failed event locally in the embedded oc4j.
    Everything works if I do not turn the validation on.
    Has anybody gotten the same issue? What could be a solution if we have to perform the validation?
    Thanks
    Kate

    Hello Kate,
    One possible work around would be use the TopLink OXM specific APIs for this unmarshal. For the most part they mirror the JAXB APIs so there usage is pretty straight forward.
    XMLContext xmlContext = new XMLContext(YOUR_JAXB_CONTEXT_PATH);
    xmlUnmarshaller = xmlContext.createUnmarshaller();One API that we offer that is not part of the standard JAXB Unmarshaller is the ability to specify an EntityResolver. This class allows you to override where the XML Schema is loaded from.
    EntityResolver entityResolver = new YourEntityResolver();
    xmlUmarshaller.setEntityResolver(entityResolver);YourEntityResolver must implement org.xml.sax.EntityResolver. There is one method on this interface that returns an InputSource representing the XML Schema. You can implement this method to load the Schema from a ClassLoader.
    -Blaise

  • BufferedReader argument problem

    I am getting one error with BufferedReader. Here is the code and below it is the error. If anyone can explain, I would appreciate it:
    import java.io.*;
    import java.util.StringTokenizer;
    public class Socks {
    public static void main(String args[])
         int numberOfsocks = 0;
         int numberOfpairs = 0;
         String line, sockColor, sockType;
         StringTokenizer tokenizer;
         try
              FileReader fr = new FileReader(args[1]);
         catch(FileNotFoundException e)
              System.out.println("File Not Found or no File Specified");
         BufferedReader inFile = new BufferedReader(fr);
         line = inFile.readLine();
         while(line != null)
         tokenizer = new StringTokenizer(line);
         sockColor = tokenizer.nextToken();
         sockType = tokenizer.nextToken();
         System.out.println(sockColor);
         System.out.println("\n");
         System.out.println(sockType);
         System.out.println("\n");
         line = inFile.readLine();
    inFile.close();     
    Here is the error:
    C:\Socks\Socks.java:23: cannot resolve symbol
    symbol : variable fr
    location: class Socks
         BufferedReader inFile = new BufferedReader(fr);
    ^
    1 error
    Process completed.

    A scope issue.
    A variable can only be referenced within the block in which it is declared. As you have declared and initialised object fr within the try block then you cannot reference it outside of here. Try this:
    try
    FileReader fr = new FileReader(args[1]);
    BufferedReader inFile = new BufferedReader(fr);
    line = inFile.readLine();
    while(line != null)
    tokenizer = new StringTokenizer(line);
    sockColor = tokenizer.nextToken();
    sockType = tokenizer.nextToken();
    System.out.println(sockColor);
    System.out.println("\n");
    System.out.println(sockType);
    System.out.println("\n");
    line = inFile.readLine();
    } // end try block
    catch(FileNotFoundException e)
    System.out.println("File Not Found or no File Specified");
    catch (IOException ioe)
    }

  • Simple Unmarshalling example problem

    First of all let me say that I'm very new to this technology so please excuse my ignorance.
    Now that being said. I'm trying to do a very simple JAXB unmarshaller example.
    I have the following xml format:
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <Books>
         <authFName>F. Scott</authFName>
         <authLName>Fitzgerald</authLName>
         <bookISBN>0-471-398233</bookISBN>
         <bookName>The Great Gatsby</bookName>
         <printDate>
              <month>07</month>
              <day>30</day>
              <year>1978</year>
         </printDate>
         <publisher>Scribners</publisher>
    </Books>Now I've got a books class
    package com.example.book;
    @javax.xml.bind.annotation.XmlRootElement(name="Books")
    public class Books
         private String bookName;
         private String bookISBN;
         private Date printDate;
         private String publisher;
         private String authFName;
         private String authLName;
         public Books() {}
         public Books(String bookISBN, String bookName, int mth, int day, int year, String publisher, String aFName, String aLName)
              this.setBookISBN(bookISBN);
              this.setBookName(bookName);
              printDate = new Date(mth,day,year);
              this.setPublisher(publisher);
              this.setAuthFName(aFName);
              this.setAuthLName(aLName);
         public String getAuthFName()
              return authFName;
         public void setAuthFName(String authFName)
              this.authFName = authFName;
         public String getAuthLName()
              return authLName;
         public void setAuthLName(String authLName)
              this.authLName = authLName;
         public void setBookName(String bookName)
              this.bookName = bookName;
         public String getBookName()
              return bookName;
         public void setBookISBN(String bookISBN)
              this.bookISBN = bookISBN;
         public String getBookISBN()
              return bookISBN;
         public void setPublisher(String publisher)
              this.publisher = publisher;
            public Date getPrintDate() {
              return printDate;
         public String getPublisher()
              return publisher;
    }and a Date class:
    package com.example.book;
    public class Date{
         private int month;
         private int day;
         private int year;
         public Date(){}
         public Date(int m, int d, int y){
              setDate(m,d,y);
         private void setDate(int m, int d, int y){
              setMonth(m);
              setDay(d);
              setYear(y);
         private void setYear(int y) {
              this.year = y;
         private void setDay(int d) {
              this.day = d;
         private void setMonth(int m) {
              this.month = m;
    }And here's my test class:
    package com.example.xml;
    import java.io.FileInputStream;
    import java.io.FileNotFoundException;
    import javax.xml.bind.JAXBContext;
    import javax.xml.bind.JAXBException;
    import javax.xml.bind.Unmarshaller;
    import com.example.book.Books;
    public class UnmarshallingExample
         public static void main(String[] args) throws JAXBException, FileNotFoundException
              JAXBContext jc = null;
              Unmarshaller u = null;
              Books b1 = new Books();
              jc = JAXBContext.newInstance(b1.getClass());
              u = jc.createUnmarshaller();
              b1 = (Books)u.unmarshal(new FileInputStream("UnMarshallingOutput.xml"));
              System.out.println("FirstName: " + b1.getAuthFName());
              System.out.println("LastName: " + b1.getAuthLName());
              System.out.println("ISBN: " + b1.getBookISBN());
              System.out.println("Book Name: " + b1.getBookName());
              System.out.println("Print Date: " + b1.getPrintDate());
              System.out.println("Publisher: " + b1.getPublisher());
    }The result of this code is that my print date is null. I'm sure it has something to do with a missing annotation or something in the date class. But I haven't had any luck, does anybody have any suggestions?
    Sorry for the length...
    Cheers...

    Random attempt: I see no setPrintDate() on Books...

  • New problem from unmarshalling

    I have been encountering problem with unmarshalling when trying to run my RMI server. After reading many of the similar problem threads, I've changed the way running "rmiregistry". Now, I unset CLASSPATH before running rmiregistry before running my Server.
    I still get the usual unmarshalling exception
    C:\java\projects\rmi_ex2>myRMIServer
    C:\java\projects\rmi_ex2>java -Djava.security.policy=wideopen.policy -Djava.rmi.
    server.codebase=file:/c:/java/projects/rmi_ex2/ myRMIServer
    Exception occurred: java.rmi.ServerException: Server RemoteException; nested exception is:
    java.rmi.UnmarshalException: error unmarshalling arguments; nested excep
    tion is: java.lang.ClassNotFoundException: myRMIImpl_Stub
    But I also get this from the rmiregistry window
    C:\java\projects\rmi_ex2>rmiregistry
    security properties not found. using defaults.
    Default cache directory c:\j2sdk1.4.1\jcache not found. JAR caching disabled.
    MimeTable.load: file = c:\j2sdk1.4.1\lib\content-types.properties, java.io.FileN
    otFoundException: c:\j2sdk1.4.1\lib\content-types.properties
    java.io.FileNotFoundException: c:\j2sdk1.4.1\lib\content-types.properties
    at java.io.FileInputStream.<init>(FileInputStream.java:56)
    at java.io.FileInputStream.<init>(FileInputStream.java:75)
    at sun.net.www.MimeTable.load(MimeTable.java:212)
    at sun.net.www.MimeTable.<init>(MimeTable.java:43)
    at sun.net.www.MimeTable.getDefaultTable(MimeTable.java:52)
    at sun.net.www.protocol.file.FileURLConnection.connect(Compiled Code)
    at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLCon
    nection.java:162)
    at sun.net.www.protocol.http.HttpURLConnection.openConnectionCheckRedire
    cts(Compiled Code)
    at sun.applet.AppletClassLoader.loadClass(Compiled Code)
    at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:630)
    at sun.applet.AppletClassLoader.loadClass(AppletClassLoader.java:226)
    at sun.rmi.server.RMIClassLoader.loadClass(RMIClassLoader.java:152)
    at sun.rmi.server.MarshalInputStream.resolveClass(MarshalInputStream.jav
    a:90)
    at java.io.ObjectInputStream.inputClassDescriptor(ObjectInputStream.java
    :711)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:328)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:225)
    at java.io.ObjectInputStream.inputObject(Compiled Code)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:344)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:225)
    at sun.rmi.registry.RegistryImpl_Skel.dispatch(RegistryImpl_Skel.java:98
    at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:164)
    at sun.rmi.transport.Transport.serviceCall(Transport.java:154)
    at sun.rmi.transport.tcp.TCPTransport.handleMessages(Compiled Code)
    at sun.rmi.transport.tcp.TCPTransport.run(Compiled Code)
    at java.lang.Thread.run(Thread.java:466)
    Any tips, ideas would be greatly appreciated as I have spend days on this problem!
    Ku

    Hi,
    you should try to use:
    1) Server
    java -Djava.security.policy=wideopen.policy
    -Djava.rmi.server.codebase=file:c:\java\projects\rmi_ex2\
    myRMIServer
    2) Client
    java -Djava.security.policy=wideopen.policy
    -Djava.rmi.server.codebase=file:c:\java\project\rmi_ex2\
    RMIClient
    Bye
    Filippo

  • Unmarshalling error when invoking a remote call in weblogic 9.1/jdk 1.5.

    Hi,
    We are trying to upgrade the weblogic from 7.1 to 9.1. I am getting the following error "java.lang.ClassNotFoundException: Failed to load class <b>void</b> ", when a remote method whose return type is void is invoked. Also I am using jdk 1.5.0_04. Any hints on what might be wrong here is appreciated. I have attached the stack trace below.
    thanks
    Sridhar Sidda
    ;;---------Stack Trace ----------------------------
    Caused by: java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is: java.lang.ClassNotFoundException: Failed to load class void at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:191) at weblogic.rmi.internal.BasicRemoteRef.invoke(BasicRemoteRef.java:176) at com.sabre.fltsked.util.security.ScheduleSecurityValidator3_910_WLStub.hasPermision(Unknown Source) at com.sabre.fltsked.util.security.FSSecurityInterceptor.invoke(FSSecurityInterceptor.java:48) ... 5 more Caused by: java.lang.ClassNotFoundException: Failed to load class void at weblogic.rmi.utils.WLRMIClassLoaderDelegate.loadClass(WLRMIClassLoaderDelegate.java:203) at weblogic.rmi.utils.WLRMIClassLoaderDelegate.loadClass(WLRMIClassLoaderDelegate.java:128) at weblogic.rmi.utils.Utilities.loadClass(Utilities.java:308) at weblogic.rmi.utils.Utilities.loadClass(Utilities.java:344) at weblogic.rjvm.MsgAbbrevInputStream.resolveClass(MsgAbbrevInputStream.java:395) at weblogic.utils.io.ChunkedObjectInputStream$NestedObjectInputStream.resolveClass(ChunkedObjectInputStream.java:255) at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1538) at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1460) at java.io.ObjectInputStream.readClass(ObjectInputStream.java:1427) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1282) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1912) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1836) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1713) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:339) at weblogic.utils.io.ChunkedObjectInputStream.readObject(ChunkedObjectInputStream.java:195) at weblogic.rjvm.MsgAbbrevInputStream.readObject(MsgAbbrevInputStream.java:555) at weblogic.utils.io.ChunkedObjectInputStream.readObject(ChunkedObjectInputStream.java:191) at com.sabre.fltsked.util.security.ScheduleSecurityValidator3_WLSkel.invoke(Unknown Source) at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:517) at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:407) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363) at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:147) at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:403) at weblogic.rmi.internal.BasicServerRef.access$300(BasicServerRef.java:56) at weblogic.rmi.internal.BasicServerRef$BasicExecuteRequest.run(BasicServerRef.java:934) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207) at weblogic.work.ExecuteThread.run(ExecuteThread.java:179)<pre></pre>

    hi,
    I am also getting the same exception when making call to the server.
    If u get the solution for this problem.can u please tell me why this is happening.
    Thanks.

  • Java.rmi.ServerException Problem

    The exception that has occured is java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
    java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
    java.lang.ClassNotFoundException: Process00Impl_Stub
    I have the interface, Client, Server and the Implementation java files
    in the same machine.
    11/29/2002 08:52p 282 Process00.class
    11/29/2002 08:25p 221 Process00.java
    11/29/2002 07:40p 215 Process00.java.bak
    11/29/2002 08:56p 1,008 Process00Client.java
    11/29/2002 08:55p 1,010 Process00Client.java.bak
    11/29/2002 08:57p 451 Process00Impl.class
    11/29/2002 08:57p 936 Process00Impl.java
    11/29/2002 08:52p 934 Process00Impl.java.bak
    11/29/2002 08:57p 2,153 Process00Impl_Skel.class
    11/29/2002 08:57p 3,938 Process00Impl_Stub.class
    11/29/2002 08:56p 995 Process00Server.class
    11/29/2002 08:57p 645 Process00Server.java
    11/29/2002 08:56p 643 Process00Server.java.bak
    I also have the _Stub.class. I do not know why I get this error. If any
    one have an idea, kindly share with me.
    Thanks.

    Hi,
    I had the same problem. In my machine, path was having jre1.1.7 before my jdk 1.4. So it was picking up from jre1.1.7.
    Java was happy when I moved my jdk1.4 path to the beginning of the path variable.
    Hope this helps you.

  • Please help with an RMI problem

    Hi,
    This is probably a really simple problem which i can't spot, but i have the folloing 'HelloWorld' RMI program:
    The Client Program:
    import java.rmi.*;
    public class HelloClient {
         public static void main(String args[]) {
              if(System.getSecurityManager() == null) {
                   System.setSecurityManager(new RMISecurityManager());
              try {
                   HelloInterface obj = (HelloInterface)Naming.lookup("/HelloServer");
                   String message = obj.sayHello();
                   System.out.println(message);
                   Thread.sleep(10000);
              } catch (Exception e) {
                   System.out.println("HelloClient exception: " + e);
    }The Remote Interface:
    public interface HelloInterface extends java.rmi.Remote {
         public String sayHello() throws java.rmi.RemoteException;
    }The Server Program:
    import java.io.*;
    import java.rmi.*;
    import java.rmi.server.*;
    import java.util.Date;
    public class HelloServer extends UnicastRemoteObject implements HelloInterface {
         public HelloServer() throws RemoteException {
              super();
         public String sayHello() throws RemoteException {
              return "Hello World, the current system time is " + new Date();
    }And finally the class which binds the object to the registery:
    import java.rmi.*;
    public class RegisterIt {
         public static void main(String args[]) {
              try {
                   HelloServer obj = new HelloServer();
                   System.out.println("Object instantiated: " + obj);
                   Naming.rebind("/HelloServer", obj);
                   System.out.println("HelloServer bound to registery");
              } catch (Exception e) {
                   System.out.println(e);
    }Now, this program works fine on my computer at home(XP!!!!!) but when i try to run it on the computers in college which run NT, it comes up with the following exceptions when i try to run RegisterIt:
    Java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
    Java.lang.ClassNotFoundException: HelloServer_StubThis is saying that it cannot find the stub which is generated, but i use the folloing .bat file to load up the program:
    echo Creating remote object skelton classes....
    rmic -d . HelloServer
    start rmiregistry -J-Djava.security.policy=test.policy
    start java RegisterIt
    start java -Djava.security.policy=test.policy HelloClientThe stub is definitely created(it worked at home and i have checked in the directory and there are clearly the files HelloServer_Stub.class and HelloServer_Skel.class). The PATH is set correctly otherwise the registery would not be able to run correctly etc and therefore i am completely stuck as to why it doesn't work.
    Please help as it is very important for me.
    Many Thanks
    Cath

    I did not have any problem with Windows 2000 at all but only with Windows XP (and to think XP is a 2000 hybrid!).
    I have the same error: a ClassNotFoundException on the stub file.
    Any help will be appreciated. Thanks.

  • 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.

Maybe you are looking for

  • How do I delete and stop online storage?

    Hi For the last day or so PE9 has been running terrible. I finally gave up and went back to PE8 and it isn't running right either. Then I noticed that it said that my online back up was full. I have never intentionally used online backup but I'm pret

  • Installing windows XP on a mac mini

    Hi All, I have installed windows XP on four macs now and have never experienced a problem whatsoever however on my 5th attempt the following is happening and i wondered if anybody can help? I partition the hard drive using boot camp no problem then i

  • VGA cable extension -or- extending the reach of Solaris

    I purchased a 15ft TRIPP LITE VGA monitor extension cable. This cable does not work with Solaris 10, but does work with Windows! The Solaris graphical interface does not want to load with the extension cable in place. Why? And what can I do about the

  • HT2498 My canon doesn't have a cable that fits in my Ipad...can I get an adapter of some kind

    My Canon camera doesn't have the right cable to connect to my IPad....Is there an adapter available from Apple or from Canon?

  • Float - string

    I have float BMIndex and I would like to display the number in a panel. I think the only way I can do this is to copy float BMIndex to string BMIstring, but I can't figure out how. There doesn't seem to be a parse method in string, and the few things