RMI server exits after 10 minutes

Hi
I have a strange problem: The rmi server exits after about 15 minutes when using my own socket factories. The reason seems to be, that only daemon threads are left in the servers VM.
If I add code like:
while(true) {
try {
Thread.sleep(10000000);
} catch(Exception e){}
to the main method, the server continues to run as desired, the main thread is not a daemon thread.
I checked the accept method of my factory, it runs in a daemon thread.
Is there any configuration property to specify that the server should run forever?
BTW: the server does not exit when using no own socket factories.

No, I don't export manually. However, isn't that the job of the naming service?
Calling export causes an "Object already exported" exception.
Here is the complete working main code that starts the server (removing the endless loop will cause the server VM to terminate after about 15 minutes of inactivity):
public static void main(String args[]) throws Exception
TClientSocketFactory client = new TClientSocketFactory();
TServerSocketFactory server = new TServerSocketFactory();
client.setServiceName("authtest");
server.setServiceName("authtest");
AuthImpl obj = new AuthImpl(client, server);
Naming.rebind(
"//" + InetAddress.getLocalHost().getHostName() + "/AuthServer",
obj
while(true) {
try {
Thread.sleep(10000000);
} catch(Exception e){}
Cheers...Urs

Similar Messages

  • RMI Server exits early when using SSL

    Hi,
    Maybe someone else has encountered this one.
    My RMI server works fine when I use standard sockets. I create an instance and bind it into the rmiregistry. It then waits indefinitely for connections.
    When I use SSL, I can create the object instance. I can also bind it into the registry. However, it only waits a few seconds and then exits.
    No exception or error is thrown (I have a catch Throwable block on my main method to be sure of this.)
    As my code is adapted from the RMI SSL 'Hello World' examples found on this site) I decided to compile and run those examples. I get the same problem.
    Any ideas?
    This is the relevant part of my code:
    public static void main(String[] args)
        HelloImpl obj = null;     
        try
            // use -clear option to get standard sockets
            if (args.length > 0 && args[0].equals("-clear"))
                obj = new HelloImpl();                   
            else // otherwise default to SSL sockets
                RMIClientSocketFactory csf = new RMISSLClientSocketFactory();
                RMIServerSocketFactory ssf = new RMISSLServerSocketFactory();
                obj = new HelloImpl(csf,ssf);               
            Naming.rebind("HelloServer", obj);
            System.out.println("HelloServer listening for requests\n";
        catch (RemoteException ex)
            ex.printStackTrace();
        catch (MalformedURLException ex)
            ex.printStackTrace();
        catch (Throwable ex)
            ex.printStackTrace();

    Thanks for taking an interest.
    I just use:
    c:\j2sdk1.4.1_02\bin\rmiregistry
    to start the registry.
    I think the problem is with my SSL sockets. I'm guessing the reason a UnicastRemoteObject is normally kept alive (not garbage collected) in the registry is because it has a ServerSocket which is waiting for connections.
    In this case, I don't think the SSLServerSocket is getting created and so my UnicastRemoteObject gets garbage collected.
    However, I'm not sure why exactly.

  • WRT610N UPnP Media Server failing after minutes online

    Hi,
    I have a WRT610N and I'm having issues with the media server. I have upgraded to the latest firmware and setup sharing and UPnP etc. When I initially plug in my USB hard drive (1TB Seagate Freeagent) it is discoverable by devices on my network (Xbox 306 & Linksys Kiss1600) and I can browse shared media it has indexed. This only lasts for less than 5 mintues, then the WRT610N dissappears from both devices (Xbox & K1600) and I can no longer use the media server.
    Disk sharing still works OK, it's only the media server that fails.
    Any help would be really appreciated as I'm about to launch it out the window.
    Thanks,
    James

    Are your devices connected to the media server via a cabled or wireless connection ?
    If its wireless - then i suspect you have a faulty WRT610, the wireless chipsets inside the WRT610N are well known for overheating and dropping all connections.
    Should be pretty stable using a cabled connection though.
    Message Edited by vatovey on 07-20-2009 08:35 AM
    Currently owning a WRT610N v1

  • UnmarshalException while using prop  java.rmi.server.ignoreStubClasses=true

    I have created a test program to check the behaviour of setting the java.rmi.server.ignoreStubClasses property to true on the server side and not setting this flag on the client side.
    This requirement is due to updation of an already running system, with stubs to a new version without stubs, without shutting down the system.
    The files used by me are given below.
    File Hello.java
    package example.hello;
    import java.rmi.Remote;
    import java.rmi.RemoteException;
    public interface Hello extends Remote {
    String sayHello() throws RemoteException;
    File Server.java
    package example.hello;
    import java.rmi.registry.LocateRegistry;
    import java.rmi.registry.Registry;
    import java.rmi.server.UnicastRemoteObject;
    public class Server implements Hello {
    public Server() {}
    public String sayHello() {
    return "Hello, world!";
    public static void main(String args[]) {
    try {
    LocateRegistry.createRegistry(1099);
    Server obj = new Server();
    Hello stub = (Hello) UnicastRemoteObject.exportObject(obj, 0);
    // Bind the remote object's stub in the registry
    Registry registry = LocateRegistry.getRegistry();
    registry.bind("Hello", stub);
    System.err.println("Server ready");
    catch (Exception e)
    System.err.println("Server exception: " + e.toString());
    e.printStackTrace();
    File Client.java
    package example.hello;
    import java.rmi.registry.LocateRegistry;
    import java.rmi.registry.Registry;
    public class Client {
    private Client() {}
    public static void main(String[] args) {
    String host = (args.length < 1) ? null : args[0];
    try {
    Registry registry = LocateRegistry.getRegistry(host);
    Hello stub = (Hello) registry.lookup("Hello");
    String response = stub.sayHello();
    System.out.println("response: " + response);
    } catch (Exception e) {
    System.err.println("Client exception: " + e.toString());
    e.printStackTrace();
    First I run file Server.java using the following script (server.bat)
    java -Djava.rmi.server.ignoreStubClasses=true -classpath .; example.hello.Server
    pause
    Then the client is run using the following script (client.bat)
    java -classpath .; example.hello.Client 132.186.96.210
    pause
    While running the client, the following exception is obtained.
    Client exception: java.rmi.ServerException: RemoteException occurred in server thread; nested except
    java.rmi.UnmarshalException: error unmarshalling call header; nested exception is:
    java.rmi.UnmarshalException: skeleton class not found but required for client version
    java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
    java.rmi.UnmarshalException: error unmarshalling call header; nested exception is:
    java.rmi.UnmarshalException: skeleton class not found but required for client version
    at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:325)
    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.lookup(Unknown Source)
    at example.hello.Client.main(Client.java:52)
    Caused by: java.rmi.UnmarshalException: error unmarshalling call header; nested exception is:
    java.rmi.UnmarshalException: skeleton class not found but required for client version
    at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:250)
    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.rmi.UnmarshalException: skeleton class not found but required for client version
    at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:243)
    ... 6 more
    I am not able to figure out why this thing is happening, If i also set the property java.rmi.server.ignoreStubClasses=true on the client side everything goes fine. But this I can't do. I can't set the property on the client side as the system is up and already running.
    I am using JDK version 1.5.0_06. Same exception comes under JDK 6.0
    Any help will be highly appreciated.

    I think this is a bug. When you exported the Registry from your server JVM it was also exported with java.rmi.server.ignoreStubClasses=true, but the Registry bootstrap at the client requires the 1.1 stub protocol for compatiblity reasons so you got this error. I would report this on the Bug Parade.
    You could get around it by setting java.rmi.server.ignoreStubClasses after exporting the Registry.
    BTW java.rmi.server.ignoreStubClasses isn't supposed to do anything at the client whether true or false so you can cut your testing space in half.

  • Can a RMI Server trap an exit event of its client  ?

    Hi all,
    Can a RMI Server trap an exit event of its client ??
    For example
    If I close the client using Ctrl-C, can the Server known what one of its client is closed ??

    You could consider allocating a new remote object per client via some login object. In my book I called this the 'remote session' pattern. That way each client can have its own server-side context, i.e. like an EJB session bean, which can have its own advantages. In fact if you're interested in when a specific client disappears, you must already have some client context so this is a clean solution to that as well.
    Then the session object can use the Unreferenced technique to know when the client has gone away unexpectedly, albeit with a 10 minute delay. This can be tuned via the java.rmi.dgc.leaseValue setting at the server. This works because each session object only has one client.
    If you can't do this and you can't control the client code, I'm not aware of any other solution under RMI.
    Except that as a last resort you could do something really fancy with custom socket factories at both ends that both implement a special ping protocol I suppose, but this is getting pretty hairy and you'd need to understand the RMI wire protocol to make it work.

  • Propertie java.rmi.server.hostname during 1 minute

    Hello from Spain,
    I �m developing an application using Rmi over http (tunneling)
    I execute the example of "rmiservlethandler" and it 's works fine in localnetwork mode.
    Nevertheless, when i try to execute the application accross internet i must put the propertie
    -Djava.rmi.server.hostname=<public ip of server>
    I run this server but only works during 1 minute aprox.
    Later this minute, the server is automatically shutdown and it doesn't report any errors
    What can i do?
    Please, help me and thanks in advance

    I forget say that during this minute, the examples works fine

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

    hi
    Can anybody tell me how to stop the Jvm to free the Rmi server port and the remote object?

    Hi,
    The first step: unbind the bound object from the registry!
    As far as I know the UnicastRemoteObject calls the exportObject() method in its constructor. If you want to force the unregistering call the UnicastRemoteObject's unexportObject() method on the server object.
    After these two calls (Naming.unbind(), UnicastRemoteObject.unexportObject()) the server object surely is no longer listening the remote calls, the JVM exits smothly...
    Sany

  • 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 & JDBC

    hello:
    I am unable to connect using JDBC in an RMI server. I get ExceptionInInitializerError exception in oracle.jdbc.dbaccess.DBConversion. I have tried this same connection from an application and applet and both work fine.
    The problem seems to arise when the RMISecurityManager is set.
    Lou

    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.

  • 500 Internal Server Error after JSP trys to invoke a BPEL Process

    I get the 500 Internal Server Error after hitting the submit button on my displayed JSP screen. Did somebody had already the same error:
    Thanks
    The JSP Source is:
    <%@ page contentType="text/html;charset=windows-1250"%>
    <%@page import="java.util.Hashtable" %>
    <%@page import="com.oracle.bpel.client.Locator" %>
    <%@page import="com.oracle.bpel.client.NormalizedMessage" %>
    <%@page import="com.oracle.bpel.client.dispatch.IDeliveryService" %>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1250"/>
    <title>hello</title>
    </head>
    <body><form action="hello.jsp" method="get">
    <input type="text" name="text"/>
    <input type="submit" value="Submit" name="submit"/>
    </form>
    <%
    String text = request.getParameter("text");
    if(text != null)
    String xml="<ns1:HelloWorldProcessProcessRequest xmlns:ns1=\"http://xmlns.oracle.com/HelloWorldProcess\">";
    xml+="<ns1:input>"+text+"</ns1:input></ns1:HelloWorldProcessProcessRequest>";
    Hashtable jndi = new Hashtable();
    jndi.put(javax.naming.Context.PROVIDER_URL, "ormi://localhost/orabpel");
    jndi.put(javax.naming.Context.INITIAL_CONTEXT_FACTORY, "com.evermind.server.rmi.RMIInitialContextFactory");
    jndi.put(javax.naming.Context.SECURITY_PRINCIPAL, "oc4jadmin");
    jndi.put(javax.naming.Context.SECURITY_CREDENTIALS, "welcome1");
    jndi.put("dedicated.connection", "true");
    Locator locator = new Locator("default","bpel",jndi);
    IDeliveryService deliveryService = (IDeliveryService)locator.lookupService (IDeliveryService.SERVICE_NAME );
    // construct the normalized message and send to oracle bpel process manager
    NormalizedMessage nm = new NormalizedMessage( );
    nm.addPart("payload", xml );
    deliveryService.post("HelloWorldProcess", "initiate", nm);
    out.println( "BPELProcess initiated!<br>" );
    %>
    </body>
    </html>
    The application log looks like that:
    at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:591)
    at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:515)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher
    .java:711)
    at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher
    .java:368)
    at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler
    .java:866)
    at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.HttpRequestHandler.processRequest(HttpRequestHandler
    .java:448)
    at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler
    .java:216)
    at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:117)
    at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:110)
    at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
    at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor
    .java:303)
    at java.lang.Thread.run(Thread.java:595)
    Caused by: java.net.ConnectException: Connection refused: connect
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
    at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
    at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
    at java.net.Socket.connect(Socket.java:507)
    at java.net.Socket.connect(Socket.java:457)
    at java.net.Socket.<init>(Socket.java:365)
    at java.net.Socket.<init>(Socket.java:207)
    at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.rmi.RMIClientConnection.createSocket(RMIClientConnection
    .java:682)
    at oracle.oc4j.rmi.ClientSocketRmiTransport.createNetworkConnection(ClientSocketRmiTransport.java:58)
    at oracle.oc4j.rmi.ClientRmiTransport.connectToServer(ClientRmiTransport.java:78)
    at oracle.oc4j.rmi.ClientSocketRmiTransport.connectToServer(ClientSocketRmiTransport.java:68)
    at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.rmi.RMIClientConnection.connect(RMIClientConnection.java
    :646)
    at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.rmi.RMIClientConnection.sendLookupRequest(RMIClientConnection
    .java:190)
    at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.rmi.RMIClientConnection.lookup(RMIClientConnection.java:174
    at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.rmi.RMIClient.lookup(RMIClient.java:283)
    ... 22 more
    at com.oracle.bpel.client.util.ExceptionUtils.handleServerException(ExceptionUtils.java:82)
    at com.oracle.bpel.client.delivery.DeliveryService.getDeliveryBean(DeliveryService.java:254)
    at com.oracle.bpel.client.delivery.DeliveryService.post(DeliveryService.java:174)
    at com.oracle.bpel.client.delivery.DeliveryService.post(DeliveryService.java:149)
    at _hello._jspService(_hello.java:74)
    at com.orionserver[Oracle Containers for J2EE 10g (10.1.3.1.0) ].http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
    at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:453)
    at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:591)
    at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:515)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher
    .java:711)
    at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher
    .java:368)
    at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler
    .java:866)
    at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.HttpRequestHandler.processRequest(HttpRequestHandler
    .java:448)
    at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler
    .java:216)
    at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:117)
    at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:110)
    at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
    at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor
    .java:303)
    at java.lang.Thread.run(Thread.java:595)
    Caused by: java.lang.Exception: Failed to create "ejb/collaxa/system/DeliveryBean" bean; exception reported is: "javax.naming.CommunicationException
    : Connection refused: connect [Root exception is java.net.ConnectException: Connection refused: connect]
    at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.rmi.RMIClient.lookup(RMIClient.java:292)
    at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.rmi.RMIClientContext.lookup(RMIClientContext.java:51)
    at javax.naming.InitialContext.lookup(InitialContext.java:351)
    at com.oracle.bpel.client.util.BeanRegistry.lookupDeliveryBean(BeanRegistry.java:279)
    at com.oracle.bpel.client.delivery.DeliveryService.getDeliveryBean(DeliveryService.java:250)
    at com.oracle.bpel.client.delivery.DeliveryService.post(DeliveryService.java:174)
    at com.oracle.bpel.client.delivery.DeliveryService.post(DeliveryService.java:149)
    at hello.jspService(_hello.java:74)
    at com.orionserver[Oracle Containers for J2EE 10g (10.1.3.1.0) ].http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
    at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:453)
    at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:591)
    at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:515)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher
    .java:711)
    at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher
    .java:368)
    at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler
    .java:866)
    at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.HttpRequestHandler.processRequest(HttpRequestHandler
    .java:448)
    at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler
    .java:216)
    at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:117)
    at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:110)
    at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
    at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor
    .java:303)
    at java.lang.Thread.run(Thread.java:595)
    Caused by: java.net.ConnectException: Connection refused: connect
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
    at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
    at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
    at java.net.Socket.connect(Socket.java:507)
    at java.net.Socket.connect(Socket.java:457)
    at java.net.Socket.<init>(Socket.java:365)
    at java.net.Socket.<init>(Socket.java:207)
    at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.rmi.RMIClientConnection.createSocket(RMIClientConnection
    .java:682)
    at oracle.oc4j.rmi.ClientSocketRmiTransport.createNetworkConnection(ClientSocketRmiTransport.java:58)
    at oracle.oc4j.rmi.ClientRmiTransport.connectToServer(ClientRmiTransport.java:78)
    at oracle.oc4j.rmi.ClientSocketRmiTransport.connectToServer(ClientSocketRmiTransport.java:68)
    at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.rmi.RMIClientConnection.connect(RMIClientConnection.java
    :646)
    at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.rmi.RMIClientConnection.sendLookupRequest(RMIClientConnection
    .java:190)
    at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.rmi.RMIClientConnection.lookup(RMIClientConnection.java:174
    at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.rmi.RMIClient.lookup(RMIClient.java:283)

    looks like the connect string is wrong / especially that you use - I think SOA Suite ..
    so the string should be
    java.naming.provider.url=opmn:ormi://<hostname>:<opmnport -> 6003>:home/orabpel
    hth clemens

  • RMI UnmarshalException Occurs after some time

    Hi,
    I have a client server application that talks via rmi. My client saves data to a server or gets data by passing in parameters that include string, boolean and a Hashtable. The data is saved and retrieved many times. However, after some time, the RMI can't even find the method. That is, the client calls a method and I get a unmarshalling exception from the client, basically stating that it can't find the method.
    Here is the method in my interface, the method in question is the override method, the getLast works fine all the time:
    public interface Admin extends Remote
         Hashtable getLast(Hashtable setLashtHash) throws RemoteException;
    //override method can query or set a new data in the form of a hashtable. It return a Hashtable or null
         Object override(boolean setNew, String ticker, boolean getOverrideHash,boolean getLast, boolean getPrevious,Hashtable newOverride) throws RemoteException;
    Here's the implementation of override:
         synchronized public Object override(boolean setNew, String ticker, boolean getOverrideHash,boolean getLast, boolean getPrevious,Hashtable newOverride) throws RemoteException
              try{
              if(setNew)
                   if(newOverride!=null)
                   System.out.println("Saving override hash, entries=" + newOverride.size());
                   overrideHash=newOverride;
              else if(getOverrideHash)
                   if(overrideHash!=null)
                   System.out.println("Getting override hash entries=" + overrideHash.size());
                   return overrideHash;
              else
                   if(getLast)
                        if(overrideHash==null)
                             System.out.println("override hash is null");
                             return null;
                        OverrideStruct os=(OverrideStruct)overrideHash.get(ticker);
                        if(os.last!=null)
                             System.out.println("Last price for ticker " + ticker + " is=" +os.last);
                             Float last=os.last;
                             return last;
                        return null;
                   else if(getPrevious)
                        if(overrideHash==null)
                             return null;
                        OverrideStruct os=(OverrideStruct)overrideHash.get(ticker);
                        if(os.previous!=null)
                             Float previous=os.previous;
                             return previous;
                        return null;
         }catch(Exception e)
              System.out.println("Unknown Exception caught in override function");
              e.printStackTrace();
              return null;
    Here is the exception, please help.
    java.rmi.ServerException: RemoteException occurred in server thread; nested exce
    ption is:
    java.rmi.UnmarshalException: invalid method hash
    java.rmi.UnmarshalException: invalid method hash
    at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Unknow
    n Source)
    at sun.rmi.transport.StreamRemoteCall.executeCall(Unknown Source)
    at sun.rmi.server.UnicastRef.invoke(Unknown Source)
    at AdminImpl_Stub.override(Unknown Source)
    at StocksTable$12.run(stockstable.java:481)
    Please help,
    Thanks Steve

    By the way, this is how my server calls the client:
    Hashtable otable=(Hashtable)a1.override(false,new String(""),true,false,false,new Hashtable());

  • How to Convert an RMI Server into WINNT service

    I have an RMI Server, that looks like the following
    SimpleRMIServer.java
    import java.io.*;
    import java.rmi.*;
    import java.rmi.server.*;
    import java.rmi.registry.*;
    import java.rmi.*;
    import java.rmi.server.UnicastRemoteObject;
    public class SimpleRMIServer
    public static void main(String[] argv) {
    System.setSecurityManager(new RMISecurityManager());
    try {
    LocateRegistry.createRegistry(1099);
    SimpleRMIImpl implementation = new SimpleRMIImpl("SimpleRMIImpl instance");
    // SimpleRMIImpl implementation = new SimpleRMIImpl("SimpleRMIImpl instance");
    System.out.println("SimpleRMIImpl ready");
    catch (Exception e) {
    System.out.println("Exception occurred: " + e);
    the SimpleRMIImpl.java also is available. (SimpleRMIImpl.class)
    now the problem is how to convert this Server to a service.
    I have seen a java class that extends a service class have been converted to a service like the following
    TestService.java
    // TestService.java
    // (C) Copyright 1995 - 1999 Microsoft Corporation. All rights reserved.
    import java.io.*;
    import com.ms.service.*;
    public
    class TestService extends Service
    static
    // Uncomment to disable the assassin. The service will fail to respond
    // in the time specified in the last waithint for the third pause
    // event received. If the assassin is enabled (i.e. this line is commented
    // out, the default), then the service will be forcibly killed.
    //Service.disableassassin = true;
    int pausecount;
    int intcount;
    public TestService (String[] args) throws IOException
    System.out.println("Sending updated pending status");
    CheckPoint(1000);
    System.out.println("Sending running status with all controls");
    setRunning(ACCEPT_SHUTDOWN | ACCEPT_PAUSE_CONTINUE | ACCEPT_STOP);
    System.out.println("Started");
    protected
    boolean handleStop ()
    setStopping(5000);
    System.out.println("dying");
    return true;
    protected
    boolean handlePause ()
    pausecount++;
    if (pausecount == 3)
    System.out.println("pause #3, sleeping for 30 seconds, should be killed in 2+5 seconds");
    setPausing(2000);
    try
    Thread.sleep(30000);
    catch (InterruptedException e)
    System.out.println("interrupted");
    else
    System.out.println("received pause #"+pausecount+", pausing for 2 seconds");
    setPausing(5000);
    try
    Thread.sleep(2000);
    catch (InterruptedException e)
    System.out.println("interrupted");
    System.out.println("sending paused");
    setPaused();
    System.out.println("sent paused");
    return false;
    protected
    boolean handleContinue ()
    System.out.println("received continue, continuing after 2 seconds");
    setContinuing(5000);
    try
    Thread.sleep(2000);
    catch (InterruptedException e)
    System.out.println("interrupted");
    System.out.println("sending running");
    setRunning();
    System.out.println("sent running after continue");
    return false;
    protected
    boolean handleShutdown ()
    System.out.println("received shutdown, treating as stop");
    return handleStop();
    protected
    boolean handleInterrogate ()
    System.out.println("received interrogate");
    setServiceStatus(getServiceStatus());
    System.out.println("sent status for interrogate");
    intcount++;
    if (intcount == 3)
    System.out.println("received 3rd interrogate, stopping self in 5 seconds");
    try
    Thread.sleep(5000);
    catch (InterruptedException iex)
    System.out.println("interrupted");
    System.out.println("stopping");
    StopServiceEventHandler(1000);
    return false;
    using the jntsvc.exe tool, that code have been converted to an executable, then installed as a service.
    I've tried to embed the RMIServer code in the constructor for this service, but it didn't work
    Hope you have a clear understanding of what I'm saying
    any help, highly appreciated
    thanx in advance
    here is my email [email protected]
    regards

    Our second installment of "Questions from the Past"
    Dear viewer, check out Tomcat's source, I believe they implement Tomcat as a service so just follow what they did.
    Steve - your answer Guru
    Tune in next week for our third installment of "Questions from the past"

  • Precalculation Server error after 10 broadcasted workbooks

    Hi gurus,
    i have a question concerning broadcasting workbooks. We are using the newest precalculation server with patch 13. The first 10 workbooks are calculated and sent via email. The rest of workbooks calculated are sent as a job  but the RSRD_Log transaction shows an error. It begins with "Unresolved exception occured in the precalculation server" then next message "System.Runtime.InteropServices.comException. The RPC server is unavailable (Exception from HRESULT:xxxxxx) "
    Then some other messages are displayed. Then at the end it says cannot precalculate Workbook. In rsprecadmin  the server is green and ready.
    Is there any restrictionin sending via Email?
    How can i get the server again to continue sending?
    How can i clear the queue, to get the precalculation server ready to continue scheduled workbooks?
    Thanks and kind regadrs,
    Murat

    Hi Edward,
    we are testing the broadcast functionality and we want to go live first week in september. I hope you remember and suggested me the note which came out in CW33 with the precalculation server patch 13 . we are using it but still NVs but there is also the issue with the sizing. Last night we scheduled 16 times the same workbook.All 5 minutes one workbook should be sent out. 2 Precalculation server were set up to deal with them. In the SAP document "How to ...Troubleshoot Information Broadcasting (BEx Workbooks)" in chapter 2 it is mentioned that when ycurrently you can have 10 workbooks in the queue. Therefore we set up 2 precalculation server with 10 workbooks capacity. Then we set in the Broadcast setting the load balancing option without selecting any precalculation server. My intention would be the first 10 workbooks should be broadcasted with one of the precalculation server. After he has reached his capacity the next workbooks would be broadcasted with the second precalculation server. Am i wrong?
    When i check the queue i see the 16 workbooks in "Queue Overview of Proccessed Error-Free Precalculations" but with a duration with 0 seconds. the log says  in RSRD_LOG says as described before the first message is "Unresolved exception occurred on the precalculation server" then "System.Runtime.InteropServices.COMException (0x800 0706BA): The RPC server is unavailable. (Exception" and at the end "Cannot precalculate workbook ZBROADCAST_TEST". I can see that when load balancing the second server is not used.
    But while seraching for precalculation server it says "Precalculation server PRECALC_2 has only                                                 0 free instanzen => not selected" but why. it has never been used why 0 instances free?

  • How to Start Java RMI Server Application as Windows NT Service

    Hi!!,
    I have problem regarding the Installation of Java Application as NT Service this Java app in turn will start RMI Registry using LocateRegistry.createRegistry() at some specific port number. The Service is created successfully but i have problem regarding the Accessing of this Remote Object using Lookup() .(ie) I am able to get the RMI Registry Obj Refererce of the Java Rmi Application but couldn't able to Lookup for the Object registered to this Rmi Registry.I am not able to proceed after getting the Rmi Registry reference.
    So any help Regarding this is appreciated.
    Thanks in Advance.
    with regards,
    Ramakrishna M
    Mail: [email protected]

    Hello,
    I have started a Java RMI Server Application as NT Service using JNT (download it from www.eworksmart.com/JNT/ ).
    It is working fine.
    S. Navaneethakrishnan
    [email protected]

Maybe you are looking for

  • DBMS_Stats package body is missing on unix install

    I ran dbmsstats.sql again after I got the following error message ORA-04068: existing state of packages has been discarded ORA-04067: not executed, package body "SYS.DBMS_STATS" does not exist ORA-06508: PL/SQL: could not find program unit being call

  • Urgent : Character set problem

    We have one test server in India and another one in Europe. The character setconfigured in Indian server is US7ASCII and in Europe it is configured as WE8ISO8859P1. We have a routine that encrypts the password using 'crypt' command of HP-UX 10.20. In

  • Creating Alert Reports in BIP

    What is the best way to create alert (conditional) reports in BIP? I am relatively new to BIP. My apologies if this is a stupid question but I haven't found a solution that doesn't feel like a hack. We've used BIP bursting with a condition built into

  • I have a new Macbook Pro and it will not

    I have a new macbook pro, and I recently tried to reboot from my Leopard Install DVD. Everytime it starts up I get he freezing process screen and have to hold the start button to restart the system. I cannot fix the hard drive because the computer wo

  • Cannot read CD-Rs but can read DVDs

    I cant understand this... Regardless or not if a CD-R is factory burned, burned by myself (in the past)or is unburned - my computer cannot read the disc and spits it out. Any kind of DVD I put in there it reads fine. I am running 10.5.4. The funny th