Rmi on Windows XP

Hello,
I have read the tutorials on Sun's Web site about how to use RMI but much of it is specific
to UNIX.
Is there a tutorial that explains how to correct start the services on Windows XP so that
they begin when the machine is booted?

http://developer.java.sun.com/developer/onlineTraining/rmi/index.html
While not specific to windows, this one worked fine for me.

Similar Messages

  • Unmarshal Exception problem

    I am working on a system in which a web server calls methods via RMI to a mini-application server.
    When we try to call the RMI method, we get this exception:
    Exception at time Tue Oct 28 12:29:42 EST 2003
    java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
         java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
         java.net.MalformedURLException: no protocol: Files/Apache
         at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:292)
         at sun.rmi.transport.Transport$1.run(Transport.java:148)
         at java.security.AccessController.doPrivileged(Native Method)
         at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
         at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
         at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
         at java.lang.Thread.run(Thread.java:536)
         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:133)
         at foo.bar.server.MyServer_Stub.setData(Unknown Source)
         at org.apache.jsp.action_jsp._jspService(action_jsp.java:468)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:210)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2416)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:601)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
         at java.lang.Thread.run(Thread.java:536)
    Caused by: java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
         java.net.MalformedURLException: no protocol: Files/Apache
         at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:249)
         at sun.rmi.transport.Transport$1.run(Transport.java:148)
         at java.security.AccessController.doPrivileged(Native Method)
         at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
         at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
         at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
         ... 1 more
    Caused by: java.net.MalformedURLException: no protocol: Files/Apache
         at java.net.URL.<init>(URL.java:579)
         at java.net.URL.<init>(URL.java:476)
         at java.net.URL.<init>(URL.java:425)
         at sun.rmi.server.LoaderHandler.pathToURLs(LoaderHandler.java:743)
         at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:159)
         at java.rmi.server.RMIClassLoader$2.loadClass(RMIClassLoader.java:629)
         at java.rmi.server.RMIClassLoader.loadClass(RMIClassLoader.java:257)
         at sun.rmi.server.MarshalInputStream.resolveClass(MarshalInputStream.java:200)
         at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1503)
         at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1425)
         at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1616)
         at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1264)
         at java.io.ObjectInputStream.readObject(ObjectInputStream.java:322)
         at sun.rmi.server.UnicastRef.unmarshalValue(UnicastRef.java:297)
         at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:246)
         ... 6 more
    One of the arguments to this method is a String; the other is a serializable class with all members Strings.
    What is confusing is this :"Files/Apache" business. Why is a URL getting sent along, and why is it malformed?

    abramia,
    That's actually a good point you bring up. I'm guessing but could Files/Apache be referring to the install directory of Apache? (i.e. "C:\Program Files\Apache.) If this is the case then you can probably see why you're getting a Malformed URL. Directories with spaces do lead to misleading or confusing error messages. In other words are you forming a codebase dynamically from the location of a .class file? I'm invisioning a class looking up it's home directory where it runs under Apache installed under "C:\Program Files". The path would be some like "C:\Program Files\Apache\webapps\myapp\WEB-INF\classes", for example and using this as a codebase or a URL for a Classloader. The path gets cut off after Program and starts to look like two paths where a URL object expects only one and a MalformedURLException is thrown. I'm guessing of course but I can easily see how this could be the case. Check (and/or post) your codebase setting for shared resources (if you have one) as this is a good source for the exception.
    Good luck,
    Cliff
    Hi drachefly,
    The two servers are on the same box -- bothwindows.
    (note, this problem does not occur on any other box
    I've tried it on, macOS, linux, solaris)Well, that explains the reason for your problems,
    doesn't it?
    (Just don't use Windows ;-)
    Seriously, though, I have also had problems using RMI
    on Windows (but in a different situation to yours).
    What I can tell you is that the error message and
    stack trace can actually be misleading. The problem
    may not be related to a "malformed URL". From my
    experience, strange errors occur if you are using
    directories that have spaces in their names (like "My
    Documents", for example). Is this the case with you?
    Good Luck,
    Avi.

  • Window 2000 & RMI client losing network connection

    We have a client/server java application communicating via RMI. The application runs perfect when the network is running smoothly. However, once the client loses connectivity with the network, the client runs in offline mode (as expected). However, once the client reestablishes a connection with the network, it is unable to communicate with the Server via RMI. It seems that Windows 2000 reassigns the client's IP address when it goes offline to localhost (127.0.0.1), when the client is reconnected the IP addresses is changed back to the network address, but it is unable to send data to the server running RMI. Any suggestions? We did not experience this problem with Windows NT.

    you need to specify the IP address of the server object from the JVM in which it is exported, using -Djava.rmi.server.hostname argument to the JVM (since the client and server run on one machine, you probably want to set this to 127.0.0.1, I think)

  • Basic RMI program works in windows but not Linux

    Hello,
    I'm trying to learn RMI for a program at work.
    I have the book "Core Java 2 - Volume 2 - Advanced Features". Chapter 5 of this book is about RMI.
    The most basic example program they use works fine in Windows. However, when I try to run this same program under linux it doesn't work.
    For now, I'm not even trying to run a client (in linux)...just the server.
    Here is the server code.
    public class ProductServer
    public static void main(String args[])
    try
    System.out.println
    ("Constructing server implementations...");
    ProductImpl p1
    = new ProductImpl("Blackwell Toaster");
    ProductImpl p2
    = new ProductImpl("ZapXpress Microwave Oven");
    System.out.println
    ("Binding server implementations to registry...");
    Naming.rebind("rmi://172.20.101.1/toaster", p1);
    Naming.rebind("rmi://172.20.101.1/microwave", p2);
    System.out.println
    ("Waiting for invocations from clients...");
    catch(Exception e)
    e.printStackTrace();
    What is very interesting is that this call works
    Naming.rebind("rmi://172.20.101.1/toaster", p1);
    But the very next line
    Naming.rebind("rmi://172.20.101.1/microwave", p2);
    Throws this error ::
    java.rmi.UnmarshalException: Error unmarshaling return header: java.io.EOFException
    at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:221)
    at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:366)
    at sun.rmi.registry.RegistryImpl_Stub.rebind(RegistryImpl_Stub.java:133)
    at java.rmi.Naming.rebind(Naming.java:172)
    at ProductServer.main(ProductServer.java:35)
    I would very much appreciate the help. Thank You.

    We solved the problem
    Apparently, on the linux machine we had both gcc and the jdk installed
    the regualar compile command hit the jdk
    the rmic command used the gcc version of rmic
    the rmiregistry used the gcc version of rmiregistry
    the regular run command hit the jdk
    using the rmic and rmiregistry in the jdk made everything work fine
    I knew it had to be a stupid answer.

  • RMI and NAT(windows) ?

    Hello world,
    I've got a server and client working fine on internet excepted when the client is using a share internet connection with NAT. The important thing is that everythings works fine as long as I make simple client to server connections, but I've got a
    java.net.ConnectException: Operation timed out: connect
    java.net.ConnectException: Operation timed out: connect
    Exception when the server try a callback on the client.
    I have a limited idea of how NAT ( more precisely the windows NAT) do the job, and it's clear that it is not possible to acces to a server located in a local private network behind a NAT server. But then how does ICQ fonctions ?
    If anybody had any idea about this mess, I would be interested.
    Thanks
    Benoit

    ICQ, AOL, and Morpheus all work through a NAT because they keep a socket connection alive.
    i dont believe RMI does this.
    therefore, the RMI packets go out through the NAT filter to the remote RMI server and they get sent back to the outside IP address and stop dead. they know nothing about the internal IP because RMI sends the response back on a random port number in the 3000 or so range and it might be really hard for you to map that in your NAT filter so that it knows which machine to send port 3xxx to inside of your NAT.
    i hope i am making sense.
    try using netstat or ethereal to watch how your RMI traffic talks.

  • RMI call resets Windows error code?

    I'm attempting to retrieve a Windows error code from a remote system, using a simple call to the Windows API function getLastError() which is wrapped inside a JNI function on the remote system. getLastError() returns the last error code set for a particular process/thread.
    The problem is, it appears that simply making the remote function call clears the error value before it can be returned. I can confirm that the error value was set on the remote system by printing the Process/Thread ID and getLastError() value to a console window on the remote system when one of my remote methods is called with out-of-range data. If I attempt to retrieve the error code, the Process/Thread ID match but the error code is always 0. No other methods were called on the remote system in between the initial error-generating method and the method which returns the error code.
    Note that using the same JNI function calls without RMI works fine - I can generate error codes and retrieve them just fine.
    Any ideas? Thanks in advance!

    You're assuming that no other system calls are
    executed between the one that caused the error you are
    interested in and your GetLastError(). RMI executes
    system calls on its own behalf, both to return the
    value from the previous computation that caused the
    error and to dispatch the new call into the method
    that does GetLastError(). This approach is never going
    to work. Why can't you call GetLAstError() straight
    after the error happens, in the same remote method?This is what I suspected is happening, and if true, then I will simply have to rewrite my RMI method calls. Currently, they return -1 on error, and the error number is retrieved with a separate getLastError() call. This is done for legacy reasons (I'm calling C functions which were originally developed without Java/RMI in mind). As suggested, I'll have to call getLastError() immediately after an error occurs, and return the negative value of the error code rather than just -1. I've got about 200 remote methods to modify, so I was trying to avoid this, but hey... it's mostly search/replace.
    Thanks for the help.

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

  • RMI-server works on Windows and Linux but not on Solaris

    I wrote an application which uses RMI. The server is successfully tested on Windows and Linux. However it doesn't work on Solaris.
    Naming.lookup works, I can find the server. But calling a method on my remote interface causes a ConnectionException:
    java.rmi.ConnectException: Connection refused to host: 192.168.1.123; nested exception is:
         java.net.ConnectException: Connection refused: connect
         at sun.rmi.transport.tcp.TCPEndpoint.newSocket(Unknown Source)
         at sun.rmi.transport.tcp.TCPChannel.createConnection(Unknown Source)
         at sun.rmi.transport.tcp.TCPChannel.newConnection(Unknown Source)
         at sun.rmi.server.UnicastRef.newCall(Unknown Source)
         at at.triton.javaengine.server.ServerImpl_Stub.connectToWindow(Unknown Source)
         at at.triton.javaengine.client.JavaEngineClient.connectToWindow(JavaEngineClient.java:288)
         at at.triton.javaengine.client.JavaEngineClient.main(JavaEngineClient.java:787)
    Caused by: java.net.ConnectException: Connection refused: connect
         at java.net.PlainSocketImpl.socketConnect(Native Method)
         at java.net.PlainSocketImpl.doConnect(Unknown Source)
         at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
         at java.net.PlainSocketImpl.connect(Unknown Source)
         at java.net.SocksSocketImpl.connect(Unknown Source)
         at java.net.Socket.connect(Unknown Source)
         at java.net.Socket.connect(Unknown Source)
         at java.net.Socket.<init>(Unknown Source)
         at java.net.Socket.<init>(Unknown Source)
         at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(Unknown Source)
         at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(Unknown Source)
         ... 7 moreNote that I have almost no experience with Solaris.
    Additional information about the common pitfalls which I have already checked:
    * rmiregistry finds the server classes (the exception was different without them)
    * the server is in the LAN and the desktop firewall of the client is double-checked to let the required ports through to any destination.

    java.rmi.ConnectException: Connection refused tohost: >192.168.1.123; nested exception is:
    java.net.ConnectException: Connection refused:
    : connect
    Clearly indicates what is happening inside there.Clearly indicates that you don't know what you are talking about.
    Any applications invoked with a security manager must
    be granted explicit permission to access local system
    resources apart from read access to the directory and
    its subdirectories where the program is invoked.Any application that gets a java.net.ConnectionException: Connection
    refused is getting it more or less directly from the TCP/IP stack. If the problem had anything to do with policies and permissions and SecurityManagers, it would have been an AccessControlException .
    if your client RMI doesnt include these lines then If your 'client RMI' does include these lines then I would like a definition of what exactly a 'client RMI' really is, because I've been using RMI for ten years and wrote a book about it and I certainly don't know.
    1)just include these lines
    if (System.getSecurityManager() == null) {
    System.setSecurityManager(new
    SecurityManager());In other words, if the application doesn't already have a security manager, in which case the contents of the policy file or the 'client RMI', or whatever you want to call it, are completely irrelevant, such that they couldn't possibly be having the problem you desrcribe, add a security manager so that we get into the land where you might possibly know what you're talking about?
    e a policy file
    grant {
    permission java.net.SocketPermission
    "192.168.1.123:1099", "accept,connect,resolve";
    };And this is completely unnecessary if there isn't a security manager, and completely unrelated to the OP's problem.

  • Windows directory with spaces & RMI

    Folks,
    If the product is installed in a directory where a path does not have blanks it works perfectly well. My client creates a remote object then use a method toStub and passes this object to a server. A server throws exception. A method to RemoteServer.toStub() returns a proxy class that is not understood by a server. This example refers to a windows directory named "Hi And By". There are no places where an installation location is used within the code.
    Any ideas ? The resolution is important to enable installation under "Program Files".
    Here is a fragment of code that causes the exception and a server trace.
    Code:
    // Create a remote object
    HeartbeatImpl tmp = new HeartbeatImpl();
    try {
    // pass a handle to a server
    remSession.setHeartbeat((HeartbeatRemote)RemoteServer.toStub(tmp));
    Caused by: java.net.MalformedURLException: no protocol: And
    at java.net.URL.<init>(URL.java:567)
    at java.net.URL.<init>(URL.java:464)
    at java.net.URL.<init>(URL.java:413)
    at sun.rmi.server.LoaderHandler.pathToURLs(LoaderHandler.java:747)
    at sun.rmi.server.LoaderHandler.loadProxyClass(LoaderHandler.java:505)
    at java.rmi.server.RMIClassLoader$2.loadProxyClass(RMIClassLoader.java:6
    at java.rmi.server.RMIClassLoader.loadProxyClass(RMIClassLoader.java:294
    at sun.rmi.server.MarshalInputStream.resolveProxyClass(MarshalInputStrea
    at java.io.ObjectInputStream.readProxyDesc(ObjectInputStream.java:1494)
    at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1457)
    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:339)
    at sun.rmi.server.UnicastRef.unmarshalValue(UnicastRef.java:290)
    at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:279)

    I'll continue this here because that's where it belongs but can you possibly answer the questions I asked in the other place? and can you explain why this stack trace is different from the first one?
    It looks to me as though the path you mention is either in the java.rmi.server.codebase or the classpath. If the former it needs %20 instead of spaces; if the latter it needs quoting. From my reading of sun.rmi.server.LoaderHandler.pathToURLs() it looks like a codebase setting. Codebases contain URLs and URLs cannot contain spaces.

  • RMI listener stops whenever the user logs off Windows

    Hi guys...
    I have a problem whereby the RMI listener stops whenever the user logs off Windows.
    I've gone through the net and the only solution was to add "-Xrs" to the end of the "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\IBM Tivoli Identity Manager Adapter" service for the ImagePath statement.
    Unfortunately for me, that did not work.
    Anybody knows how I can go around fixing this.
    Much appreciated.

    What's the RMI listener?
    Do you mean the RMI Registry?
    In which case the solution is to add that same flag when you run the registry.

  • 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 & windows 2000 - eth. cable disconnection problem

    Hello
    RMI server and client on the same PC, if I disconnect eth. cable on the PC client cannot access anymore to server (remote exception), exactly as if they were on 2 different PC, with link cut !!!
    The problem didn't exist on Windows NT 4.
    Is there a parameter somewhere to avoid this behaviour, or should I live with ?
    Many thanks in advance

    Thanks
    but it doesn't work !
    Details :
    Server : i use LocateRegistry.createRegistry(xx), i do rebind (//:xx/<objectname>)
    Client : i do lookup(//:xx/<objectname>)
    Client and server on the same PC - When i stop the server :
    - on NT 4 : connectException on localhost
    - on windows 2000 : connectException on PC IP @ (!! localhost should be used)
    That's why when i disconnect the PC eth. cable on windows 2000 the RMI connection is lost, whereas it's not lost on NT.
    any idea to force windows 2000 to use local host ?

  • Recommended Windows  multipatform ports for RMI registry....

    Hi,
    Can anyone recommend suitable RMI registry ports that will work across different windows platforms (NT/2000/XP) as I have two RMI servers running on a host machine.
    Presently I have one RMI server object bound to a registry on port 1099 and the other on port 2001. My RMI client correctly connects on Windows 2000 for both of these however Windows XP doesn't work for port 1099. Also port 2001 does not work over the internet and yes I have configured the firewall correctly!
    Any recommendations for using correct ports please?
    Regards,
    Oneal

    1. Why do you need two registries?
    2. There is some amount of chaos in port numbers; 1099 is a "registered" port, where exclusive use is not guaranteed.
    o You can google for "well known port" and you will easily find a list of registered ports; you could pick one from someone you think is out of business or where the use is patently clear to be obsolete.
    o You could choose an arbitrary port number in the dynamically-assigned range,.
    Here's an excerpt from a document I found:
    The port numbers are divided into three ranges: the Well Known Ports,
    the Registered Ports, and the Dynamic and/or Private Ports.
    The Well Known Ports are those from 0 through 1023.
    The Registered Ports are those from 1024 through 49151
    The Dynamic and/or Private Ports are those from 49152 through 65535

  • Problems using RMI between linux and windows.

    I have problems using RMI between linux and windows.
    This is my scenario:
    - Server running on linux pc
    - Clients running on linux and windows PCs
    When a linux client disconnect, first time that server try to call a method of this client, a rmi.ConnectException is generated so server can catch it, mark the client as disconnected and won't communicate with it anymore.
    When a windows client (tested on XP and Vista) disconnect, no exceptions are generated (I tryed to catch all the rmi exception), so server cannot know that client is disconnected and hangs trying to communicate with the windows client.
    Any ideas?
    Thanks in advance.
    cambieri

    Thanks for your reply.
    Yes, we are implementing a sort of callback using Publisher (remote Observable) and Subscribers (remote Observer). The pattern and relative code is very well described at this link: http://www2.sys-con.com/ITSG/virtualcd/java/archives/0210/schwell/index.html (look at the notifySubscribers(Object pub, Object code) function).
    Everything works great, the only problem is this: when a Publisher that reside on a Linux server try to notify something to a "dead" Subscriber that reside on a Windows PC it does't receive the usual ConnectException and so tends to hang.
    As a workaround we have solved now starting a new Thread for each update (notification), so only that Thread is blocked (until the timeout i guess) and not the entire "notifySubscribers" function (that contact all the Subscribers).
    Beside this, using the Thread seem to give us better performance.
    Is that missed ConnectException a bug? Or we are just making some mistake?
    We are using java 6 and when both client and server are Linux or Windows the ConnectException always happen and we don't have any problem.
    I hope that now this information are enough.
    Thanks again and greetings.
    O.C.

  • RMI Hello Example under Windows

    I'm trying out the Sun RMI Hello World example to find out more about RMI
    http://java.sun.com/j2se/1.5.0/docs/guide/rmi/hello/hello-world.html
    I'm using JDK1.6, under WinXP.
    I've compiled the classes, then tried to run the Server using start java example.hello.Server (I've added a CLASSPATH env var pointing to the root of my class files.)
    When the Server starts I get
    Server exception: java.rmi.ConnectException: Connection refused to host: 192.168
    .1.5; nested exception is:
    java.net.ConnectException: Connection refused: connect
    java.rmi.ConnectException: Connection refused to host: 192.168.1.5; nested excep
    tion is:
    java.net.ConnectException: Connection refused: connect
    at sun.rmi.transport.tcp.TCPEndpoint.newSocket(Unknown Source)
    at sun.rmi.transport.tcp.TCPChannel.createConnection(Unknown Source)
    at sun.rmi.transport.tcp.TCPChannel.newConnection(Unknown Source)
    at sun.rmi.server.UnicastRef.newCall(Unknown Source)
    at sun.rmi.registry.RegistryImpl_Stub.bind(Unknown Source)
    at example.hello.Server.main(Server.java:61)
    Caused by: java.net.ConnectException: Connection refused: connect
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.PlainSocketImpl.doConnect(Unknown Source)
    at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
    at java.net.PlainSocketImpl.connect(Unknown Source)
    at java.net.SocksSocketImpl.connect(Unknown Source)
    at java.net.Socket.connect(Unknown Source)
    at java.net.Socket.connect(Unknown Source)
    at java.net.Socket.<init>(Unknown Source)
    at java.net.Socket.<init>(Unknown Source)
    at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(Unknown S
    ource)
    at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(Unknown S
    ource)
    ... 6 more
    My ip address is 192.168.1.5
    I think this is some sort of networking security problem and I would be grateful for some pointers on solving this ?

    jtahlborn wrote:
    do you have an rmiregistry running? the server is trying (and failing) to connect to a registry. i believe those examples refer to starting the rmi registry before running the example code.I didn't do that. Thanks for the help.
    In a real application I assume you start the registry service in some way when the server is started if it isn't already running ?

Maybe you are looking for

  • Calling report from form

    I have worked with oracle forms and reports 6i in client server. But from 9i it is web based. I have installed developer studio now I am unable to call the report. Using Run_report_product. How do I pass the report server name if it is local. I didnn

  • Mac os 10.4 & windows on external drive

    Hi All, Back to mac after ~ 18 years so some things are "new" to me. I would like to install os 10.4 and windows on an external drive, while leaving 10.5.1 (I own full copies of each) on my macbook and be able to choose which to boot from. Is this po

  • How to make a color screen in FCE ?

    Hi there, I need a still picture background that is filled up with one color. I know I can do that in Live Type and then import it in from Live Type. But is there a direct way to create a one color still background in FCE 4?? Thanks

  • I want to download the iPad user manual onto the iPad.

    How do I download the iPad User Manual onto the iPad?

  • DIFFRACTION WITH 10-22mm F/3.5-4.5 LENS

    I have used this lens for several years, with excellent results, on my 50D and 7D.  Now, shooting Fall landscapes, I find what may be diffraction problems when shooting at minimum apertures (f/22 to f/29).  Shooting conditions were overcast/cloudy.