Java Rmi Client behind firewall

What port should be opened to let rmi traffic passing through firewall to weblogic app server?

Dahan <[email protected]> writes:
What port should be opened to let rmi traffic passing through firewall to weblogic app server?The port the server is listening on?
andy

Similar Messages

  • RMI Clients behind firewall

    When the RMI client behind firewall tries to access the server the following error is thrown up:
    java.rmi.ConnectIOException: Exception creating connection to: 10.130.12.128; ne
    sted exception is:
    java.net.NoRouteToHostException: Operation timed out: no further informa
    tion
    java.net.NoRouteToHostException: Operation timed out: no further information
    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.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)
    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.invoke(Unknown Source)
    at RMIFaxServer_Stub.getResult(Unknown Source)
    at FaxTest.main(FaxTest.java:51)

    your client is behind the firewall but the server you're trying to access has an address 10.x.x.x which says that it too is behind a firewall and not on the Internet, or is the server in a DMZ. It sounds more like a networking issue than a java problem at this point. If the server is on some side of a firewall, you may need a some sort of "permit established" config setting added to the firewall. Just a thought.

  • RMI server behind firewall--must use host as name, not IP

    Server is running behind a firewall, which runs such that any machine behind the firewall cannot use the external IP to get back to itself.
    That is:
    - outside IP = 192.171.20.5 (port forwards 1099 to 192.168.1.5:1099)
    - inside IP = 192.168.1.5 (rmi server listens on 1099)
    from the machine inside (192.168.1.5), it is IMPOSSIBLE to create a socket to [outside ip](192.171.20.5), port 1099, and expect it to get back to the machine inside--the firewall prohibits this.
    I -can- use name-based lookups, such that I can edit the hosts file on the inside box to route (myhost.com to 192.168.1.5). So, if everyone's DNS resolves myhost.com -> 192.171.20.5, then clients anywhere can go to myhost.com:1099 and will be redirected to my internal machine (192.168.1.5:1099).
    The problem with this is that the names get translated to IPs and sent back to the client.
    Is there a way to keep the names as names, so that both client (using external real-world DNS entries) and server (using local hosts file) can both resolve to the proper IP addresses?
    I'm starting server, as follows:
    java -Djava.rmi.server.codebase=http://myhost.com/rmi/ -Djava.security.policy=/policypath/policy -Djava.rmi.server.hostname=myhost.com mypkg.myclass
    The client connects and gets this message (from a connection exception):
    java.rmi.ConnectException: Connection refused to host: 192.168.1.5;

    Server is running behind a firewall, which runs such
    that any machine behind the firewall cannot use the
    external IP to get back to itself.I dont really understand this statement.. Machines behind the firewall referring to the external ip would be going to the gateway, not themselves.. Or do you have an internal AND external ip on the machines behind the firewall? Or are we referring to the gateway machine as an internal machine as well as external?
    That is:
    - outside IP = 192.171.20.5 (port forwards 1099 to
    192.168.1.5:1099)
    - inside IP = 192.168.1.5 (rmi server listens on
    1099)looks good, what kinda OS/firewall? If we're talking linux/ipchains (or iptables) with ip masquerading, I may be of some use to you...
    from the machine inside (192.168.1.5), it is
    IMPOSSIBLE to create a socket to [outside
    ip](192.171.20.5), port 1099, and expect it to get
    back to the machine inside--the firewall prohibits
    this.If you're on the internal network, why can't you just go for the internal ip addr? If I'm understanding correctly, you want internal dns requests for myhost.com to resolve to 192.168.1.5, and external dns requests to resolve to 192.171.20.5? That should't be a problem...
    I -can- use name-based lookups, such that I can edit
    the hosts file on the inside box to route (myhost.com
    to 192.168.1.5). So, if everyone's DNS resolves
    myhost.com -> 192.171.20.5, then clients anywhere can
    go to myhost.com:1099 and will be redirected to my
    internal machine (192.168.1.5:1099).the hosts file has nothing to do with routing, it's simply a dns-type thing... If your dns is giving external users a 192.168 address as the ip for myhost.com, they will never get to it. 192.168 is not routable on the internet, i think most inet routes will drop packets from 192.168.x.x or 10.x.x.x.
    Is there a way to keep the names as names, so that
    both client (using external real-world DNS entries)
    and server (using local hosts file) can both resolve
    to the proper IP addresses?As long as your dns is working correctly, java doesn't care if you use ips or host names.. Hostnames are preferable, so when you change your network around, you wont affect your rmi server.
    I'm starting server, as follows:
    java -Djava.rmi.server.codebase=http://myhost.com/rmi/
    -Djava.security.policy=/policypath/policy
    -Djava.rmi.server.hostname=myhost.com mypkg.myclass
    The client connects and gets this message (from a
    connection exception):
    java.rmi.ConnectException: Connection refused to host:
    192.168.1.5;Is your server compiled with the 192.171 ip? That's not gonna work, you have to use the same IP the server is running on. I'm still not clear on your network layout, is 192.171.20.5 and 192.168.1.5 the 2 gateway ip's, or is 192.168.1.5 a physically different machine? I'd be willing to bet that your server is compiled with the external address, and if that's not the same machine, then there's no chance of that working....
    There's more than port forwarding going on.. IIRC, java rmi keeps track of its own ip's.. A client request to an external ip will not connect to a server running on the internal ip, even if you forward the port, rmi itself doesn't recognize the internal as the ip it's trying to get to (even if it is true), so it bombs out.. This can happen if you run the rmi server on a gateway, and compile the server with the external ip, and try to connect to the internal ip.. If you want external machines to connect, you MUST run the server on an external ip.
    Give a little more info, we'll getcha running... I'm also assuming you have full control of your network (ie, firewall/dns)
    doug

  • Multiple ichat clients behind firewall?

    IS it possible to have multiple ichat clients behind a firewall? I've just bought a macbook pro and would like to purchase two more for ichat functionality. Two of these will be behind one firewall, the other across the country. I can't find any documentation other than how to configure a single ichat client.
    Is it possible? It's ok if we have to purchase an xserve and run some kind of server our end - I just want it to work.
    Message was edited by: paulgami

    Hi paulgami,
    iChat will work behind a firewall or routing device.
    With routing device the easiest method is UPnP which allows the Apps to open the ports and allows multiple computers to use the same ports.
    A device that has Port Triggering can also allow multiple computers to use the same ports.
    If you mean that you want the Bonjour side or even the Jabber side (in the iChat Server in OS X serve) to be in the same Network you will have to look to setting up VPNs (virtual Private Networks) to cover the distances you are talking about.
    It may be just semantics but it helps if we know which bit of iChat you are talking about.
    Tiger 10.4.x OS X Serve has an Jabber Server that can be used with the Jabber side of iChat (iChat 3.x)
    Each computer already has the iChat Client.
    There are also Public Jabber servers including Googletalk to use with the Jabber side of iChat.
    The Main Buddy list obviously uses the AIM service and again this can be world wide.
    iChat also has the Bonjour side. This can find any other Mac on the same network. It uses the user's Address Book to broadcast a Screen Name for the other iChat clients (separate buddy List)
    Possibly start here
    http://www.ralphjohnsuk.dsl.pipex.com/index.html
    Just getting started ?
    http://www.siriusaddict.com/ichat.html
    Collaboration Services Forum in OS XServer
    http://discussions.apple.com/forum.jspa?forumID=700
    8:44 PM Monday; August 13, 2007

  • Callback cannot be done if client behind firewall. But WHY?

    I've read a lot of threads regarding callback is not achievable if client is behind firewall. But i couldn't find the DETAILED reason for that. Can anyone explain that?
    Thank,
    Jax

    In order for a server to asynchronously callback a client, it must create an inbound socket connection to the client, to send the message. This is precisely the type of thing a firewall is designed to prevent.
    To receive callbacks, the firewall would have to open a specific port for inbound connections to the client, and the server would have to be aware of this port as well.

  • Rmi/iiop with clients behind firewall?

    I have a client app (standalone/applet) that will be running behind a firewall and I'm trying to connect it to S1AS7 through rmi/iiop. I keep getting some connection exceptions on the server when it tries to connect back to the client. Is there anyway to find out which port the server tries to connect to the client so I can open up that port with the firewall? Is there any other workarounds?

    Check out the below document. This is a document for the earlier version of the appserver, but I guess this part should still hold good in S1AS 7 :
    http://docs.sun.com/source/816-5777-10/jpgrichc.htm#24425
    Basically, during the RMI-IIOP communication, the ports are assigned dynamically and hence we cannot exactly say which ports will be used for the response.
    As a general rule of thumb, the response will be going through the ephemeral ports. (Ephemeral ports are temporary ports assigned by a machine's IP stack, and are assigned from a designated range of ports for this purpose. When the connection terminates, the ephemeral port is available for reuse, although most IP stacks won't reuse that port number until the entire pool of ephemeral ports have been used. So, if the client program reconnects, it will be assigned a different ephemeral port number for its side of the new connection.)
    So, it is advisable to open the the entire ephemeral port range in the firewall.
    On Solaris, the ephemeral port range can be determined using the below command :
    # /usr/sbin/ndd /dev/tcp tcp_smallest_anon_port tcp_largest_anon_port
    These values could also be altered using the below commands :
    # /usr/sbin/ndd -set /dev/tcp tcp_smallest_anon_port 49152
    # /usr/sbin/ndd -set /dev/tcp tcp_largest_anon_port 61000
    Hope that helps...
    Cheers,
    VM

  • Java chat client behind the proxy or fire wall

    i am developing the chat application useing java.net.*.but i am not able to get connectivity behind the firewall or proxy on the java client.pls help me out

    to guarantee easy to use, no problem chat applet then you will need to have the chat server running on port 80 and the client use http request/response system
    first problem is that the applet will have to have been delivered from port 80 on the same ip# so you will either have to use Servlets or write your own web server with chat facilities
    you will need to maitain persistent/ pseudo persistent http connections for the server to deliver messages to clients, you can assume that a connection will remain open for ~ 5 minutes after a request from the client
    use HTTP/1.1 for reliable Connection: keep-alive and request/response pipelining
    with all that in place your client method is...
    register and send GET /chat <wait for upto 5 mins>
    if there is client activity send POST/chat <wait for upto 5 mins>
    if the above waits timeout send GET/chat <wait for upto 5mins>
    server method...
    accept GET/POST requests from client
    if there is chat to deliver, reply to most recent request from client
    if you recive another request before the previous one's reply is used, send a No Content reply to the previous request

  • Why Java RMI client failed to invoking a mid-tier BPEL process?

    I have followed the sample code (102.InvokingProcess/rmi). I have problem invoking the same process from the mid-tier server. Here is what I got:
    [java] {java.naming.provider.url=ormi://btl-larcis5:12401/orabpel, java.nam
    ing.factory.initial=com.evermind.server.rmi.RMIInitialContextFactory, orabpel.pl
    atform=oc4j_10g, java.naming.security.principal=admin, java.naming.security.cred
    entials=welcome}
    [java] java.lang.Exception: Failed to create "ejb/collaxa/system/DomainMana
    gerBean" bean; exception reported is: "javax.naming.NamingException: Lookup error: javax.naming.AuthenticationException: No such domain/application: orabpel; nested exception is:
    [java] javax.naming.AuthenticationException: No such domain/application: orabpel [Root exception is javax.naming.AuthenticationException: No such domain/application: orabpel]
    Here is my context.properties :
    orabpel.platform=oc4j_10g
    java.naming.factory.initial=com.evermind.server.rmi.RMIInitialContextFactory
    java.naming.provider.url=ormi://my-mid-tier:12401/orabpel
    java.naming.security.principal=admin
    java.naming.security.credentials=welcome
    I know the problem is in the provider url. If I change the java.naming.provider.url =ormi://my-pc /orabpel then it works fine. Has anyone gotten the sample code working from a mid-tier installation? My mid-tier is on version 10.1.2.02. Port 12401 is the default port number for RMI.

    I figured it out! The reason it did not work was the port number in the provider URL was wrong. It should be 12402. It toke me a little while to figure it. Should this be documented somewhere?

  • Exception in the main client program: java.rmi.ConnectException: Connection

    Hi
    I have written a program in Java using RMI and it runs perfectly fine on my pc(localhost). But when I run it on the LAN in my office, the client program stucks and I get an exception
    ***Exception in the main client program: java.rmi.ConnectException: Connection refused to host***
    ***java.net.ConnectException: Connection timed out: connect***
    Do we need to make some settings in the RMI server...or some firewall issue is there...By default port is 1099 as used by RMI registry server
    Please help me TIA
    vnx_in

    Hi, i am having the same java.rmi.ConnectException, but the problem is that i can't even run it on localhost. I simply can't start my server, and i am getting a problem on Naming.rebind, however i think it could be because i am using an static ip to connect to internet in the LAN of my town. Does it matter in this case. I would be so thankful, because i am not able to solve it after many efforts.
    Thanks in Advance :)

  • Java.rmi.ConnectException using webstart Swing client with WL 8.1 SP2 in a

    Hi all,
    I'm receiving the following exception when invoking a remote method on
    a cached remote stub. This only happens if there are at least two
    nodes running in a cluster. It happens more often the more nodes are
    running.
    It seems that the exception occurs if for a call to a remote method a
    cached stub is used, and if that call is referred to a different node
    in the cluster by the load balancer than the one that the stub
    originally came from. But I'm not completely sure about that...
    Client side config:
    Webstart
    JDK 1.4.2_05
    weblogic.jar (we're experiencing other problems already discussed in
    this group when using wlclient.jar)
    Server side config:
    Weblogic 8.1 SP2
    cluster on Sun Solaris machines (two nodes, one manager)
    Here is the exception stacktrace:
    java.rmi.ConnectException: Could not establish a connection with
    2198062098923170717S:shebea219:[7001,7001,-1,-1,7001,-1,-1,0,0]:SHEBEA219,SHEBEA334:DaGama:DaGamaNode1,
    java.security.AccessControlException: access denied
    (java.net.SocketPermission shebea219 resolve)
    at weblogic.rjvm.RJVMImpl.getOutputStream(RJVMImpl.java:316)
    at weblogic.rjvm.RJVMImpl.getRequestStream(RJVMImpl.java:488)
    at weblogic.rjvm.RJVMImpl.getOutboundRequest(RJVMImpl.java:584)
    at
    weblogic.rmi.internal.BasicRemoteRef.getOutboundRequest(BasicRemoteRef.java:91)
    at
    weblogic.rmi.internal.activation.ActivatableRemoteRef.invoke(ActivatableRemoteRef.java:69)
    at
    de.conet.dagama.interesengine.nativesession.SBNativeSession_8da95c_EOImpl_812_WLStub.isConnected(Unknown
    Source)
    at
    de.conet.dagama.agent.flight.nativ.FlightNativeListener.doExitNativeSession(FlightNativeListener.java:244)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at
    de.objektpark.framework.command.CommandInvoker.invoke(CommandInvoker.java:132)
    at
    de.objektpark.framework.command.CommandProcessor.doService(CommandProcessor.java:169)
    at
    de.objektpark.framework.command.CommandProcessor.service(CommandProcessor.java:131)
    at
    de.objektpark.framework.command.CommandProcessor.execute(CommandProcessor.java:71)
    at
    de.conet.webactiv.swing.command.GUICommandProcessor.execute(GUICommandProcessor.java:87)
    at
    de.conet.webactiv.swing.controller.GUICommandController.execute(GUICommandController.java:98)
    at
    de.conet.webactiv.swing.controller.GUICommandController.execute(GUICommandController.java:124)
    at
    de.conet.dagama.agent.flight.nativ.FlightFreeNativeView.this_windowClosing(FlightFreeNativeView.java:84)
    at
    de.conet.dagama.agent.flight.nativ.FlightFreeNativeView$1.windowClosing(FlightFreeNativeView.java:73)
    at java.awt.AWTEventMulticaster.windowClosing(Unknown Source)
    at java.awt.Window.processWindowEvent(Unknown Source)
    at javax.swing.JFrame.processWindowEvent(Unknown Source)
    at java.awt.Window.processEvent(Unknown Source)
    at java.awt.Component.dispatchEventImpl(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Window.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown
    Source)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    Has anyone ever come across the same problem and possibly found a
    solution?
    Any help would be greatly appreciated.
    Thanks in advance
    Rolf

    Hi all,
    I'm receiving the following exception when invoking a remote method on
    a cached remote stub. This only happens if there are at least two
    nodes running in a cluster. It happens more often the more nodes are
    running.
    It seems that the exception occurs if for a call to a remote method a
    cached stub is used, and if that call is referred to a different node
    in the cluster by the load balancer than the one that the stub
    originally came from. But I'm not completely sure about that...
    Client side config:
    Webstart
    JDK 1.4.2_05
    weblogic.jar (we're experiencing other problems already discussed in
    this group when using wlclient.jar)
    Server side config:
    Weblogic 8.1 SP2
    cluster on Sun Solaris machines (two nodes, one manager)
    Here is the exception stacktrace:
    java.rmi.ConnectException: Could not establish a connection with
    2198062098923170717S:shebea219:[7001,7001,-1,-1,7001,-1,-1,0,0]:SHEBEA219,SHEBEA334:DaGama:DaGamaNode1,
    java.security.AccessControlException: access denied
    (java.net.SocketPermission shebea219 resolve)
    at weblogic.rjvm.RJVMImpl.getOutputStream(RJVMImpl.java:316)
    at weblogic.rjvm.RJVMImpl.getRequestStream(RJVMImpl.java:488)
    at weblogic.rjvm.RJVMImpl.getOutboundRequest(RJVMImpl.java:584)
    at
    weblogic.rmi.internal.BasicRemoteRef.getOutboundRequest(BasicRemoteRef.java:91)
    at
    weblogic.rmi.internal.activation.ActivatableRemoteRef.invoke(ActivatableRemoteRef.java:69)
    at
    de.conet.dagama.interesengine.nativesession.SBNativeSession_8da95c_EOImpl_812_WLStub.isConnected(Unknown
    Source)
    at
    de.conet.dagama.agent.flight.nativ.FlightNativeListener.doExitNativeSession(FlightNativeListener.java:244)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at
    de.objektpark.framework.command.CommandInvoker.invoke(CommandInvoker.java:132)
    at
    de.objektpark.framework.command.CommandProcessor.doService(CommandProcessor.java:169)
    at
    de.objektpark.framework.command.CommandProcessor.service(CommandProcessor.java:131)
    at
    de.objektpark.framework.command.CommandProcessor.execute(CommandProcessor.java:71)
    at
    de.conet.webactiv.swing.command.GUICommandProcessor.execute(GUICommandProcessor.java:87)
    at
    de.conet.webactiv.swing.controller.GUICommandController.execute(GUICommandController.java:98)
    at
    de.conet.webactiv.swing.controller.GUICommandController.execute(GUICommandController.java:124)
    at
    de.conet.dagama.agent.flight.nativ.FlightFreeNativeView.this_windowClosing(FlightFreeNativeView.java:84)
    at
    de.conet.dagama.agent.flight.nativ.FlightFreeNativeView$1.windowClosing(FlightFreeNativeView.java:73)
    at java.awt.AWTEventMulticaster.windowClosing(Unknown Source)
    at java.awt.Window.processWindowEvent(Unknown Source)
    at javax.swing.JFrame.processWindowEvent(Unknown Source)
    at java.awt.Window.processEvent(Unknown Source)
    at java.awt.Component.dispatchEventImpl(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Window.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown
    Source)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    Has anyone ever come across the same problem and possibly found a
    solution?
    Any help would be greatly appreciated.
    Thanks in advance
    Rolf

  • JSP client in RMI system - java.rmi.UnmarshalException: error unmarshalling

    Hi,
    Im developing a login part for a distributed airline reservation system using JSP as the client but while executing the jsp, the error that is being catched is :
    java.rmi.UnmarshalException: error unmarshalling return; nested exception is: java.lang.ClassNotFoundException: AirlineImpl_Stub (no security manager: RMI class loader disabled)
    Here are my codes:
    //Interface - Airline.java
    package Air;
    import java.rmi.*;
    public interface Airline extends Remote
         public int CheckUname(String username) throws RemoteException;
    }//implementation - AirlineImpl.java
    import java.net.*;
    import java.io.*;
    import java.sql.*;
    import java.rmi.*;
    import java.rmi.server.UnicastRemoteObject;
    public class AirlineImpl extends UnicastRemoteObject implements Airline
         public AirlineImpl() throws RemoteException
              super();
         public int CheckUname(String username) throws RemoteException
              try
                   int UnameCount = 0;
                   String xxx = "eaglebeta";
                   if(username.equals(xxx)
                        UnameCount++;
                   return UnameCount;
              catch (Exception e3)
                   System.out.println("Error: " + e3);
                   return 0;
    }//Server - AirlineServer.java
    import java.rmi.*;
    import java.rmi.server.UnicastRemoteObject;
    public class AirlineServer
         public static void main(String arg[])
              try
                   Airline myAirline = new AirlineImpl();
                   Naming.rebind("Airline", myAirline);
                   System.out.println();
                   System.out.println("************************************");
                   System.out.println(" >>> Airline Reservation System <<< ");
                   System.out.println("    >>> Server is Listening! <<<    ");
                   System.out.println("************************************");
                   System.out.println();
              catch (RemoteException e)
                   //System.out.println("Error: " + e);
                   System.out.println("RMI Registry is not active!");
                   System.out.println("Activate RMI Registry and retry!");
                   System.out.println("Bye bye, exiting...");
              catch (java.net.MalformedURLException e)
                   //System.out.println("URL Error: "+ e);
                   System.out.println("URL Malformed!");
                   System.out.println("Bye bye, exiting...");
    }//JSP client - newuser.jsp
    <%@ page contentType="text/html; charset=iso-8859-1" language="java" import="java.sql.*" errorPage="" %>
    <%@ page import="java.rmi.*, javax.servlet.*" %>
    <%@ page import="java.util.*, java.lang.*, java.io.*, Air.Airline" %>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    </head>
    <body bgcolor="#99CCFF">
    <%
    Object Airline = null;
    try
    Airline Air = (Airline)Naming.lookup("rmi://localhost/Airline");
    String Name = "eaglebeta";
    if(Air.CheckUname(Name)>0)
         %>
              Username already exists, choose another name
         <%
    else
         %>
         <%=Name%>
         <%
    catch (Exception e1)
    %>
    <%=e1%>
    <%
    %>
    </body>
    </html>The server, implementation, interface and stub are in a folder named "Airline Server" located on my desktop.
    The interface and stub again are in another folder named "Air" located in the "classes\Air" directory which is located in the tomcat 5.5 installation directory!
    The JSP client is located in the "Root" folder in the tomcat 5.5 installation derectory!
    1. I start the registry in the "Airline Server" folder by typing rmiregistry
    2. Load the Airline Server - java AirlineServer
    3. Call the jsp - http://localhost/newuser.jsp
    And i get the following error:
    java.rmi.UnmarshalException: error unmarshalling return; nested exception is: java.lang.ClassNotFoundException: AirlineImpl_Stub (no security manager: RMI class loader disabled)
    Please help me to solve this problem!

    When I am including security manager in my JSP code, the browser just get blank without any display
    if(System.getSecurityManager() == null)
         System.setProperty("java.security.policy", "java.policy");
        System.setSecurityManager(new RMISecurityManager());
    }Please, someone solve my problem! Im realy stuck and I don't know how to proceed! Provide me with a solution or any tutorial that would help me...

  • JAX-RPC Client - java.rmi.RemoteException:/getPort best practices

    We are working on java webservices(JAX-RPC style) and while consuming Java WebService sometime getting ‘Remote Exception’ .I have generated client side code with weblogic ant task “clientgen”.
    1: Exception
    java.rmi.RemoteException: SOAPFaultException - FaultCode [{http://schemas.xmlsoap.org/soap/envelope/}Server] FaultString [Failed to invoke end component {service implementation class name} (POJO), operation= {webmethode name}
    -> Failed to invoke method
    ] FaultActor [null] Detail [<detail><java:string xmlns:java="java.io">java.lang.NullPointerException
    </java:string></detail>]; nested exception is:
    weblogic.wsee.jaxrpc.soapfault.WLSOAPFaultException: Failed to invoke end component {service implementation class name} (POJO), operation={webmethode name}
    -> Failed to invoke method
    {Package name}.ManagementPortType_Stub.createXXX(xxxPortType_Stub.java:37) // This line is clientgen generated code
    {From this line its clear that clientgen generated code failed to get webservice port}
    2: Following is our implementation to invoke webservice:
    ManagementService service =
    new ManagementService_Impl(“WSDL URL”)
    ManagementPortType port = service.getManagerHTTPPort();
    Port.getServiceName();
    Our code is executing first two lines for every webservice request, and as per our observation these two lines (mark in bold) is taking long time to execute and due to this sometime gives ‘remote exception’ (when there is more request for web service consumption).
    3: My questions:
    1> Why does it take so long on initialization of service and port object?
    2> Is there any problem if I share “port” object for multiple request?
    3> what are the best practices in this type of implementation?
    Help would be greatly appreciated !

    Hi,
    Thanks for your reply.
    My service is deployed and working fine.
    NPE is due to {Package name}.ManagementPortType_Stub is null and code is executing createXXX() methode on it.
    Anyway i cant do anaything here because this is a clientgen generated code.

  • Why do we obtain a java.rmi.MarshalException during a stateless session bean method invocation from a client java program?

    Hello,
    we're using iAS SP3.
    We deployed a stateless session bean that has a business methods with a Vector as argument (put (vector, String)).
    If we call it from a servlet, it works fine. But when we try to call it from a thread, started in a standalone java client program, we obtain a java.rmi.MarshalException.
    We tried to use Vector and HashSet objects as arguments, but we always obtain this kind of exception. It seems strange because a similar
    method that returns a Collection of objects (getAll) works fine. This is the our bean Remote Interface:
    public interface Receive extends EJBObject {
    public void putMessage(Message message, java.lang.String la) throws RemoteException; // it works fine!!!
    public void putMessages(java.util.Vector messages, java.lang.String la) throws RemoteException; // it doesn't work!!!
    Collection getAll (java.lang.String la) throws RemoteException, EJBException; // it works fine!!!!
    This is the java client stack trace:
    java.rmi.MarshalException: CORBA MARSHAL 0 No; nested exception is:
    org.omg.CORBA.MARSHAL: minor code: 0 completed: No
    org.omg.CORBA.MARSHAL: minor code: 0 completed: No
    at java.lang.Class.newInstance0(Native Method)
    at java.lang.Class.newInstance(Class.java:241)
    at com.sun.corba.ee.internal.iiop.ReplyMessage.getSystemException(ReplyMessage.java:93)
    at com.sun.corba.ee.internal.iiop.ClientResponseImpl.getSystemException(ClientResponseImpl.java:82)
    at com.sun.corba.ee.internal.corba.ClientDelegate.invoke(ClientDelegate.java:199)
    at org.omg.CORBA.portable.ObjectImpl._invoke(ObjectImpl.java:248)
    at ejb._Receive_Stub.putMessages(_Receive_Stub.java:731)
    at commlayer.Receiver.run(Receiver.java:67)
    Does anyone know how to solve this problem?
    Thank you in advance,
    Maurizio

    This is big bug!
    This seems to occur when you try to return complex objects (e.g. a vector of classes or even the Date class).
    As a workaround you can add this Ejb or module to the iPlanet Classpath (NT via kregedit, Sun via iasenv skript.).
    This helps but i really don't know why.
    It should be fixed in 6.5, maybe. We'll see.
    Regards

  • Reply to client by setting properties of java.rmi

    Hi All,
    I am very new to JAVA RMI.
    Is it possible for me to send a reply to client by setting the properties of java.rmi ?. I mean the reply string , if i am returning a string to client program ?.
    Shammi

    I will be more specific.
    What I meant by properties is system properties applied to the classes in java.rmi.* which we can set. For example,
    System.setProperty("java.rmi.server.codebase", "file://home/shammi/test");
    For the second portion, for example, if my server returns the string "Hello World" to the client, I will have a server method some what similar to the one given below
    public String SayHello()     {
              return "Hello World\n";
    Is it possible for me to do this in another way rather than explicitly specifying the return string.
    Shammi

  • Client connect via java.rmi

    I am trying to fidnd the simplest method for connecting to Weblogic RMI registry to
    get a reference to a server program which implements a component interface with PeopleSoft.
    Can normal java.rmi be used to get that reference, if so how can I find out which
    port to use to send the reqest.
    Or do I have to use http tunelling or t3 protocols? This is a junit test so I want
    to avoid loading the weblogic rmi implementation and security classes required to
    keep it as simple as possible.
    Thank you.

    You also need to make sure you generated the IIOP stubs using -iiop with the ejbc compiler...
    Andy Piper wrote:
    Neil Forrest <[email protected]> writes:
    I am trying to access an EJB deployed in Weblogic 6.0 via a Java client using RMI-IIOP.
    I can connect to the server and get an Initial Context and even find the EJB using its JNDI Name.
    But when I try to pull back the EJBHome object using the PortableRemoteObject.narrow method I get a class cast exception.
    Can anyone shed some light on this ?This is doc'd in the 6.1 examples or you can find out from previous
    postings on this newsgroup. You need to use a security manager in the
    client.
    andy

Maybe you are looking for

  • XML Data into oracle table

    Hi All, I am trying to insert data into oracle 9i temp tables using the following style. but getting error as ERROR at line 3 ORA-00933 SQL command not properly ended Please assist me. INSERT INTO emp (empname,empno) SELECT * FROM XMLTABLE ( '/EMP/CO

  • Acrobat X Pro failed to connect to a dde server

    I've been running Win 7 64 bit with near flawless results for some time now. This morning I made a pdf via ID but couldn't get Acrobat to open it up. I tried other, older pdfs with no luck. Double clicking on Acrobat X Pro gets me no where except the

  • Creating a new iPad 2 apple ID from current account

    My wife and I have been using the same apple ID.  Now, we need to create a second account.  Is there a way to copy my current ipad apps and settings to new account?

  • Assignment of output type to billing document

    I have a billing document for which output type is not assigned. Now, whenever I am trying to take the print by VF02, it is asking for output type. and i am giving any output type, the error is coming that " No output type is assigned to the billing

  • Send Unix Command Miscellaneous/Login template missing

    I'm wondering why the " Apple Remote Desktop" Administrator Guide depicts "Login Users" as an option in the default templates menu of the Send Unix Command/Templates/Miscellaneous/Login users ? In my actual ARD 3.2.2 Admin, the template menu list ski