Problems running a simple RMI

Hi there,
I have had alot of problems running a small RMI program.
It has now boiled down to a java.lang.NoClassDefFoundError
when i try to use my policy file.
The program complies, when i run javac *.java
It also creates the stub, when i run rmic.
I have trawled alot of forums and the closest answer i got was "add your classpath".
As im a student of java, this does not really tell me much.
The class/java files are in
C:\Documents and Settings\MONDARIZ\workspace\RmiHello\server
The policy file is also in the folder.
I must add, that the program is from an example, so i would not think there is any coding errors.
Also when i run it en eclipse, i get "Hello server failed: java.security.AccessControlException: access denied (java.net.SocketPermission 127.0.0.1:1099 connect,resolve)"
So it seems something is running.

The answer you found is correct. Java needs to know where to find the class files for execution.
For starters, use the environment variable CLASSPATH. Set the value to:
C:\Documents and Settings\MONDARIZ\workspace\RmiHello\server
This way whatever you run (RMI Registry, Server, Client) has the proper class path. When you get everything running ok, then you can look into other methods of specifying where the class files are found.
Eclipse, as well as command line Java starts, need to find the policy file. Set up this:
-Djava.security.policy=C:\Documents and Settings\MONDARIZ\workspace\RmiHello\server\your_policy_file.xxx

