Which RMI server ?

i want to learn RMI . which server do i need to run RMI application ?
tomcat ? JBoss ? which one i should download ? please tell me the name of the server

http://java.sun.com/docs/books/tutorial/rmi/

Similar Messages

  • Urgent Help Required For Starting RMI server from servlet.

    I am currently working on rmi project.
    I want to send request to remote machine(Web host) where my application is from desktop client .For that we are using RMI.
    I am writing servlet and inside it i am binding object to registry for rmi server.
    which will be deployed on remote server.
    code ....
    Registry reg;
    reg=LocateRegistry.createRegistry(1099);
    Server server=new Server("server");//class whose remote object to be accessed
    //extends unicast remote object.Implement ServerInt interface which extends Remote.
    reg.bind("server",server);
    When i am trying to access this object i am getting following exception.
    javax.naming.CommunicationException [Root exception is java.rmi.UnmarshalExcepti
    on: error unmarshalling return; nested exception is:
            java.lang.ClassNotFoundException: ServerModule.ServerInt]
    at com.sun.jndi.rmi.registry.RegistryContext.lookup(Unknown Source)
    at com.sun.jndi.toolkit.url.GenericURLContext.lookup(Unknown Source)
    at javax.naming.InitialContext.lookup(Unknown Source)
    at RequstReplication.main(RequstReplication.java:27)
    Caused by: java.rmi.UnmarshalException: error unmarshalling return; nested excep
    tion is:
    java.lang.ClassNotFoundException: ServerModule.ServerInt
    at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
    ... 4 more
    Caused by: java.lang.ClassNotFoundException: ServerModule.ServerInt
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Unknown Source)
    at sun.rmi.server.LoaderHandler.loadProxyInterfaces(Unknown Source)
    at sun.rmi.server.LoaderHandler.loadProxyClass(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)
    ... 5 more
    I can access naming enumeration of registry and object bound to it.
    by following program.I shows corect objects.
    Context namingContext=new InitialContext();
    NamingEnumeration<NameClassPair> e=namingContext.list("rmi:");
    while(e.hasMore())
    System.out.println(e.next().getName());
    While when i start RMI server from simple java program i can access these objects from registry.
    I am not getting what is problem problem.Is there any other way to send request?
    Plese give quick response.

    I am currently working on rmi project.
    I want to send request to remote machine(Web host) where my application is from desktop client .For that we are using RMI.
    I am writing servlet and inside it i am binding object to registry for rmi server.
    which will be deployed on remote server.
    code ....
    Registry reg;
    reg=LocateRegistry.createRegistry(1099);
    Server server=new Server("server");//class whose remote object to be accessed
    //extends unicast remote object.Implement ServerInt interface which extends Remote.
    reg.bind("server",server);
    When i am trying to access this object i am getting following exception.
    javax.naming.CommunicationException [Root exception is java.rmi.UnmarshalExcepti
    on: error unmarshalling return; nested exception is:
            java.lang.ClassNotFoundException: ServerModule.ServerInt]
    at com.sun.jndi.rmi.registry.RegistryContext.lookup(Unknown Source)
    at com.sun.jndi.toolkit.url.GenericURLContext.lookup(Unknown Source)
    at javax.naming.InitialContext.lookup(Unknown Source)
    at RequstReplication.main(RequstReplication.java:27)
    Caused by: java.rmi.UnmarshalException: error unmarshalling return; nested excep
    tion is:
    java.lang.ClassNotFoundException: ServerModule.ServerInt
    at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
    ... 4 more
    Caused by: java.lang.ClassNotFoundException: ServerModule.ServerInt
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Unknown Source)
    at sun.rmi.server.LoaderHandler.loadProxyInterfaces(Unknown Source)
    at sun.rmi.server.LoaderHandler.loadProxyClass(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)
    ... 5 more
    I can access naming enumeration of registry and object bound to it.
    by following program.I shows corect objects.
    Context namingContext=new InitialContext();
    NamingEnumeration<NameClassPair> e=namingContext.list("rmi:");
    while(e.hasMore())
    System.out.println(e.next().getName());
    While when i start RMI server from simple java program i can access these objects from registry.
    I am not getting what is problem problem.Is there any other way to send request?
    Plese give quick response.

  • Cant create JDBC Connections in RMI Server

    I am having a pretty weird problem which I am struggling with for the last three days. In the main method of the Server object, following three things are supposed to happen:
    1) Creation of a JDBC Connection
    2) Creation of a Remote Object and then publishing the same to Registry.
    3) Creation of another JDBC Connection (exactly same as in step1)
    step 1 and 2 successfully executes and the third one always errors out. I just simply get a NullPointerException.
    If I comment out step 2, step 3 executes successfully. Can someone please tell me the mystery? I need your response really urgently so please help me.
    TIA
    Code Snippet:
     public static void main(String[] args) {
      System.setSecurityManager(new RMISecurityManager());
      try {
       Properties dbProps = new Properties();
       dbProps.put("user", "SDAWOODI");
       dbProps.put("password", "SDAWOODI");
       java.sql.Connection connection =    java.sql.DriverManager.getConnection("jdbc:oracle:thin:@wonder.cisco.com:1521:ODSDEV", dbProps);
      catch (Exception sqle) {
       System.out.println("[11111]"+sqle.toString());
      Properties props = new Properties();
      props.put("java.rmi.server.codebase", rmiCodeBase);
      System.setProperties(props);
      try {
       SchedulerRImpl schedulerR = new SchedulerRImpl(ssce_sch1);
       String nameStr = "s-sce-scheduler";
       try {
        Naming.bind(nameStr, schedulerR);
        if (Scheduler.m_debug_flag) System.out.println("[Scheduler.main] Scheduler bound with RMI registry!!!");
       catch (AlreadyBoundException abe) {
        if (Scheduler.m_debug_flag) System.out.println("[Scheduler.main] Scheduler is already bound with RMI registry ... trying RE-bind ...");
        try {
         Naming.rebind(nameStr, schedulerR);
         if (Scheduler.m_debug_flag) System.out.println("[Scheduler.main] Scheduler RE-bound with RMI registry!!!");
        catch (Exception e) {
         if (Scheduler.m_debug_flag) System.out.println("[Scheduler.main] Rcheduler RE-binding failed :(((");
      catch (Exception e) {
       if (Scheduler.m_debug_flag) System.out.println("[Scheduler.main] SchedulerR instantiation failed:((( : "+e.toString());
      Properties dbProps2 = new Properties();
      dbProps2.put("user", "SDAWOODI");
      dbProps2.put("password", "SDAWOODI");
      try {
       java.sql.Connection connection2 = java.sql.DriverManager.getConnection("jdbc:oracle:thin:@wonder.cisco.com:1521:ODSDEV", dbProps2);
       if (connection2==null) {
       System.out.println("connection is NULL");
      else {
       System.out.println("connection is NOT null");
     catch (Exception sqle2) {
      System.out.println("[22222]"+sqle2.toString());
    }

    In reply to reply #4:
    You can also quote the other part of my reply when it comes to snippets. There are so many pieces of code missing from your snippet that I simply cannot guess what is wrong. (Please do not put your entire class structures here.)
    We get connections in many different classes at many different times. It is after all an application that does user work and the user work involves database accesses. Some of those accesses are before RMI (to establish repositories, etc). Most are after.
    This URL (jdbc:oracle:thin:@wonder.cisco.com:1521:ODSDEV) appears to use a network connection (yes?). Is the 1521 a port? Are you trying to reuse this port? (the first conn uses the same URL). What port does RMI use?
    There is nothing in your snippet that stands out obviously as "this is wrong".
    RMI uses networking. JDBC uses networking.
    Try substituting some other networking code in place of the RMI code and see if you still get a null trying the second connection. As you say, if you leave out the RMI code the second get.conn works.
    Try leaving out the first get.conn. Do the RMI and second get.conn.
    Try this and try that and try some more. I once had this problem with a network printer that would not print. The code was fine. The URL was fine. The response from the network and printer were both fine. The damn thing just wasn't printing. Turns out there was this bit, yes a single bit, in one word of a property called the "start print bit". If this bit wasn't on, nothing happened. I tried every combination until I finally found it.
    I wish you the best.

  • RMI server appears to deadlock but is fine after...

    I have a RMI server that is providing services to clients on my network.
    When I run tests from the clients (an app that constatnly makes demanding method calls to the RMI server) everything runs fine.
    I have one Windows 2000 client and one Slackware Linux 10.1 client, everyone has the same version JVM. They both run the "stress test" at the same time. The Server is a Windows XP MCE on a dual core Processor, the OS has been configured to run both processors.
    Both clients run for hours (all day) and so does the server without problem. Except sometimes I come back and it looks as though my clients are expererinceing some type of deadlock and when I check the server it is sitting there not doing anything as if everything is deadlocked.
    Now the magic, at the server console I smack a few keys on the keyborad and everything jumps back into business humming along just fine.
    What the heck? I have had this happen more than once. My apps have no input facilities whatsoever except CTRL+C which I use to kill them when I'm done with my "stress test".
    I have noticed Windows clients can kinda drag everyone else down because of the way it schedules threads.
    Any ideas?
    Sean

    Sometimes thread prioroties can be used effectivly on
    Windows if you are having problems with your WINDOWS
    machines handling the threads "properly". But not
    much use really.
    For testing? OK.
    I have been developing and testing parallel threaded
    applcations and it would not be possible without a
    dual-processor machine (properly configured).
    Number of processors is irrelevant. Why do you think this makes any difference at all?
    You cannot test threaded applications on a single
    processor. Single processor runs ONE thread at a
    time. Dual-Core or dual processors can run THREADS
    in parallel. I've seen it work, beautifully. your
    threaded app may run fine on one processor BUT if you
    run it on a dual machine it may break. In computer
    science parallel computing has been around for a long
    time but the majority of people (programmers) have no
    idea about it whatsoever and there is a lot of
    misconceptions.
    I happen to have a Masters in distributed computing. I quite enjoy it. And I still insist that a dual core system is not going to do anything to your threads that a single core system won't do to your threads.
    I challenge you to write a program that can tell the number of processors present, without checking the system property. If the OS is properly written and the chipset is working as it should, your program can not tell.
    One thing I see repeated is that dual-core machines
    have liitle impact on performance because most
    applications have only a single thread. Horse
    feathers!!! Windows and any other OS is going to run
    applications in parallel!! I have noticed a nice
    improvemnet in basic operations on a dual-core
    (properly configured).
    applications don't run in parallel, threads do. adding a 2nd core may make your computer more responsive if the OS preemptive scheduler is poorly written. Otherwise its no different than adding a faster CPU.
    This is a wonderful subject (Parallel Computing, the
    new PC)and I'm hooked (bad) mainly because this area
    is almost unexplored by the masses and there is a lot
    of work (read innovation) that needs done in the next
    decade on the software end. If you like serious PC
    check out Solaris (awsome).I love it. I was working on parallel code in Linux several years back while in school. Its not unexplored really. Search for distributed computing and you will find lots of info. The thing that is new is the attempt to take advantage automagically of multi cpu by programs that were not written to take advantage.
    >
    P.S. My dual-core 1gig SATA (XPS) Dell machine just
    caught up with my PIII single CPU 512mb SCSI U-160
    (500sc)machine in total throughput. seat-of-pants
    All this swapping has to go.
    Sean
    Message was edited by:
    DataVirtueMy last dual cpu machine was a abit BP6 dual celeron. Its a nice novelty, but buying dual/cpu dual core makes no sense unless the fastest single CPU is not fast enough or the price is right. Dual-cores has come about because the CPU folks are having difficulty making the single CPUs faster. Its a cop-out really. Instead of advancing technology, they add a 2nd CPU and try to act like they did something.
    Anyone that chooses a dual-core CPU over a twice as fast single core CPU either does not understand distributed computing, or enjoys the novelty.

  • RMI server fails on a few PCs, works on others

    I have a small RMI server, started on various PC, to which a UNIX server connects to send them messages.
    On each PC I have :
    - An RMI registry.
    - A Java RMI server, ready to receive messages from the UNIX machine.
    All the PC are running Win NT 4 SP6, and the JRE 1.3.1.
    On some PC, when the RMI server receives a RMI call from the UNIX machine, I get this error on the UNIX side :
    java.rmi.UnmarshalException: Error unmarshaling return; nested exception is:
    java.io.InvalidClassException: pop2PcServer_Stub; Local class not compat
    ible: stream classdesc serialVersionUID=2 local class serialVersionUID=385818717
    3882730883
    at sun.rmi.registry.RegistryImpl_Stub.lookup(RegistryImpl_Stub.java:107)
    at java.rmi.Naming.lookup(Naming.java:60)
    at pop2Pc.main(pop2Pc.java:41)
    It happens every time when these specific PCs are involved.
    I tried everything : the programs don't use a security manager, the PC part starts the registry itself (instead of relying on a separate rmiregistry process). Whatever I do. I can't make the RMI process work correctly on these PC.
    I really don'ty understand, because my program is identical in every case.

    Unfortunately, this is already the case. The classe have been all compiled on the Unix server, and every time they are all bundled in a jar file which is on every PC the same.
    On all the PC I also bundle the JRE 1.3.1 in a subdirectory of my program. With the PATH and CLASSPATH variables I directly point to it, as well as to the jar file.

  • Java.rmi.server.SkeletonMismatchException: interface hash mismatch

    I am trying to get a MBORemoteSet from the session, which actually gives me the list from the database table. when i click on a combo box returning me the list using the MBOSetRemote object it throws me the exception.
    could not load the labor codes from Maximo
    java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
         java.rmi.server.SkeletonMismatchException: interface hash mismatch
    java.rmi.server.SkeletonMismatchException: interface hash mismatch      
    at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:240)      
    at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:215)      
    at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:349)      
    at worktech.app.labor.WTLaborSet_Stub.setWhere(Unknown Source)

    Well this error occurs if the RMI files are different on the server and client side.
    It basically tells you that the stub and skeleton don't match with each other. Get the latest version of the RMI jar file or whatever file you are using on the server side to replace the file you are using oon the client side. This would make stub and skeletons to communicate with each other effectively . enjoy :)

  • RMI server and client in one application - Exceptions during some calls

    I wrote an application, which is an RMI-Server (Server1), and another separate application, which is an RMI-Client (Client1). Because I wont use dynamic class loading, I gave the client beside the interface.java also an interface_implementation.java, which is only a dummy of the original interface_implementation of the server. This dummy contains only declarations of the methods (parameters and return values) and no functional code. From this dummy the _stub.class is generated, and it works fine - no problem.
    Now I want to modify Client1 to become also an RMI-Server (Server2) for a second, separate Client (Client2), the methods used are different from the first RMI connection. This Client2 uses a dummy of the implementation of Server2 in the same way as described above. The application Client1+Server2 only has to "translate" the calls from Client2 to Server2 into calls of Client1 to Server1 (Server1 is not changed at all). In case of primitive method parameters or return values this chain of RMI-applications works fine, but in case of more complex structures (my own classes) during the call of Client1 to Server1 an "ClassNotFoundException: access denied to class loader" occurs by running through the stub. Both stub.classes are found, all of the applications know the objects needed, the call of Client1 to Server1 is exactly the same call as it was during the simple version (only Server1 and Client1).
    Does anybody know, why this exception occurs and how I can overcome this ?
    Axel

    I figured out a solution - it's a problem of policies. In detail: Server1's codebase entry (file:) refers to the class directory of Server1's project. In the simple case of only Client1, which has no codebase entry, it works fine without a file permission on the side of Server1. In the complex case of Client1+Server2, which has to have a codebase entry (file:) refering to the class directory of the Server2's project on a separate machine, for exactly the same method call from Client1 to Server1 a file permission entry on the side of Server1 is needed for Server1's class directory. But WHY ???
    It seems to be a little confusing with the codebase entries, many of the posts are contrary to others and to my personal experiences. Some comments given by Adrian Colley throw a little light upon some aspects. Is there anybody, who can explain the whole topic, when, why, and which part of RMI application deals with codebase entries, also in case of not dynamic code downloading ? May be there is also a reference into the java docs, which I didn't found up to now.
    Thanks in advance
    Axel

  • Choosing the port of an RMI server

    I need a server working on a port wich is differet from the default 1099, e.g. 2500.
    I create my server object which extends UnicastRemoteObject with code like this
    public MyServer(int port)
    super(port);
    Befor starting the server I run rmiregistry 2500 and the I pass the port number to the server by command line.
    It seems all right to me but I get the same an error message.
    What's wrong?
    Thanks in advance for answers

    I' m sorry. I'm new to RMI and I wrote a Chess Playing RMI software for university. I have managed to make it work on the default port but I don't know how to "escape" from 1099.
    I surfed the Internet for tutorials or code samples but they simply say: "To create an RMI server on the default port 1099 write code like this..." and I can't find the way of changing the port anywhere.
    I didn't write the exact error messaage, and I apologize for that, but it's because I did many trials and often the message changed. It's enough that someone tells me how I have to look to learn the exact way of programming an RMI server on a chosen port.
    Thanks

  • Starting the RMI server on Windows

    Hi
    I am just trying to use the three files in suns tutorial: http://java.sun.com/javase/6/docs/technotes/guides/rmi/hello/hello-world.html
    Hello.java - a remote interface
    Server.java - a remote object implementation that implements the remote interface
    Client.java - a simple client that invokes a method of the remote interface
    I have started the rmiregistry by running "start rmiregistry" in the java bin directory. There is no output in this window, i hope this is correct.
    But when I try to run the server I get the following message:
    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: Hello
    java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
         java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
         java.lang.ClassNotFoundException: HelloI'm suspecting it has to do with the codebase parameter that I have omitted. But even if I try to add it I can't seem to figure out a way for it to start.

    I have started the rmiregistry by running "start rmiregistry" in the java bin directory. There is no output in this window, i hope this is correct. This is correct.
    I'm suspecting it has to do with the codebase parameter that I have omitted.Omitted from what?
    But even if I try to add it I can't seem to figure out a way for it to start.'It' being what?
    The RMI 'codebase' is a list of URLs where classes can be found. You define it in your server JVM via the java.rmi.server.codebase property. Normally the URLs are http: URLs, which means you need an HTTP server which will serve classes or JAR files from the specified URLs.
    Alternatively you can:
    (a) start the client with a classpath that contains the classes mentioned in the remote interface, including itself, and
    (b) (i) start the Registry ditto, or
    (b) (ii) start the Registry inside the server JVM via LocateRegistry.createRegistry.

  • Can't start RMI server using JAR file

    I found it interesting that if I start my RMI server from
    a plain directory, everything goes fine.
    But if I jar all these necessary files into a jar file,
    and start my RMI server with command below
    java -jar server.jar
    UnmarshalException and ClassNotFoundException are
    thrown to indecate that my stub class can't be found
    (which I'm sure my stub class is in jar file)
    Why is jar file so special that it can't act like
    what it originally does when it hasn't been jared?
    or I really should take care of some configuration
    before I really can run a jar file?
    thanks

    To clarify few things...
    What I don't understand is that when I convert all my
    directories and class files properly into the jar file, they
    just can't work properly.
    I don't know if it's a problem of JAR file,
    or it's RMI that make this JAR file special?
    I'll simulate my JAR file structure that listed below,
    these structure works fine when they have'nt been
    converted into JAR file.
    META-INF/
    META-INF/MANIFEST.MF
    a/b/x1.class
    a/b/x2.class
    a/b/c/Y.class
    a/b/c/Y_Skel.class
    a/b/c/Y_Stub.class
    And when I use command "java -jar server.jar"
    to run my application, ClassNotFound exception
    is thrown to indecate my stub class is not found.
    Is there anything I can do to correct this?
    thanks

  • Abnormal memory allocation in RMI Server on Unix

    Hi all,
    I have a problem with an RMI server application that run on Unix tru64 v. 5.1b (jvm 1.4.2).
    I start the application in the following way:
    1) start rmiregistry with the options -J-Drmi.server.hostname=myhostname myPort.
    2) Start my class StarterRmiProcesses which have a main method in which create four new instance of different RMI objects (the instance are static class attributes) and registry those by:
    Naming.rebind("rmi://" + hostName + ":" + portNumber + "/RmiObjectName", rmiObject).
    The problem is that at the startup jvm allocate about 98 MB of memory, and when a client connect to the rmi server increase the memory usage by 1 MB, I have monitored the application for 2 or 3 days and sow that the memory usage always
    increase and never decrease.
    I tried to run the same application on Windows XP (in the same way if except that I don't start before the rmiregistry but use the LocateRegistry.createRegistry(myPort) ), and I sow that the initial allocation is about 20 MB, when a client connect to the rmi server increase the memory usage by 1 MB too but periodically the memosy usage decrease(I suppose when the gc run).
    Any suggestion?????
    Thanks in advance.

    At a guess this is a JVM issue not an RMI issue, as the RMI code being executed is almost entirely the same on both platforms.

  • Abnormal memory allocation in RMI Server on Unix tru64

    Hi all,
    I have a problem with an RMI server application that run on Unix tru64 v. 5.1b (jvm 1.4.2).
    I start the application in the following way:
    1) start rmiregistry with the options -J-Drmi.server.hostname=myhostname myPort.
    2) Start my class StarterRmiProcesses which have a main method in which create four new instance of different RMI objects (the instance are static class attributes) and registry those by:
    Naming.rebind("rmi://" + hostName + ":" + portNumber + "/RmiObjectName", rmiObject).
    The problem is that at the startup jvm allocate about 98 MB of memory, and when a client connect to the rmi server increase the memory usage by 1 MB, I have monitored the application for 2 or 3 days and sow that the memory usage always
    increase and never decrease.
    I tried to run the same application on Windows XP (in the same way if except that I don't start before the rmiregistry but use the LocateRegistry.createRegistry(myPort) ), and I sow that the initial allocation is about 20 MB, when a client connect to the rmi server increase the memory usage by 1 MB too but periodically the memosy usage decrease(I suppose when the gc run).
    Any suggestion?????
    Thanks in advance.

    At a guess this is a JVM issue not an RMI issue, as the RMI code being executed is almost entirely the same on both platforms.

  • How to start RMI Server Jar on server?

    Im using RMI, I have two jar files. One Server Jar which contains rmi server, registry start code and all methods which performs action on database .
    I put this jar file on tomcat web-apps directory.
    Another jar is containing User Interface code, which runs on client side.
    for performing any action server jar needs to be run all the time and RMI Registry always needs to be started so that client can communicate with database.
    How can i execute this server jar from client ?

    You can't execute the server from the client. The question doesn't begin to make sense. The server has to be already running for the client to have anything to connect to. You have to organise something at the server side to start it. And putting JAR files into the web apps directory doesn't accomplish that. You could write a Servlet or a listener that starts the RMI server when it's initialised, and stops it when destroyed. If you have to run it inside Tomcat at all, which isn't necessarily a good idea.

  • Problem connecting RMI-Server using a servlet

    Hi All..
    I have a RMI-client server model woring fine in AIX box.I am currently in a need to create one web client(may be with servlet or JSP).
    I wrote a sample servlet which try to connect to the RMI server. But when I run the servlet Its simply try to connect and then wait for unlimited time,not even print any exception/error.
    Both my RMI sevrer and Tomcat are in the same box.
    I am sending the servlet code for your reference.
    import java.rmi.*;
    import java.rmi.registry.Registry;
    import java.rmi.registry.LocateRegistry;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    import ir77.mon.engine.*;
    public class WebClient extends HttpServlet
    public void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
    XmlServerIntf xmlServerIntf = null;
    PrintWriter out = res.getWriter();
    res.setContentType("text/plain");
    try{
    out.println("Connecting to server......");
    //Seems this one is sufficient.(either this code or the below one)
    //String strServerUrl = "rmi://" + "192.168.100.22" + "/ir77.mon.engine";
    //xmlServerIntf = (XmlServerIntf) Naming.lookup(strServerUrl);
    //Try with this one also
    Registry reg = LocateRegistry.getRegistry("192.168.100.22", 2004);
    xmlServerIntf = (XmlServerIntf) reg.lookup("rmi://192.168.100.22/ir77.mon.engine");
    out.println("Connected to server");
    catch (Exception e){
    System.out.println("Exception in WebClient"+e);
    when I run the servlet in the browser with "http://192.168.100.22:8080/WebClient" its simply prints " Connecting to server......" and waits.
    Note : 192.168.100.22 - where my rmi server starts and 2004 -where I created by rmiregistry.I created it using LocateRegistry.createRegistry(2004);
    I have tried starting tomcat with "-security" option too but no responds as well.
    Do I have to provide some grant permission in catlina.policy file?If yes what?
    currently I have tried with giving all permission..
    Do I need to change the RMI server code?
    Any help will be highly appreciated....

    Hi genady,
    Oh....Ya I like to...I thought no body was interested...as I didn't get any reply from anybody....
    Well The first thing is that with the look up method in the servlet
    it should be like :
    Registry reg = LocateRegistry.getRegistry("ip address of the rmi server", port number);
    RMIServerInterface = (type cast with RMIServerInterface) reg.lookup("rmi binding string");
    Now you are able to get the server interface object & you can call any method.
    Next you have to provide the grant permission in the catalina.policy file to the folder where you have your application like....
    grant codeBase "file:${catalina.home}/webapps/ROOT/WEB-INF/classes/-" {
    permission java.security.AllPermission;
    Or you can give specific permissions also.
    Finally you have to run the tomcat as : $catalina.sh start -security
    Note: One more thing you have to keep in mind that's the structure of your application. ie com.mon.yourapp.......u have to create the same structure in tomcat's classes folder .
    Its done...........

  • Registering standalone RMI server in WebLogic JNDI

    Hi,
    I need to register a standalone RMI server in WebLogic JNDI. I'm sure I've done this before, but now I'm having problems!
    I have a standalone program which creates a remote object (implements Remote and extends UnicastRemoteObject). I am compiling my stubs with the Sun rmic compiler. I then create a JNDI InitialContext using wlclient.jar and a t3 url, and attempt to bind my remote object. It fails with the following exception:
    javax.naming.NamingException: Unhandled exception in rebind() [Root exception is org.omg.CORBA.MARSHAL:   vmcid: 0x0  minor code
    : 0  completed: No]I am using WLS 8.1sp4 and Sun JDK 1.4.2_05 (as shipped with WLS).
    If I use the RMI registry (Naming.bind(), etc.) it works fine.
    Thanks
    Dan.

    Danny Yates <> writes:
    You should use PortableRemoteObject and generate iiop ties for your
    impl. wlclient.jar runs on top of iiop.
    andy
    Hi,
    I need to register a standalone RMI server in WebLogic JNDI. I'm sure I've done this before, but now I'm having problems!
    I have a standalone program which creates a remote object (implements Remote and extends UnicastRemoteObject). I am compiling my stubs with the Sun rmic compiler. I then create a JNDI InitialContext using wlclient.jar and a t3 url, and attempt to bind my remote object. It fails with the following exception:
    javax.naming.NamingException: Unhandled exception in rebind() [Root exception is org.omg.CORBA.MARSHAL:   vmcid: 0x0  minor code
    : 0  completed: No]I am using WLS 8.1sp4 and Sun JDK 1.4.2_05 (as shipped with WLS).
    If I use the RMI registry (Naming.bind(), etc.) it works fine.
    Thanks
    Dan.

Maybe you are looking for

  • HP Laserjet 3015; Win 7; no duplex printing

    I just upgraded to a new computer with Windows 7 using my old Laserjet 3015 (3-in-1) printer. Old setup with XP I could print duplex (printing on both sides). Now I cannot with Win 7.. I checked both printer-properties and printer-preferences for dup

  • PO display through Portal UWL....

    Hi,       In R3-SAP inbox User can able to approve and see the PO throught workitem attachement are working fine. In Portal UWL user can able to approve the PO.But not able to see the PO.The Attachments is not showing in UWL. Same case for PR also. I

  • Configuring array of byte in dll call

    Dear all, I need to send the data 2010010100H to the dll at the question mark(U8) i mentioned in the attachment. Actually the data has to be transferred at a time not in bits and pieces. How to do this? I just put an array constant. Is it correct? Ki

  • Software - Canvas no longer available for the Mac

    I am looking for someone's experience - I use Canvas - a remarkable little program for drawing, word processing and almost everything including photo manipulation - ACD Systems have stopped developing and updating the program for Mac, which is a grea

  • System Preferences - Web Sharing...

    I've enabled Web Sharing and have been using it without issues, but recently (within the last week) I noticed that in the Web Sharing properties, where is usually displayed the "computer's website" and "personal website" url's as being "http://ip add