RMI codebase confusion

You'll have to excuse me if I am asking stupid questions, but I can't find the information I want in the documentation. I am working on an RMI client-server project with 3 jars client.jar, common.jar, server.jar. The common jar contains a Remote interface which the client looks up, and the server implements. The stub class is contained in the server jar (obviously).
Currently our method of distribution is to distribute all 3 jars to the client machines - I want to avoid this as it is unnecessary. I would therefore like to set java.rmi.codebase property in the server so that clients can download the stub classes at run-time. OK.
Our RMI app is being distributed on an internal network - suppose on the server machine (call it "ourserver.london.uk.ourco.com", the relevant Jar file would be at /usr/bin/my_app/jars/server.jar (or wherever).
The clients lookup rmi://ourserver.london.uk.ourco.com:1099/MY_EXPORTED_REMOTE. Questions:
1. Is this RMI "system" dependent on the server having an Http server?
2. If it isn't, how do I define the codebase other than "http://..."?
3. If it is (and the machine certainly does have an http server on it), how do I specify the codebase URL for the clients, given that the server is not "under" the http server (IYSWIM)?
I'd be glad of answers to these (reasonably simple) questions.
Chris

First of all, I would arrange things a bit differently. In both of the cases below, we assume a http server, it's location is unimportent, but it has to be reachable from the the client. It could be the same host as the server, or a third machine.
Option #1:
client.jar -- All client class files, including all class files of remote interfaces called by the client.
server.jar -- All server class files, including all stubs, and remote interfaces implemented and their implementations.
server_dl.jar -- Just the stubs.
The client host would contain just client.jar in the classpath.
The server host would contain server.jar and server_dl.jar in its classpath
server_dl.jar would also be placed on the http server and it's url would be the server's codebase.
Option #2:
client.jar -- All client class files, but none of the remote interfaces.
server.jar -- All server class files, but none of the stubs and no remote interfaces.
interfaces.jar -- The remote interfaces shared by client and server.
server_dl.jar -- just the stubs.
The client host would need client.jar and interfaces.jar in its classpath.
The server host would need server.jar, interfaces.jar and server_dl.jar in its classpath.
server_dl.jar would also be placed on the http server and it's url would be the server's codebase.
Now to answer your questions.
1. Is this RMI "system" dependent on the server having an Http server?If you want to have the client download the server stubs, then they have to be on an http server (I think a ftp url for the codebase may also work, but I have not tried it).
2. If it isn't, how do I define the codebase other than "http://..."?
You may be able to use a ftp url in which case the url would be "ftp://....."
3. If it is (and the machine certainly does have an http server on it), how do I > specify the codebase URL for the clients, given that the server is not "under"
the http server (IYSWIM)?The downloaded class files do not have to be on a http server that is on the same host as the RMI server. The RMI server's codebase can be any valid url (reachable from the clients) The only requirement is that the class files be reachable via the codebase. You do have to configure the client's network security so that it has permission to open connections to the codebase server.

Similar Messages

  • Rmi +codebase

    I�ve a problem connecting my webstart rmi-client to a rmi-server.
    The webstart rmi client downloads the stubs from the server codebase. So far this is the right behaviour.
    After that the client tries to download the remote interface from the server codebase although the remote interface classes are in the client jar (!?).
    It seems to be that this is a codebase related problem in webstart because
    when I start the client without webstart, everything works fine (i.e. the client only downloads the stubs).
    thanks
    p.s.
    The codebase is set on the server (Djava...) and as mentioned above the remote interfaces are in the client jar and the stubs are
    not.

    Hi,
    I'm not sure I completely understand. JWS will download the jars specified in the JNLP file unless they are marked as lazy, in which case it'll donwload them when it thinks it needs them.
    What I did in my app (which also uses RMI) was to package all stubs in their own JAR. This can then be used by server and client. The server implementation is not available to the client (not specified in the JNLP file). Common interfaces are in a common JAR, client code in a client JAR and server code in a server JAR.
    The client, then, downloads the client JAR, the common JAR and the stubs JAR. No classes/interfaces are in more than one JAR, since this can be confusing.
    I don't know how JWS decides to download lazy JARs, but it maybe that you've managed to confuse it. You may be able to unfonfuse it by ensuring a clean separation between client, server and common items in your application, and not duplicating resources in different JARs.
    Rhys

  • How to include spaces in rmi codebase value url?

    I am writing an RMI application to run on a LAN, and for my codebase value I am using an URL with the format file:///d:\dir1\dir2\.xx.jar, where the path points to a directory on the server's hard drive. I need to accommodate the situation where dir1 or dir2 contains a space. When I simply use the space (e.g. d:\program files\dir2\xx.jar), I get a java.net.MalformedURLException. When I substitute %20 where the space is, (e.g. d:\program%20files\dir2\xx.jar), the URL is accepted but I get a java.lang.ClassNotFoundException. I know the java.lang.ClassNotFoundException is not due to a path problem (I tested with an identical directory structure, except that I used a path whose directories contained no spaces -- and everything worked). So I infer that the reason for the java.lang.ClassNotFoundException is that no directory with the name "program%20files" exists on the hard drive.
    Any advice would be most appreciated.

    This is not a bug that Java have to solve, it is the
    way URL's should be formed.Actually this is a very bad bug in Java. URL's are just absolute URI's (according to the RFC's, but in Java, URL has little to do with URI), which donot_ allow spaces: spaces must be encoded. When the original URL class was written the RFC's were ignored, and spaces were allowed. Now there is a URI class that works properly (not allowing spaces) which is contradictory to URL.
    Worst of all, creating a URL is ambiguous. In the URL
    "file:/tmp/foo%20bar.txt"
    is this the encoded version of a file with a space, or is it the unencoded version of a file with '%' '2' '0' characters in it? There are regression bug reports for places where this has changed behavior in the Java library (something about RMI for those interested).
    SUN refuses to fix URL because of all the legacy code that relies upon this bug. There are many bug reports, (search the Bug Database for "URL space") often marked simply "will not fix".
    http://developer.java.sun.com/developer/bugParade/bugs/4273532.html
    This is a nasty little problem, and I don't think it can be solved without making a new URL class which behaves correctly, and deprecating the old class. Well, you could also just fix URL and break legacy code :)

  • Trouble with RMI codebase

    Hi, i've created a file transfer application via RMI, it work very well, i can transfer file longer than 1 GB without any problem.
    But when i copy my project with all classes to another directory, it doesn't work. I'm sure that the trouble is in the VM options :
    "-Djava.rmi.server.codebase=file:E:\RMIFileTransfer\classes\ -Djava.security.policy=file:E:\RMIFileTransfer\policy\RMI.policy ", that points to the old directory. I don't want to change "E:\RMIFileTransfer\" in the VM options each time i move my project!!!
    How can be java.rmi.server.codebase and java.security.policy properties setted by an user input, or in the main( String args[] ) method? (sorry for my bad english...)

    (a) use a JAR file, not a directory system
    (b) the codebase setting has to have the same meaning throughout the system, i.e. to the server, the registry, and the client. Obviously a file: URL is not likely to comply, because every host has its own file system. Have a look into providing the JAR file via an HTTP service and using an http: URL.

  • Jar file as RMI codebase

    Please tell me I'm missing something:
    I have an RMI server that works fine. All I want to do now is package it in a jar file...Sounded easy enough when I got started.
    According to the RMI tutorial, the value of the codebase property can refer to
    1. The URL of a directory in which the classes are organized in package-named sub-directories.
    OR
    2. The URL of a JAR file in which the classes are organized in package-named directories.
    OR
    3. A space-delimited string containing multiple instances of JAR files and/or directories that meet the criteria above.
    Setting the codebase property on the commend line like this:
    -Djava.rmi.server.codebase=file:/my_dir/my_jar_file.jar
    gives an UnmarshalException with a nested ClassNotFoundException indicating that my Stub file is missing.
    However, if I unpack the jar to the directory my_dir/classes and use
    -Djava.rmi.server.codebase=file:/my_dir/classes/
    then everything works fine... so I know there are no files missing from the jar file
    Any ideas?
    Thanks in advance,
    Matt.

    jquattro, thanks for the reply. Only problem is that I'm adding to a pre-existing jar file rather than creating a new one, so I don't want to change it other than adding the extra classes.
    I found that it worked fine on a Windows box, so I tried a different jdk on unix, and found that it works fine if I use the jdk1.3 RMI registry - so it appears it might have been a bug in jdk1.2 on Unix.

  • Problems with RMI Codebase

    Hello,
    i have installed Tomcat in a path with whitespaces. Our Application use RMI (as server componend) to communicate with other Applications.
    when I start Tomcat i get an Exception like this:
    (by the way: no protocol: Audit -> Audit is a part of the path with whitespaces and it is nessessary that the tool runs with whitespaces in the path e.g. Program Files)
    java.rmi.ServerException: RemoteException occurred in server thread; nested exce
    ption is:
    java.rmi.UnmarshalException: error unmarshalling arguments; nested excep
    tion is:
    java.net.MalformedURLException: no protocol: Audit
    at sun.rmi.server.UnicastServerRef.oldDispatch(UnicastServerRef.java:352
    at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:207)
    at sun.rmi.transport.Transport$1.run(Transport.java:148)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
    at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:4
    i have write a system parameter with -djava lfor rmi.server.codebase ike this and qoute the whitespaces with %20 but it doesn' t work.
    file://d:/test/Tool%20Audit/
    Please help me, its urgent.
    Best regards
    Chris

    Hi Chris,
    the Exception java.net.MalformedURLException: no protocol: Audit means that your path is incorrect, try
    <protocol>://<path>/
    for Example
    http://.../Audit
    ftp:/.../Audit
    file://../Audit

  • RMI Codebase Issue

    Every thing works just fine as both the Client and server runs on the same system,, but as i run one of them on a remote m/c,well i am using vmware for that, Client is not able to locate server's stub and server is not able to locate clients classes for dynamic loading..
    I am sure its an issue with the way i set the codebase url's but how should i change them.
    presently, i set them as
    file:/E:/surshikradmin/workspace/rmi-server/bin/ for server..
    and kind of same way for client.. should i add the host name too,,but how??? Any help would be highly helpful since its been years i am dealing with issue and solving it will make ma project go rock..
    Client side stack trace if it coul help!
    Computeappengine exceptionerror unmarshalling return; nested exception is: java.lang.ClassNotFoundException: Engine.ComputeappEngine_Stub java.rmi.UnmarshalException: error unmarshalling return; nested exception is: java.lang.ClassNotFoundException: Engine.ComputeappEngine_Stub at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source) at Client.computeappprog.main(computeappprog.java:23) Caused by: java.lang.ClassNotFoundException: Engine.ComputeappEngine_Stub at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at java.lang.ClassLoader.loadClass(ClassLoader.java:247) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:247) at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:432) at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:163) at java.rmi.server.RMIClassLoader$2.loadClass(RMIClassLoader.java:620) at java.rmi.server.RMIClassLoader.loadClass(RMIClassLoader.java:247) at sun.rmi.server.MarshalInputStream.resolveClass(MarshalInputStream.java:197) at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1574) at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1495) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1731) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350) ... 2 more

    Crossposted and answered here

  • Rmid activation fails if rmi codebase host down.

    Dear activation/rmid gurus.
    I have trouble with rmid activation when the host storing the codebase is down. I understand that it can't activate as long as the codebase host is down but should'nt rmid keep trying in regular intervals in case the codebase host appears.
    Imagine a restart of a rmid host machine have the codebase on a local webserver (on the same host). If the rmid service is started before the webserver is up and running the activation system will not start correctly. In this case its pretty easy to fix the codebase host dependency by making sure the webserver is started before the rmi service.
    Its more troublesome when the codebase is located on another host on the network. If the machines goes down, e.g. due to a powerfailure, and the rmid host machine restarts faster than the codebase host the activatable object will be out of business.
    Is there some way to ensure that the rmid deamon keep trying activation its activatable objects?
    \Magnus

    After some tests I finally got it working...
    It appears as as the java.rmi.server.hostname property needs to be set on the java interpreter running rmid. This is achieved by passing
    -J-Djava.rmi.server.hostname=yoda as argument to rmid.
    \Magnus

  • RMI-Codebase Stuff... (woreks only on Windows machine)

    Hi,
    habe mein Programm auf meiner Windowskiste laufen und was soll ich sagen :) es l�uft.
    Ich kann Objekte f�r den Remotezugriff zur Verf�gung stellen, kann vom Client darauf zugreifen und wunderbar. Die Stubs habe ich dazu auf meinen Webserver gelegt und die codebase wie folgt als zus�tzliches Argument f�r den JVM angegeben:
    -Djava.rmi.server.codebase=http://meinserver.de/classes/
    Lange Rede kurzer Sinn: Es l�uft einwandfrei.
    Nun zum Problem:
    Habe das gleiche nun auf einer LinuxKiste vesucht und dort geht es nicht.
    Programm kompiliert einwandfrei, nur das "�ffentlich machen" der Objekte klappt nicht. Ich bekomme so eine seltsame UnmarshalException mit einer genesteten ClassNotFoundException. Das Ganze deutet laut stundenlangem Googeln auf eine nicht korrekte Codebase hin. Sie ist aber korrekt, benutze den gleichen String an der gleichen STelle wie auf dem Windowsrechner. Mein Webserver loggt auch keinerlei aktivit�t mit. Der Linuxrechner versucht also gar nicht an die stubs auf dem Server zu kommen.
    Woran kanns liegen? Muss man bei Linux mehr beachten als bei Windows?
    mfg
    Hi there,
    i wrote a litle program. It works fine on my windows machine (XP, sun-jdk-1.5.0, Netbeans 4.0) I can create objects, and bind them to rmi-registry. (I am using the embedded rmiregistry from OpenJMS.) A client can lookup them using the naming.lookup(�blabla�) method. Therefor I put the stub-files on my webserver. The codebase is placed on this server.
    -Djava.rmi.server.codebase=http://myserver.de/classes/
    Everything works fine!
    THE PROBLEM:
    When I start the same program on my linux machine (Gentoo, sun-jdk-1.5.0, netbeans 3.6) I get an UnmarshalEception with a nested ClassNotFoundException. I am using the same codebase as on the windows machine. I recognized, that there is no access to the stub-files on my web server when I start it. (The logs do not change) I do also use the same version of embedded rmi-registry (in OpenJMS). Everything is the same, but the operating system.
    What can cause this problem? I imagine that java is not allowed to contact the webserver, but there is no firewall, nothing that could forbid it, but java itselfs.
    I tried to use a policyfile. So I created a file called: rmi.policy with this content:
    grant
    permission java.security.AllPermission;
    I addet this policy to the vm as argument with thi command:
    -Djava.security.policy=http://myserver.de/rmi.policy
    when I now start the program I can see in the web server logs, that there is access to the rmi.policy file. That means, the VM is fetching it an (maybe) read it! But there is still the UnmarshalException an no access to the stub-files on the webserver.
    It would be very helpful if somebody could help me.

    I have a problem similar to yours with corba protocol.

  • RMI codebase syntax

    Greetings,
    Can anyone inform me of the proper syntax for a relative classpath when setting the codebase property for RMI directory binding? I have all my classes in a subdirectory .\classes relative to my current directory. If I specify the file location explicitly, as in the following command:
    java -cp .\classes -Djava.rmi.server.codebase=file:/c:\currentdir\classes/ RMIServer
    the server works fine. But when I try the following:
    java -cp .\classes -Djava.rmi.server.codebase=file:/.\classes/ RMIServer
    the registry cannot find the RMIServer_stub file in the \classes directory. I've tried numerous permutations to no avail, and I can't find any documentation on the syntax. I need to set a relative path so this server can be loaded onto any machine in any directory.
    Any help would be appreciated.

    Well, I didn't get any reply when I submitted this question on graveyard shift, perhaps the daytime forum folks can help (or I should delineate: North and South American daytime folks; and, perhaps Asian, African, Australian or European evening folks may still be online. Let's not leave out Antarctica...it's possible).
    Does anyone know the answer to the above post or where I can find the documentation for the syntax?
    Thanks in advance.

  • RMI Codebase Passing Arguments

    I'm new to RMI and Java.How do you pass arguments using serialization in RMI? I'll be passing the arguments from a servlet. for example if i want to pass a string object from a servlet to the calling client service. Thanks

    Can you please provide me with a better direction in terms of developments (i.e examples)? thank you

  • -Djava.rmi.server.codebase Question.

    When I study the meaning of codebase in
    http://java.sun.com/j2se/1.3/docs/guide/rmi/codebase.html
    , I am still confuse what is different between codebase
    settings in Remote Object side and RMI Client side.
    The command options -Djava.rmi.server.codebase=
    http://myHost/myDir and -Djava.rmi.server.codebase=
    http://wwwserver/mydirectory ( in Figure3 and Figure4 of
    http://java.sun.com/j2se/1.3/docs/guide/rmi/codebase.html
    ) are set in which side ??
    The option in Remote Object side seems no any work.
    Who can explain its meaning ??
    Thank you in advance... Alan.

    Hi,
    For the dynamic class loading to work, you should give
    -Djava.rmi.server.codebase=http://some-server/
    you can see that it supports http protocol.. So there should be one web server running on the server side so that client can call it by name or by IP address.. Then try running the program again. now it will work..
    actually you should give this option on client side as it is the client who needs this property.. so in order to download classes the server machine should be addresable to the client in any method. if it is a LAN, try giving '\\computer-name' in the value of the property.. I haven't tried this, but I think you dont need a http server this time.. I am not sure abt this,,. check it out..
    - Bibin.

  • Error in trying dynamic class loading in sun rmi tutorila

    Hi,
    I am trying the sun rmi tutorial http://java.sun.com/docs/books/tutorial/rmi/. I am not able to download the stub class from the codebase to client. The server is running in a linux box while the client in a w2k box.
    Linux box (server)
    ==================
    web server setting
    Alias /rmi_codebase /home/wing/try/java/rmi
    rmiregistry setting
    unset CLASSPATH
    rmiregistry
    rmi server
    classses
    /home/wing/try/java/rmi/client/ComputePi.class
    /home/wing/try/java/rmi/client/Pi.class
    /home/wing/try/java/rmi/compute/Compute.class
    /home/wing/try/java/rmi/compute/Task.class
    /home/wing/try/java/rmi/compute/ComputeEngine.class
    /home/wing/try/java/rmi/compute/ComputeEngine_Skel.class
    /home/wing/try/java/rmi/compute/ComputeEngine_Stub.class
    java.policy
    grant {
    permission java.security.AllPermission;
    startup with script as follows
    java -cp /home/wing/try/java/rmi -Djava.rmi.server.codebase=http://localhost/rmi_codebase/ -Djava.rmi.server.hostname=man82.air.com.hk -Djava.security.policy=/home/wing/try/java/rmi/java.policy
    engine.ComputeEngine
    (the server is started happyily)
    W2k box (client)
    ================
    class the same as server except removing the stub (ComputeEngine_Stub).
    java.policy
    grant {
    permission java.security.AllPermission;
    startup script
    java -Djava.rmi.server.codebase=http://man82/rmi_codebase/ -Djava.security.policy=java.policy clientComputePi man82 20
    The error encounter is
    ComputePi exception: error unmarshalling return; nested exception is:
    java.lang.ClassNotFoundException: engine.ComputeEngine_Stub
    java.rmi.UnmarshalException: error unmarshalling return; nested exception is:
    java.lang.ClassNotFoundException: engine.ComputeEngine_Stub
    at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
    at java.rmi.Naming.lookup(Naming.java:83)
    at client.ComputePi.main(ComputePi.java:14)
    Caused by: java.lang.ClassNotFoundException: engine.ComputeEngine_Stub
    at java.net.URLClassLoader$1.run(URLClassLoader.java:198)
    at java.security.AccessController.doPrivileged(Native Method)
    Is this problem related to codebase setting or security?
    BTW, I have tried to put the stub to the client as well, it works.
    Thanks in advance of any ideas or input.
    Wing

    Based on my previous post, I have performed some more testings of the tutorial code and find that the java.rmi.server.codebase could not be specified in the client side.
    Instead, the client follows the codebase set in the server, and thus, the localhost could not used in the server when the client is in separate machine.
    This is a bit different from the tutorial, please enlighten me if you have any comments.
    To make the dynamic download works,
    server side
    change the codebase property from http://localhost/rmi-codebase/ to http://man82/rmi_codebase/
    client side
    remove the codebase property http://man82/rmi_codebase/
    It is funny that if I add the codebase property when start up the client, it won't work.
    Thanks in advance for any ideas and input.
    Wing

  • Dynamic code downloading using RMI

    Hi,
    Can somebody please explain what are the nesesary steps to set up a class server.
    I have made a ClassServer.
    It is running...
    Another RMI server is running on this machine which has method to return object of an Interface
    Client code has an instruction - System.setProperty("java.rmi.server.codebase", "http://127.0.0.1:2020");
    When this client requests Interfeace from server I get following exception
    $ java.rmi.UnmarshalException: error unmarshalling return; nested exception is:
            java.lang.ClassNotFoundException: com.rasa.interface.InterfaceImpl1
    java.lang.ClassNotFoundException: com.rasa.interface.InterfaceImpl1
            at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
            at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
            at java.lang.Class.forName0(Native Method)
            at java.lang.Class.forName(Class.java:195)
            at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:367)
            at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:88)
            at sun.rmi.server.MarshalInputStream.resolveClass(MarshalInputStream.java:145)
            at java.io.ObjectInputStream.inputClassDescriptor(ObjectInputStream.java:918)
            at java.io.ObjectInputStream.readObject(ObjectInputStream.java:366)
            at java.io.ObjectInputStream.readObject(ObjectInputStream.java:236)
            at java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1186)
            at java.io.ObjectInputStream.readObject(ObjectInputStream.java:386)
            at java.io.ObjectInputStream.readObject(ObjectInputStream.java:236)
            at sun.rmi.server.UnicastRef.unmarshalValue(UnicastRef.java:300)
            at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:134)
            at com.rasa.server.MainServer_Stub.getInterface(Unknown Source)
            at com.rasa.client.ProgramImpl.run(Unknown Source)can someone please explain why this is happning.
    note Interface implementation also implements Serializable
    Thank you

    sorry I thought you were trying to download the stubs
    only...
    try this:
    http://java.sun.com/j2se/1.4.1/docs/guide/rmi/codebase.
    tmlyes followed everystep from there, but no luck

  • RMI example just doesn't work (jdk1.5.0_01+jdk1.5.0)

    Hi!
    RMI example from the "Getting Started Using Java RMI" (http://java.sun.com/j2se/1.5.0/docs/guide/rmi/hello/hello-world.html) doesn't work.
    Everything compiles fine , but when starting server with a command:
    java -classpath test example.hello.Server
    it says (on Linux Fedora Core 2):
    Server exception: java.lang.NullPointerException
    java.lang.NullPointerException
    at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247)
    at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)
    at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:343)
    at sun.rmi.registry.RegistryImpl_Stub.bind(Unknown Source)
    at example.hello.Server.main(Server.java:61)
    On the Windows( XP SP2) it says:
    Server exception: java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
    java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
    java.lang.ClassNotFoundException: example.hello.Hello
    java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
    java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
    java.lang.ClassNotFoundException: example.hello.Hello
    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)
    at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247)
    at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)
    at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:343)
    at sun.rmi.registry.RegistryImpl_Stub.bind(Unknown Source)
    at example.hello.Server.main(Server.java:61)
    Caused by: java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
    java.lang.ClassNotFoundException: example.hello.Hello
    at sun.rmi.registry.RegistryImpl_Skel.dispatch(Unknown Source)
    at sun.rmi.server.UnicastServerRef.oldDispatch(UnicastServerRef.java:375)
    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)
    Caused by: java.lang.ClassNotFoundException: example.hello.Hello
    at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:242)
    at sun.rmi.server.LoaderHandler.loadProxyInterfaces(LoaderHandler.java:707)
    at sun.rmi.server.LoaderHandler.loadProxyClass(LoaderHandler.java:651)
    at sun.rmi.server.LoaderHandler.loadProxyClass(LoaderHandler.java:588)
    at java.rmi.server.RMIClassLoader$2.loadProxyClass(RMIClassLoader.java:628)
    at java.rmi.server.RMIClassLoader.loadProxyClass(RMIClassLoader.java:294)
    at sun.rmi.server.MarshalInputStream.resolveProxyClass(MarshalInputStream.java:238)
    at java.io.ObjectInputStream.readProxyDesc(ObjectInputStream.java:1494)
    at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1457)
    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1693)
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:339)
    ... 9 more
    Is it possible to make it work somehow?
    Thank you!
    Dmitriy Ulupov

    There is quite enough data in the exception to figure this out, and the answer is 'none of the above'. Have a look at this:
    java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
    java.lang.ClassNotFoundException: example.hello.Hello
    java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
    java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
    java.lang.ClassNotFoundException: example.hello.Hello
    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)
    at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall .java:247)
    at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)
    at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:343)
    at sun.rmi.registry.RegistryImpl_Stub.bind(Unknown Source)The basic problem is java.lang.ClassNotFoundException: example.hello.Hello
    and it occurs remotely when executing Naming.bind, i.e. it happens in the Registry. In other words the Registry cannot find examples.hello.Hello. There are several solutions to this including modifying the Registry's classpath or using the RMI codebase feature.

Maybe you are looking for

  • Free goods determination with Free of charge delivery

    Hello After maintaining the Free goods Determination Record for a material using VBN1, when I create the order with order type OR, the free goods gets determined, where as when I create the order with order type FD, the free goods does not get determ

  • Interactive Report - Is it possible?

    Hi again, I wondered if it possible in SQL Server Reporting Services 2008 R2, to create a report which an end user can input Comments into. The comments would be free text and wouldn't for part of the Views/Table where the Datasource comes from. This

  • Since iOS5 upgrade, I have a lot of sync errors

    Hello all, I really need help here. Here is the story. 1. Plugged in my iPhone to upgrade to iOS5. 2. I did a backup first and everything went ok 3. I click on update and the process started and everything went fine until... For some reason, when the

  • Install inDesign, mac, click on try

    Hey there, I just payed and downloaded inDesign for my mac. I am trying to run the setup now, but as soon as I click on 'try Indesign CS6' it tells me that there is no ADOBE Indesign abonoment available. So I am not even able to enter my password, et

  • Integration of E-Recruiting solution with Portal

    Hi All, I am working on E-recruiting integration with Portal. If any of you have already done this before. I am not not able to get any business content for the same. I wanted to know how we should start. I already have config document for E-rec 3.0