Similar Messages

  • Problem running a simple Hello World RMI Program

    I wrote a simple RMI application, consisting of a Server Interface, Server Implementation and a Client.
    Since the codes are really small, am pasting them here so that you could identify the problem if any, in the code.
    1. Server Interface......
    import java.rmi.* ;
    public interface HelloInterface extends java.rmi.Remote
         public void sayHello(String arg) throws RemoteException ;
    2. Server Implementation......
    import java.rmi.* ;
    import java.rmi.server.* ;
    public class HelloImpl extends UnicastRemoteObject implements HelloInterface
         public HelloImpl() throws RemoteException
              super() ;
         public void sayHello(String arg) throws RemoteException{
              try{
                   System.out.println("RMI Program : Hello "+arg) ;
              catch(Exception e){
                   e.printStackTrace() ;
                   //throw new java.rmi.UnexpectedException("undeclared checked exception", e);
         public static void main(String[] args) throws RemoteException
              try{
                   if( System.getSecurityManager() == null )
                        System.setSecurityManager( new RMISecurityManager() ) ;
                   HelloImpl impl = new HelloImpl() ;
                   Naming.bind("HelloService",impl) ;
                   System.out.println( "Service bound..." ) ;
              catch(Exception e){
                   e.printStackTrace() ;
                   //throw new java.rmi.UnexpectedException("undeclared checked exception", e);
    3. Client Code.
    import java.rmi.* ;
    import java.rmi.Naming.* ;
    class RMIClient
         public static void main(String[] args)
              try{
                   if(System.getSecurityManager()==null)
                        System.setSecurityManager( new RMISecurityManager() ) ;
                   HelloInterface helloInt = (HelloInterface) Naming.lookup("rmi://sand.cise.ufl.edu/HelloService") ;
                   helloInt.sayHello("Ranjit") ;
              catch(Exception e){
                   e.printStackTrace() ;
    I have double checked the classpaths and they all look fine..
    I have even unset the classpath from the shell which runs the rmiregistry..am still getting these errors..
    1. If i use the default java to run the application..this is the error that it spits..
    sand:24% java -Djava.security.policy=java.policy HelloImpl
    java.rmi.UnexpectedException: undeclared checked exception; nested exception is:
    java.lang.ClassNotFoundException: HelloImpl_Stub
    at sun.rmi.registry.RegistryImpl_Stub.bind(Unknown Source)
    at java.rmi.Naming.bind(Naming.java:110)
    at HelloImpl.main(HelloImpl.java:28)
    Caused by: java.lang.ClassNotFoundException: HelloImpl_Stub
    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:350)
    ... 3 more
    2. Using java from some other location..the error looks different...but in both cases it just gives errors :((
    sand:25% /usr/java1.2/bin/java -Djava.security.policy=java.policy HelloImpl
    java.rmi.UnexpectedException: undeclared checked exception; nested exception is:
    java.lang.ClassNotFoundException: HelloImpl_Stub
    java.lang.ClassNotFoundException: HelloImpl_Stub
    at java.lang.Throwable.fillInStackTrace(Native Method)
    at java.lang.Throwable.fillInStackTrace(Compiled Code)
    at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Compiled Code)
    at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)
    at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:342)
    at sun.rmi.registry.RegistryImpl_Stub.bind(Unknown Source)
    at java.rmi.Naming.bind(Naming.java:116)
    at HelloImpl.main(HelloImpl.java:28)
    I am embarking on a huge assignment but if am having problems getting started..
    Your help will be highly appreciated..
    thanx and regards
    Ranjit Iyer

    First of all you should be posting this Q in the RMI forum :)
    You are getting that error because your stub is not in your clients classpath (or u can say the compiler is not able to find it).
    Make sure that the file HelloImpl_Stub is in the client classpath/package.
    Regards
    Meka Toka

  • Problem with a simple RMI program

    I'm trying to get a simple RMI program to work, by following the instructions in this link:
    http://developer.java.sun.com/developer/technicalArticles/RMI/CreatingApps/index.html#dro
    When it gets to this line:
    Lookup look_obj = (Lookup)Naming.lookup(name);this exception is generated:
    java.security.AccessControlException: access denied (java.net.SocketPermission 127.0.0.1:1099 connect,resolve)
    What's wrong, eh?

    Canadian, eh?
    Looks like your security settings on you computer are set to not allow a socket connection.
    Specifically is is saying that access to port 1099 on your local machine (127.0.0.1 is the loopback address) is being denied.
    There are two main reasons this could happen (off the top of my head), though someone else might know from the message exaclty which one.
    1. Your java security permissions do not allow an out going socket connection (are you writing an applet?)
    2. Your computer protects access to port 1099.

  • Help me to run this simple RMI example

    When i m running this example in standalone pc it works but while running on to different pc it gives error though I m giving the IP address from client of server.. If anyone can help me out plz help.
    Code:
    ReceiveMessageInterface
    import java.rmi.*;
    public interface ReceiveMessageInterface extends Remote
    void receiveMessage(String x) throws RemoteException;
    Server code:
    import java.rmi.*;
    import java.rmi.registry.*;
    import java.rmi.server.*;
    import java.net.*;
    public class RmiServer extends java.rmi.server.UnicastRemoteObject
    implements ReceiveMessageInterface
    int thisPort;
    String thisAddress;
    Registry registry; // rmi registry for lookup the remote objects.
    // This method is called from the remote client by the RMI.
    // This is the implementation of the �ReceiveMessageInterface�.
    public void receiveMessage(String x) throws RemoteException
    System.out.println(x);
    public RmiServer() throws RemoteException
    try{
    // get the address of this host.
    thisAddress= (InetAddress.getLocalHost()).toString();
    catch(Exception e){
    throw new RemoteException("can't get inet address.");
    thisPort=3232; // this port(registry�s port)
    System.out.println("this address="+thisAddress+",port="+thisPort);
    try{
    // create the registry and bind the name and object.
    registry = LocateRegistry.createRegistry( thisPort );
    registry.rebind("rmiServer", this);
    catch(RemoteException e){
    throw e;
    static public void main(String args[])
    try{
    RmiServer s=new RmiServer();
    catch (Exception e) {
    e.printStackTrace();
    System.exit(1);
    Client code:
    import java.rmi.*;
    import java.rmi.registry.*;
    import java.net.*;
    public class RmiClient
    static public void main(String args[])
    ReceiveMessageInterface rmiServer;
    Registry registry;
    String serverAddress=args[0];
    String serverPort=args[1];
    String text=args[2];
    System.out.println("sending "+text+" to "+serverAddress+":"+serverPort);
    try{
    // get the �registry�
    registry=LocateRegistry.getRegistry(
    serverAddress,
    (new Integer(serverPort)).intValue()
    // look up the remote object
    rmiServer=
    (ReceiveMessageInterface)(registry.lookup("rmiServer"));
    // call the remote method
    rmiServer.receiveMessage(text);
    catch(RemoteException e){
    e.printStackTrace();
    catch(NotBoundException e){
    e.printStackTrace();
    }

    When we compile with rmic skeleton and stub get created then we hav to place stub at each client ???Your remote client applcation need only _Stub.class fiels.
    Is there way by which we can know how many clients are connected to the
    server and there IP address, can anyone give the code... I guess that you should use a RMI login/logout method to register/unregister your client connection information into a databse or a simple static Hashtable(Vector) object.

  • Not able to run a simple RMI server

    I am running an RMI program like follwing
    import java.rmi.* ;
    import java.rmi.registry.* ;
    import java.rmi.server.* ;
    public class CallBeanServer extends UnicastRemoteObject implements ICallBeanServer
         //main
         public static void main(String args[]) throws Exception
              int port = 1000 ;
              Registry reg = null ;
              if( args[0].equals("true"))
                   reg = LocateRegistry.createRegistry(port) ;
                   System.out.println("Successfully created registry") ;
              else
                   reg = LocateRegistry.getRegistry(port) ;
                   System.out.println("Connected to existing registry") ;
              CallBeanServer callBeanServer = new CallBeanServer(reg) ;
         }//main
         //constructor
         public CallBeanServer(Registry reg) throws Exception, RemoteException
              super() ;
              reg.rebind("CallBeanServer",this) ;
              System.out.println("CallBeanServer Object bound") ;
         //my public method
         public String callBeanServer() throws RemoteException
         {          return "Success" ;
    I have run the rmiregistry at port no 1000 like
    rmiregistry 1000
    I have compiled ICallBeanServer also and run rmic also over CallBeanServer like
    rmic CallBeanServer
    when I run this program using
    java CallBeanServer false
    it gives the follwoing errors
    Connected to existing registry
    Exception in thread "main" java.rmi.ServerException: Server RemoteException; nested exception is:
    java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
    java.lang.ClassNotFoundException: CallBeanServer_Stub
    java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
    java.lang.ClassNotFoundException: CallBeanServer_Stub
    java.lang.ClassNotFoundException: CallBeanServer_Stub
    at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Unknown Source)
    at sun.rmi.transport.StreamRemoteCall.executeCall(Unknown Source)
    at sun.rmi.server.UnicastRef.invoke(Unknown Source)
    at sun.rmi.registry.RegistryImpl_Stub.rebind(Unknown Source)
    at CallBeanServer.<init>(CallBeanServer.java:38)
    at CallBeanServer.main(CallBeanServer.java:30)
    Can you please tell me what is the error?
    Thanks
    Prashant Gupta

    Add the classes (the stubs included) to the classpath when you start the registry.

  • Problems running a simple program

    I just installed java on my home machine and I am new to Java. I typed in a simple HelloWorld program and saved it to my c:\temp. It compiled ok and created a .class file. When I run that file, I get the following error message:
    Exception in thread "Main" java.lang.NoClassDefFound error
    How can I correct this?
    Thank you,
    Rich

    Did you run with the command "java XXXX.class"?
    If so, you will get error message like you post.
    run like this:
    java XXXX
    (don't input ".class")

  • Problem running a simple jmf player in jbuilder9

    Hi everybody... I have a very strange problem, so pleeeease help :)
    JBuilder9 compiles the code but when I run it, the following message appears:
    "Unable to handle format: MJPG, 320x240, FrameRate=15.0, Length=33792 0 extra bytes"
    Frame of application appears with all the players visual components, but when player.start() method is called, application freezes... :(
    The same code when compiled and runned from command prompt (javac PlayerFrame.java, then java PlayerFrame) works perfectly....

    ropeNS
    I am having a similar problem. I am trying to playback MJPEG encoded .avi files and I am getting a the exact same error message.
    If you figure the problem please let me know.
    I will do the same.
    Thanks,
    beTheJava

  • Problem running simple servlet on tomcat 4.0

    hi,
    i have setup tomcat4.0 on the server and i am trying to run a simple servlet but it is not working. here is what i have done:
    1. setting the CATALINA_HOME variable to the directory where tomcat is installed
    2. setting the classpath variable to servlet.jar
    3. i am putting the .class fille in tomcat-home-directory/webapps/ROOTS/WEB-INF/classes
    4. i am giving the url as http://localhost:8080/servlet/HelloServlet.class
    but error is given...could you please tell where could i have probably made a mistake
    regards
    preeti

    hi tnguyen1973
    now my servlets are running on the server provided they are kept under /examples/WEB-INF/classes. But now i have my own folder at the same level of examples called Lm which also has WEB-INF/classes. but if i put my servlets here it is giving exception.hope u got me. please, tell me where should i make necessary modifications to get the servlets run from my own folder instead of examples
    thank u

  • Problem in running a simple session bean in JOnAS

    Hi folks ,
    I just started to learn J2EE using Netbeans(5.5) and JOnAS (4.8.4 ) . I
    tried to run a simple session bean(stateless)
    invoked through client application. I successfully deployed in jonas using Netbeans (5.5) but i can't able to successfully run it.
    Output i got when i run client application :
    ==========================
    init:
    deps-jar:
    init:
    deps-jar:
    compile:
    library-inclusion-in-archive:
    dist:
    compile:
    run:
    Feb 19, 2007 11:07:08 PM com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl <init>
    WARNING: "IOP00410201: (COMM_FAILURE) Connection failure: socketType: IIOP_CLEAR_TEXT; hostname: localhost; port: 3700"
    org.omg.CORBA.COMM_FAILURE:   vmcid: SUN  minor code: 201  completed: No
            at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2257)
            at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2278)
            at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:208)
            at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:221)
            at com.sun.corba.ee.impl.transport.SocketOrChannelContactInfoImpl.createConnection(SocketOrChannelContactInfoImpl.java:104)
            at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.beginRequest(CorbaClientRequestDispatcherImpl.java:152)
            at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.request(CorbaClientDelegateImpl.java:146)
            at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.is_a(CorbaClientDelegateImpl.java:286)
            at org.omg.CORBA.portable.ObjectImpl._is_a(ObjectImpl.java:112)
            at org.omg.CosNaming.NamingContextHelper.narrow(NamingContextHelper.java:69)
            at com.sun.enterprise.naming.SerialContext.narrowProvider(SerialContext.java:89)
            at com.sun.enterprise.naming.SerialContext.getProvider(SerialContext.java:128)
            at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:288)
            at javax.naming.InitialContext.lookup(InitialContext.java:392)
            at SimpleSessionClient.Main.main(Main.java:34)
    Caused by: java.lang.RuntimeException: java.net.ConnectException: Connection refused: connect
            at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:336)
            at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:191)
            ... 12 more
    Caused by: java.net.ConnectException: Connection refused: connect
            at sun.nio.ch.Net.connect(Native Method)
            at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:507)
            at java.nio.channels.SocketChannel.open(SocketChannel.java:146)
            at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:320)
            ... 13 more
    Feb 19, 2007 11:07:10 PM com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl <init>
    WARNING: "IOP00410201: (COMM_FAILURE) Connection failure: socketType: IIOP_CLEAR_TEXT; hostname: localhost; port: 3700"
    org.omg.CORBA.COMM_FAILURE:   vmcid: SUN  minor code: 201  completed: No
            at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2257)
            at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2278)
            at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:208)
            at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:221)
            at com.sun.corba.ee.impl.transport.SocketOrChannelContactInfoImpl.createConnection(SocketOrChannelContactInfoImpl.java:104)
            at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.beginRequest(CorbaClientRequestDispatcherImpl.java:152)
            at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.request(CorbaClientDelegateImpl.java:146)
            at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.is_a(CorbaClientDelegateImpl.java:286)
            at org.omg.CORBA.portable.ObjectImpl._is_a(ObjectImpl.java:112)
            at org.omg.CosNaming.NamingContextHelper.narrow(NamingContextHelper.java:69)
            at com.sun.enterprise.naming.SerialContext.narrowProvider(SerialContext.java:89)
            at com.sun.enterprise.naming.SerialContext.getProvider(SerialContext.java:128)
            at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:288)
            at javax.naming.InitialContext.lookup(InitialContext.java:392)
            at SimpleSessionClient.Main.main(Main.java:34)
    Caused by: java.lang.RuntimeException: java.net.ConnectException: Connection refused: connect
            at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:336)
            at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:191)
            ... 12 more
    Caused by: java.net.ConnectException: Connection refused: connect
            at sun.nio.ch.Net.connect(Native Method)
            at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:507)
            at java.nio.channels.SocketChannel.open(SocketChannel.java:146)
            at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:320)
            ... 13 more
    Feb 19, 2007 11:07:11 PM com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl <init>
    WARNING: "IOP00410201: (COMM_FAILURE) Connection failure: socketType: IIOP_CLEAR_TEXT; hostname: localhost; port: 3700"
    org.omg.CORBA.COMM_FAILURE:   vmcid: SUN  minor code: 201  completed: No
            at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2257)
            at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2278)
            at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:208)
            at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:221)
            at com.sun.corba.ee.impl.transport.SocketOrChannelContactInfoImpl.createConnection(SocketOrChannelContactInfoImpl.java:104)
            at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.beginRequest(CorbaClientRequestDispatcherImpl.java:152)
            at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.request(CorbaClientDelegateImpl.java:146)
            at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.is_a(CorbaClientDelegateImpl.java:286)
            at org.omg.CORBA.portable.ObjectImpl._is_a(ObjectImpl.java:112)
            at org.omg.CosNaming.NamingContextHelper.narrow(NamingContextHelper.java:69)
            at com.sun.enterprise.naming.SerialContext.narrowProvider(SerialContext.java:89)
            at com.sun.enterprise.naming.SerialContext.getProvider(SerialContext.java:128)
            at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:288)
            at javax.naming.InitialContext.lookup(InitialContext.java:392)
            at SimpleSessionClient.Main.main(Main.java:34)
    Caused by: java.lang.RuntimeException: java.net.ConnectException: Connection refused: connect
            at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:336)
            at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:191)
            ... 12 more
    Caused by: java.net.ConnectException: Connection refused: connect
            at sun.nio.ch.Net.connect(Native Method)
            at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:507)
            at java.nio.channels.SocketChannel.open(SocketChannel.java:146)
            at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:320)
            ... 13 more
    Feb 19, 2007 11:07:13 PM com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl <init>
    WARNING: "IOP00410201: (COMM_FAILURE) Connection failure: socketType: IIOP_CLEAR_TEXT; hostname: localhost; port: 3700"
    org.omg.CORBA.COMM_FAILURE:   vmcid: SUN  minor code: 201  completed: No
            at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2257)
            at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2278)
            at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:208)
            at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:221)
            at com.sun.corba.ee.impl.transport.SocketOrChannelContactInfoImpl.createConnection(SocketOrChannelContactInfoImpl.java:104)
            at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.beginRequest(CorbaClientRequestDispatcherImpl.java:152)
            at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.request(CorbaClientDelegateImpl.java:146)
            at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.is_a(CorbaClientDelegateImpl.java:286)
            at org.omg.CORBA.portable.ObjectImpl._is_a(ObjectImpl.java:112)
            at org.omg.CosNaming.NamingContextHelper.narrow(NamingContextHelper.java:69)
            at com.sun.enterprise.naming.SerialContext.narrowProvider(SerialContext.java:89)
            at com.sun.enterprise.naming.SerialContext.getProvider(SerialContext.java:128)
            at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:288)
            at javax.naming.InitialContext.lookup(InitialContext.java:392)
            at SimpleSessionClient.Main.main(Main.java:34)
    Caused by: java.lang.RuntimeException: java.net.ConnectException: Connection refused: connect
            at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:336)
            at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:191)
            ... 12 more
    Caused by: java.net.ConnectException: Connection refused: connect
            at sun.nio.ch.Net.connect(Native Method)
            at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:507)
            at java.nio.channels.SocketChannel.open(SocketChannel.java:146)
            at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:320)
            ... 13 more
    Feb 19, 2007 11:07:14 PM com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl <init>
    WARNING: "IOP00410201: (COMM_FAILURE) Connection failure: socketType: IIOP_CLEAR_TEXT; hostname: localhost; port: 3700"
    org.omg.CORBA.COMM_FAILURE:   vmcid: SUN  minor code: 201  completed: No
            at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2257)
            at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2278)
            at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:208)
            at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:221)
            at com.sun.corba.ee.impl.transport.SocketOrChannelContactInfoImpl.createConnection(SocketOrChannelContactInfoImpl.java:104)
            at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.beginRequest(CorbaClientRequestDispatcherImpl.java:152)
            at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.request(CorbaClientDelegateImpl.java:146)
            at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.is_a(CorbaClientDelegateImpl.java:286)
            at org.omg.CORBA.portable.ObjectImpl._is_a(ObjectImpl.java:112)
            at org.omg.CosNaming.NamingContextHelper.narrow(NamingContextHelper.java:69)
            at com.sun.enterprise.naming.SerialContext.narrowProvider(SerialContext.java:89)
            at com.sun.enterprise.naming.SerialContext.getProvider(SerialContext.java:128)
            at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:288)
            at javax.naming.InitialContext.lookup(InitialContext.java:392)
            at SimpleSessionClient.Main.main(Main.java:34)
    Caused by: java.lang.RuntimeException: java.net.ConnectException: Connection refused: connect
            at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:336)
            at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:191)
            ... 12 more
    Caused by: java.net.ConnectException: Connection refused: connect
            at sun.nio.ch.Net.connect(Native Method)
            at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:507)
            at java.nio.channels.SocketChannel.open(SocketChannel.java:146)
            at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:320)
            ... 13 more
    Feb 19, 2007 11:07:15 PM com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl <init>
    WARNING: "IOP00410201: (COMM_FAILURE) Connection failure: socketType: IIOP_CLEAR_TEXT; hostname: localhost; port: 3700"
    org.omg.CORBA.COMM_FAILURE:   vmcid: SUN  minor code: 201  completed: No
            at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2257)
            at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2278)
            at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:208)
            at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:221)
            at com.sun.corba.ee.impl.transport.SocketOrChannelContactInfoImpl.createConnection(SocketOrChannelContactInfoImpl.java:104)
            at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.beginRequest(CorbaClientRequestDispatcherImpl.java:152)
            at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.request(CorbaClientDelegateImpl.java:146)
            at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.is_a(CorbaClientDelegateImpl.java:286)
            at org.omg.CORBA.portable.ObjectImpl._is_a(ObjectImpl.java:112)
            at org.omg.CosNaming.NamingContextHelper.narrow(NamingContextHelper.java:69)
            at com.sun.enterprise.naming.SerialContext.narrowProvider(SerialContext.java:89)
            at com.sun.enterprise.naming.SerialContext.getProvider(SerialContext.java:128)
            at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:288)
            at javax.naming.InitialContext.lookup(InitialContext.java:392)
            at SimpleSessionClient.Main.main(Main.java:34)
    Caused by: java.lang.RuntimeException: java.net.ConnectException: Connection refused: connect
            at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:336)
            at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:191)
            ... 12 more
    Caused by: java.net.ConnectException: Connection refused: connect
            at sun.nio.ch.Net.connect(Native Method)
            at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:507)
            at java.nio.channels.SocketChannel.open(SocketChannel.java:146)
            at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:320)
            ... 13 more
    Feb 19, 2007 11:07:17 PM com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl <init>
    WARNING: "IOP00410201: (COMM_FAILURE) Connection failure: socketType: IIOP_CLEAR_TEXT; hostname: localhost; port: 3700"
    org.omg.CORBA.COMM_FAILURE:   vmcid: SUN  minor code: 201  completed: No
            at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2257)
            at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2278)
            at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:208)
            at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:221)
            at com.sun.corba.ee.impl.transport.SocketOrChannelContactInfoImpl.createConnection(SocketOrChannelContactInfoImpl.java:104)
            at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.beginRequest(CorbaClientRequestDispatcherImpl.java:152)
            at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.request(CorbaClientDelegateImpl.java:146)
            at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.is_a(CorbaClientDelegateImpl.java:286)
            at org.omg.CORBA.portable.ObjectImpl._is_a(ObjectImpl.java:112)
            at org.omg.CosNaming.NamingContextHelper.narrow(NamingContextHelper.java:69)
            at com.sun.enterprise.naming.SerialContext.narrowProvider(SerialContext.java:89)
            at com.sun.enterprise.naming.SerialContext.getProvider(SerialContext.java:128)
            at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:288)
            at javax.naming.InitialContext.lookup(InitialContext.java:392)
            at SimpleSessionClient.Main.main(Main.java:34)
    Caused by: java.lang.RuntimeException: java.net.ConnectException: Connection refused: connect
            at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:336)
            at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:191)
            ... 12 more
    Caused by: java.net.ConnectException: Connection refused: connect
            at sun.nio.ch.Net.connect(Native Method)
            at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:507)
            at java.nio.channels.SocketChannel.open(SocketChannel.java:146)
            at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:320)
            ... 13 more
    Feb 19, 2007 11:07:18 PM com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl <init>
    WARNING: "IOP00410201: (COMM_FAILURE) Connection failure: socketType: IIOP_CLEAR_TEXT; hostname: localhost; port: 3700"
    org.omg.CORBA.COMM_FAILURE:   vmcid: SUN  minor code: 201  completed: No
            at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2257)
            at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2278)
            at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:208)
            at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:221)
            at com.sun.corba.ee.impl.transport.SocketOrChannelContactInfoImpl.createConnection(SocketOrChannelContactInfoImpl.java:104)
            at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.beginRequest(CorbaClientRequestDispatcherImpl.java:152)
            at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.request(CorbaClientDelegateImpl.java:146)
            at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.is_a(CorbaClientDelegateImpl.java:286)
            at org.omg.CORBA.portable.ObjectImpl._is_a(ObjectImpl.java:112)
            at org.omg.CosNaming.NamingContextHelper.narrow(NamingContextHelper.java:69)
            at com.sun.enterprise.naming.SerialContext.narrowProvider(SerialContext.java:89)
            at com.sun.enterprise.naming.SerialContext.getProvider(SerialContext.java:128)
            at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:288)
            at javax.naming.InitialContext.lookup(InitialContext.java:392)
            at SimpleSessionClient.Main.main(Main.java:34)
    Caused by: java.lang.RuntimeException: java.net.ConnectException: Connection refused: connect
            at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:336)
            at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:191)
            ... 12 more
    Caused by: java.net.ConnectException: Connection refused: connect
            at sun.nio.ch.Net.connect(Native Method)
            at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:507)
            at java.nio.channels.SocketChannel.open(SocketChannel.java:146)
            at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:320)
            ... 13 more
    Feb 19, 2007 11:07:19 PM com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl <init>
    WARNING: "IOP00410201: (COMM_FAILURE) Connection failure: socketType: IIOP_CLEAR_TEXT; hostname: localhost; port: 3700"
    org.omg.CORBA.COMM_FAILURE:   vmcid: SUN  minor code: 201  completed: No
            at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2257)
            at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2278)
            at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:208)
            at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:221)
            at com.sun.corba.ee.impl.transport.SocketOrChannelContactInfoImpl.createConnection(SocketOrChannelContactInfoImpl.java:104)
            at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.beginRequest(CorbaClientRequestDispatcherImpl.java:152)
            at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.request(CorbaClientDelegateImpl.java:146)
            at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.is_a(CorbaClientDelegateImpl.java:286)
            at org.omg.CORBA.portable.ObjectImpl._is_a(ObjectImpl.java:112)
            at org.omg.CosNaming.NamingContextHelper.narrow(NamingContextHelper.java:69)
            at com.sun.enterprise.naming.SerialContext.narrowProvider(SerialContext.java:89)
            at com.sun.enterprise.naming.SerialContext.getProvider(SerialContext.java:128)
            at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:288)
            at javax.naming.InitialContext.lookup(InitialContext.java:392)
            at SimpleSessionClient.Main.main(Main.java:34)
    Caused by: java.lang.RuntimeException: java.net.ConnectException: Connection refused: connect
            at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:336)
            at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:191)
            ... 12 more
    Caused by: java.net.ConnectException: Connection refused: connect
            at sun.nio.ch.Net.connect(Native Method)
            at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:507)
            at java.nio.channels.SocketChannel.open(SocketChannel.java:146)
            at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:320)
            ... 13 more
    Feb 19, 2007 11:07:20 PM com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl <init>
    WARNING: "IOP00410201: (COMM_FAILURE) Connection failure: socketType: IIOP_CLEAR_TEXT; hostname: localhost; port: 3700"
    org.omg.CORBA.COMM_FAILURE:   vmcid: SUN  minor code: 201  completed: No
            at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2257)
            at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2278)
            at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:208)
            at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:221)
            at com.sun.corba.ee.impl.transport.SocketOrChannelContactInfoImpl.createConnection(SocketOrChannelContactInfoImpl.java:104)
            at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.beginRequest(CorbaClientRequestDispatcherImpl.java:152)
            at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.request(CorbaClientDelegateImpl.java:146)
            at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.is_a(CorbaClientDelegateImpl.java:286)
            at org.omg.CORBA.portable.ObjectImpl._is_a(ObjectImpl.java:112)
            at org.omg.CosNaming.NamingContextHelper.narrow(NamingContextHelper.java:69)
            at com.sun.enterprise.naming.SerialContext.narrowProvider(SerialContext.java:89)
            at com.sun.enterprise.naming.SerialContext.getProvider(SerialContext.java:128)
            at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:288)
            at javax.naming.InitialContext.lookup(InitialContext.java:392)
            at SimpleSessionClient.Main.main(Main.java:34)
    Caused by: java.lang.RuntimeException: java.net.ConnectException: Connection refused: connect
            at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:336)
            at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:191)
            ... 12 more
    Caused by: java.net.ConnectException: Connection refused: connect
            at sun.nio.ch.Net.connect(Native Method)
            at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:507)
            at java.nio.channels.SocketChannel.open(SocketChannel.java:146)
            at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:320)
            ... 13 more
    Feb 19, 2007 11:07:22 PM com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl <init>
    WARNING: "IOP00410201: (COMM_FAILURE) Connection failure: socketType: IIOP_CLEAR_TEXT; hostname: localhost; port: 3700"
    org.omg.CORBA.COMM_FAILURE:   vmcid: SUN  minor code: 201  completed: No
            at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2257)
            at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2278)
            at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:208)
            at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:221)
            at com.sun.corba.ee.impl.transport.SocketOrChannelContactInfoImpl.createConnection(SocketOrChannelContactInfoImpl.java:104)
            at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.beginRequest(CorbaClientRequestDispatcherImpl.java:152)
            at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.request(CorbaClientDelegateImpl.java:146)
            at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.is_a(CorbaClientDelegateImpl.java:286)
            at org.omg.CORBA.portable.ObjectImpl._is_a(ObjectImpl.java:112)
            at org.omg.CosNaming.NamingContextHelper.narrow(NamingContextHelper.java:69)
            at com.sun.enterprise.naming.SerialContext.narrowProvider(SerialContext.java:89)
            at com.sun.enterprise.naming.SerialContext.getProvider(SerialContext.java:128)
            at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:288)
            at javax.naming.InitialContext.lookup(InitialContext.java:392)
            at SimpleSessionClient.Main.main(Main.java:34)
    Caused by: java.lang.RuntimeException: java.net.ConnectException: Connection refused: connect
            at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:336)
            at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:191)
            ... 12 more
    Caused by: java.net.ConnectException: Connection refused: connect
            at sun.nio.ch.Net.connect(Native Method)
            at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:507)
            at java.nio.channels.SocketChannel.open(SocketChannel.java:146)
            at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:320)
            ... 13 more
    Feb 19, 2007 11:07:23 PM com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl <init>
    WARNING: "IOP00410201: (COMM_FAILURE) Connection failure: socketType: IIOP_CLEAR_TEXT; hostname: localhost; port: 3700"
    org.omg.CORBA.COMM_FAILURE:   vmcid: SUN  minor code: 201  completed: No
            at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2257)
            at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2278)
            at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:208)
            at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:221)
            at com.sun.corba.ee.impl.transport.SocketOrChannelContactInfoImpl.createConnection(SocketOrChannelContactInfoImpl.java:104)
            at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.beginRequest(CorbaClientRequestDispatcherImpl.java:152)
            at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.request(CorbaClientDelegateImpl.java:146)
            at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.is_a(CorbaClientDelegateImpl.java:286)
            at org.omg.CORBA.portable.ObjectImpl._is_a(ObjectImpl.java:112)
            at org.omg.CosNaming.NamingContextHelper.narrow(NamingContextHelper.java:69)
            at com.sun.enterprise.naming.SerialContext.narrowProvider(SerialContext.java:89)
            at com.sun.enterprise.naming.SerialContext.getProvider(SerialContext.java:128)
            at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:288)
            at javax.naming.InitialContext.lookup(InitialContext.java:392)
            at SimpleSessionClient.Main.main(Main.java:34)
    Caused by: java.lang.RuntimeException: java.net.ConnectException: Connection refused: connect
            at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:336)
            at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:191)
            ... 12 more
    Caused by: java.net.ConnectException: Connection refused: connect
            at sun.nio.ch.Net.connect(Nativ                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        

    There is a ClassDefNotFound Exception, this means that a class used (probably by the corba marshalling stuff) cannot be located. You'll need to add these classes to the client's CLASSPATH.
    Usually a client-jar file can be created or is provided by the j2ee server. If you're using the sun-wapp-server then it is done this way:
    - deploy the beans to the server (asadmin deploy)
    - create the client-stubs (asadmin client-stubs)
    - add the created client-stubs to the clients class path.
    I don't remember the exact commands for asadmin. Plz check the help. (asadmin help)
    In JBOss youll have to add jboss-all.jar to the client's classpath. It depends on the j2ee server you use.

  • Problem in running a simple html program in netbeans 5.5.1

    Dear all
    when i am running a simple html program in netbeans 5.5.1, it is not showing the result. In url address is showing defferent. such as
    http://localhost 8084/... while i need http://mydocument and setting/...
    so i want to set the default address. from where shound i set it, so that in url address should come right.
    thanks
    From
    Rajeev Sarawat

    Hi cliff,
    Worked as per ur Suggestion , the .tld file had
    <!DOCTYPE taglib tag, I removed it, it is still not working , I m using tomcat 3.2
    I tried to run the simpletag example given with Tomcat it runs, but when I copied that example to my webapps/TagViews direcotry and corrected the package and made necessary changes in web.xml kept in
    WEB-INF direcotry , it gives the same error,
    Is there any requirement to make a war file for taglib to run or some thing like that, or is there any other requirement after making
    1) The .class file kept in install_dir/webapps/TagViews/WEB-INF/classes/Tagbeans
    2) The .tld file kept in
    install_dir/webapps/TagViews/WEB-INF/jsp/
    3) Made cahnges in web.xml kept in
    install_dir/webapps/TagViews/WEB-INF/
    4) Made the jsp file kept in
    install_dir/webapps/TagViews/jsp/
    After doing this I restarted the tomcat server and then tried http://localhost:8080/TagViews/jsp/myTag.jsp

  • Simple RMI application

    Hi all
    I've wrote a simple RMI application; I've made a stub and a skeleton and I've started a rmiregistry; when I'm execute a server, I have this exception:
    java.rmi.UnmarshalException: error unmarshalling arguments; ecc.
    Where is the problem?

    Ok, but I'm a student and my teacher wants ....I'm 49 years old and have blond, long hair (other call it grey, but they are
    loonies) and I drive a Ford that doens't want to start when it's freezing
    but that's still no excuse for the RMI mechanism not to work properly ;-)
    Anyway, the problem was an sub-directory; now I catch a
    ConnectException: connection refused (to 127.0.0.1);
    any ideas?Yep, you have to start the server part first and then start your client. I also
    suspect that you don't have the 'rmiregistry' running ... (we can talk about
    that later).
    kind regards,
    Jos

  • Problems with a simple stop watch program

    I would appreciate help sorting out a problem with a simple stop watch program. The problem is that it throws up inappropriate values. For example, the first time I ran it today it showed the best time at 19 seconds before the actual time had reached 2 seconds. I restarted the program and it ran correctly until about the thirtieth time I started it again when it was going okay until the display suddenly changed to something like '-50:31:30:50-'. I don't have screenshot because I had twenty thirteen year olds suddenly yelling at me that it was wrong. I clicked 'Stop' and then 'Start' again and it ran correctly.
    I have posted the whole code (minus the GUI section) because I want you to see that the program is very, very simple. I can't see where it could go wrong. I would appreciate any hints.
    public class StopWatch extends javax.swing.JFrame implements Runnable {
        int startTime, stopTime, totalTime, bestTime;
        private volatile Thread myThread = null;
        /** Creates new form StopWatch */
        public StopWatch() {
         startTime = 0;
         stopTime = 0;
         totalTime = 0;
         bestTime = 0;
         initComponents();
        public void run() {
         Thread thisThread = Thread.currentThread();
         while(myThread == thisThread) {
             try {
              Thread.sleep(100);
              getEnd();
             } catch (InterruptedException e) {}
        public void start() {
         if(myThread == null) {
             myThread = new Thread(this);
             myThread.start();
        public void getStart() {
         Calendar now = Calendar.getInstance();
         startTime = (now.get(Calendar.MINUTE) * 60) + now.get(Calendar.SECOND);
        public void getEnd() {
         Calendar now1 = Calendar.getInstance();
         stopTime = (now1.get(Calendar.MINUTE) * 60) + now1.get(Calendar.SECOND);
         totalTime = stopTime - startTime;
         setLabel();
         if(bestTime < totalTime) bestTime = totalTime;
        public void setLabel() {
         if((totalTime % 60) < 10) {
             jLabel1.setText(""+totalTime/60+ ":0"+(totalTime % 60));
         } else {
             jLabel1.setText(""+totalTime/60 + ":"+(totalTime % 60));
         if((bestTime % 60) < 10) {
             jLabel3.setText(""+bestTime/60+ ":0"+(bestTime % 60));
         } else {
             jLabel3.setText(""+bestTime/60 + ":"+(bestTime % 60));
        private void ButtonClicked(java.awt.event.ActionEvent evt) {                              
         JButton temp = (JButton) evt.getSource();
         if(temp.equals(jButton1)) {
             start();
             getStart();
         if(temp.equals(jButton2)) {
             getEnd();
             myThread = null;
         * @param args the command line arguments
        public static void main(String args[]) {
         java.awt.EventQueue.invokeLater(new Runnable() {
             public void run() {
              new StopWatch().setVisible(true);
        // Variables declaration - do not modify                    
        private javax.swing.JButton jButton1;
        private javax.swing.JButton jButton2;
        private javax.swing.JLabel jLabel1;
        private javax.swing.JLabel jLabel2;
        private javax.swing.JLabel jLabel3;
        private javax.swing.JPanel jPanel1;
        // End of variables declaration                  
    }

    Although I appreciate this information, it still doesn't actually solve the problem. I can't see an error in the logic (or the code). The fact that the formatting works most of the time suggests that the problem does not lie there. As well, I use the same basic code for other time related displays e.g. countdown timers where the user sets a maximum time and the computer stops when zero is reached. I haven't had an error is these programs.
    For me, it is such a simple program and the room for errors seem small. I am guessing that I have misunderstood something about dates, but I obviously don't know.
    Again, thank you for taking the time to look at the problem and post a reply.

  • Problems with a simple Midlet

    Hi , i'm trying to run a simple Midlet with a list, but appear the following errors:
    Error running executable C:\WTK22\bin\zayit
    java.net.SocketException: No buffer space available (maximum connections reached?): JVM_Bind
         at java.net.PlainSocketImpl.socketBind(Native Method)
         at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:359)
         at java.net.ServerSocket.bind(ServerSocket.java:319)
         at java.net.ServerSocket.<init>(ServerSocket.java:185)
         at java.net.ServerSocket.<init>(ServerSocket.java:97)
         at com.sun.kvem.Lime.runClient(Unknown Source)
         at com.sun.kvem.KVMBridge.runKVM(Unknown Source)
         at com.sun.kvem.KVMBridge.runKVM(Unknown Source)
         at com.sun.kvem.midp.MIDP$4.run(Unknown Source)
    the code of the Midlet is so simple and i don't know what happen.
    i hope that you can help me
    thanks

    the code is:
    package componentes;
    import javax.microedition.lcdui.*;
    import javax.microedition.midlet.*;
    public class InterfazMid extends MIDlet implements CommandListener {
    private Display display;
    private List menu;
    private List lista;
    private TextBox cajaTexto;
    private Form form;
    private DateField campoFecha;
    private Gauge indicador;
    private TextField campoTexto;
    private Ticker ticker;
    private Alert aviso;
    private Image imagen;
    private Command atras;
    private Command menuPrincipal;
    private Command salir;
    String menuActual = null;
    public InterfazMid() {
    form = new Form( "Formulario" );
    indicador = new Gauge( "Indicador",false,50,20 );
    campoTexto = new TextField( "Campo de texto","abc",40,0 );
    ticker = new Ticker( "Componentes de la intefaz MIDP" );
    aviso = new Alert( "Aviso Sonoro" );
    imagen = Image.createImage( "/error.png" );
    } catch( Exception e ) {}
    atras = new Command( "Atr�s",Command.BACK,0 );
    menuPrincipal = new Command( "Men� Ppal",Command.SCREEN,1 );
    salir = new Command( "Salir",Command.STOP,2 );
    protected void startApp() {
    display = Display.getDisplay( this );
    menu = new List( "Interfaz MIDP",Choice.IMPLICIT );
    menu.append( "Caja de texto",null );
    menu.append( "Fecha",null );
    menu.append( "Lista",null );
    menu.append( "Aviso",null );
    menu.append( "Formulario",null );
    menu.addCommand( salir );
    menu.setCommandListener( this );
    menu.setTicker( ticker );
    mainMenu();
    protected void pauseApp() {}
    protected void destroyApp( boolean flag ) {}
    public void mainMenu() {
    menuActual = "Men� Ppal";
    display.setCurrent( menu );
    public void testTextBox() {
    cajaTexto = new TextBox( "Teclea algo:","",10,TextField.ANY );
    cajaTexto.setTicker( new Ticker("Probando TextBox") );
    cajaTexto.addCommand( atras );
    cajaTexto.setCommandListener( this );
    cajaTexto.setString( "ABC" );
    display.setCurrent( cajaTexto );
    menuActual = "texto";
    public void testList() {
    lista = new List( "Seleciona:",Choice.MULTIPLE );
    lista.setTicker( new Ticker("Probando List") );
    lista.addCommand( atras );
    lista.setCommandListener( this );
    lista.append( "Opci�n 1",null );
    lista.append( "Opci�n 2",null );
    lista.append( "Opci�n 3",null );
    lista.append( "Opci�n 4",null );
    display.setCurrent(lista);
    menuActual = "lista";
    public void testAlert() {
    aviso.setType( AlertType.ERROR );
    aviso.setImage( imagen );
    aviso.setString( " ** ERROR **" );
    display.setCurrent( aviso );
    public void testDate() {
    java.util.Date fecha = new java.util.Date();
    campoFecha = new DateField( "Hoy es: ",DateField.DATE );
    campoFecha.setDate( fecha );
    Form f = new Form( "Fecha" );
    f.append( campoFecha );
    f.addCommand( atras );
    f.setCommandListener( this );
    display.setCurrent( f );
    menuActual = "fecha";
    public void testForm() {
    form.append( campoTexto );
    form.append( indicador );
    form.addCommand( atras );
    form.setCommandListener( this );
    display.setCurrent( form );
    menuActual = "form";
    public void commandAction( Command c,Displayable d ) {
    String label = c.getLabel();
    if( label.equals("Salir") ) {
    destroyApp( true );
    notifyDestroyed();
    else if (label.equals("Atr�s")) {
    if( menuActual.equals( "lista" ) ||
    menuActual.equals( "texto" ) ||
    menuActual.equals( "fecha" ) ||
    menuActual.equals( "form" ) ) {
    mainMenu();
    else {
    List l = (List)display.getCurrent();
    switch( l.getSelectedIndex() ) {
    case 0:
    testTextBox();
    break;
    case 1:
    testDate();
    break;
    case 2:
    testList();
    break;
    case 3:
    testAlert();
    break;
    case 4:
    testForm();
    break;
    the code is so simple. i think that the problem is on the j2me wirless toolkit but i don't know.
    thank you
    bye

  • Problems running servlet due to missing classes?

    Hi everyone,
    I am doing a project which requires me to convert a java coding into a servlet. This java coding I am working on is some kind of location based service which tracks people (receiving an argument of a string as IP). It imports an external SDK called Ekahau SDK (some off the shelve product). Now I wish to convert it into a servlet so that the function that the java coding performs can be run from a webpage i created.
    I have previously posted a thread on this forum called "Converting java coding into servlets?" when I had trouble compiling the servlet. Now that I could compile the servlet already, I still have problems running the servlet from my browser.
    The webserver I am using is Apache Tomcat. Previously I was trying Apache HTTP server but since now I need to use servlet, I have shifted to Tomcat instead. I have been getting these "java.lang.NoClassDefFoundError:" when running the servlet from the browser. From the previous thread, I got suggestions from the replies saying that I need to put the jar files I need into my "C:\Tomcat\webapps\try\WEB-INF\lib" directory. I have been looking for the missing jar files from the internet and putting them into my "C:\Tomcat\webapps\try\WEB-INF\lib", but each time after adding a new jar file, I get another new "java.lang.NoClassDefFoundError:". Are the missing jar files really the problems? Cause it seems a bit weird to me that I need some many jar files which I dont even know why I need them for.
    The HTTP status 500 error look like this:
    description
    The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    javax.servlet.ServletException: Servlet execution threw an exception
    root cause
    java.lang.NoClassDefFoundError: org/apache/excalibur/configuration/CascadingConfiguration
    com.ekahau.G.N.A(Unknown Source)
    com.ekahau.G.N.<init>(Unknown Source)
    com.ekahau.sdk.imp.yax.D.<init>(Unknown Source)
    com.ekahau.sdk.imp.yax.E.connect(Unknown Source)
    com.ekahau.sdk.PositioningEngine.connect(Unknown Source)
    coreservlets.testing.find(testing.java:75)
    coreservlets.testing.doGet(testing.java:36)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    Here are the series of jar files I have been looking from the internet to add them into my "C:\Tomcat\webapps\try\WEB-INF\lib" directory:
    1) org/apache/commons/collections/Closure
    2) org/apache/log4j/Logger
    3) org/apache/commons/lang/Validate
    4) org/apache/excalibur/configuration/CascadingConfiguration
    Please help~~ Thanks a lot.
    My servlet coding is like this:
    package coreservlets;
    import java.io.*;
    import java.util.*;
    import java.io.IOException;
    import java.io.PrintWriter;
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServlet;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import com.ekahau.sdk.*;
    public class testing extends HttpServlet
         String ipAddress;
         int result;
           public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
                  ipAddress = request.getParameter("deviceIP");
              try
                   result = find();     
              catch (IOException e)
                   System.out.println("Error..." + e.toString());
              catch (EngineException e)
                   System.out.println("Error..." + e.toString());
              response.setContentType("text/html");
                  PrintWriter write = response.getWriter();
              write.println("<HTML>\n" +
    "<HEAD><TITLE>Tryget</TITLE></HEAD>\n" +
    "<BODY BGCOLOR=\"#FDF5E6\">\n" +
    result +
    "</BODY></HTML>");
           public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
                  doGet(request, response);
         public int find() throws EngineException, IOException
              PositioningEngine.connect();
                  // Find the given device:
                  Device[] devices = PositioningEngine.findDevice("NETWORK.IP-ADDRESS", ipAddress);
                  if (devices.length == 0)
                         System.err.println("Device with IP address " + ipAddress + " not found.");
                   PositioningEngine.disconnect();
                   return 0;
              else
                         TrackedDevice device = new TrackedDevice(devices[0]);
                         // Create a simple handler for locations for one-time usage:
                         LocationEstimateListener estimateListener = new LocationEstimateListener()
                           public void handleLocationEstimate(LocationEstimate locationEstimate, TrackedDevice device)
                                  // Change getLatestLocation to getAccurateLocation if you want
                                  // a bit more accurate but a few seconds delayed location.
                                  Location loc = locationEstimate.getLatestLocation();
                             final double coX = loc.getX();
                             final double coY = loc.getY();
                             try{
                             FileWriter file = new FileWriter ("C:\\Documents and Settings\\xamule\\Desktop\\Testing\\output\\output.txt");
                             String x = Double.toString(coX);
                             String y = Double.toString(coY);
                             String coor = x + "\t" + y;
                             file.write(coor);
                             file.close();
                             catch (IOException e){
                             System.out.println("Error..." + e.toString());
                   StatusListener statusListener = new StatusListener()
                           public void handleStatus(Status status, TrackedDevice device)
                                  System.err.println(new Date()+"\tStatus for device: " + status);
                         // Add listeners and start tracking
                         device.addLocationEstimateListener(estimateListener);
                         device.addStatusListener(statusListener);
                         device.setTrackingParameter("EPE.LOCATION_UPDATE_INTERVAL","6000");
                         device.setTracking(true);
                         // Wait until user inputs something. When he/she does, stop tracking and quit application
                         //BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
                         //in.readLine();
                         // Stop tracking and disconnect from the positioning engine:
                         device.setTracking(false);
                         PositioningEngine.disconnect();
                   return 1;
    }

    Well, it's kind of logical that as you put more jar files (classes) in Tomcat, it changes the error to ask for the classes (inside a jar) it cannot find.
    There was a good class->jar finder on the internet some years ago, but i don't remember the address. Try looking for that and search all the missing classes (NotDefined) and their correspondig jar files.
    Good Luck!

  • SIMPLE RMI PROB

    I have created a very simple rmi test class passing a bk obkect to a remote library class - the code is below but i keep getting the oops error as specified in the client class - any ideas would be appreciated.
    public class bk{
    String st;
    public bk(String s){
    st=s;
    import java.rmi.*;
    public interface libint extends Remote{
    public void addbook(bk b)throws RemoteException;
    import java.rmi.*;
    import java.rmi.server.*;
    import java.util.*;
    public class lib extends UnicastRemoteObject implements libint{
    Vector v;
    public lib()throws RemoteException{
    Vector v = new Vector();
    System.out.println("lib created");
    public void addbook(bk b){
    v.add(b);
    System.out.println("BOOK ADDED");
    import java.rmi.Naming;
    public class Server{
    public static void main(String args[]){
    try{
    Naming.rebind("libs", new lib());
    System.out.println("System ready");
    catch(Exception e){}
    import java.rmi.Naming;
    public class client{
    public static void main(String args[]){
    try{
    bk b = new bk("john");
    libint li = (libint)Naming.lookup("//127.0.0.1/libs");
    li.addbook(b);
    }catch(Exception e){System.out.println("oops2");}

    I kind of guessed it was something to do with the addbook method but i have no idea why - any suggestions would again be welcome - cheers
    java.lang.NullPointerException
    at lib.addbook(lib.java:15)
    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 sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
    at sun.rmi.transport.Transport$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.rmi.transport.Transport.serviceCall(Unknown Source)
    at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Unknown Source)
    at sun.rmi.transport.StreamRemoteCall.executeCall(Unknown Source)
    at sun.rmi.server.UnicastRef.invoke(Unknown Source)
    at lib_Stub.addbook(Unknown Source)
    at client.main(client.java:8)

Maybe you are looking for