1 Reply Latest reply on Jan 17, 2006 2:07 PM by siddharth chhabra

    Simple HelloWorld Client

    siddharth chhabra Newbie

      I have a simple client given below -
      and when i try to run it i get a weird stack on jboss4.0.2 -
      (also given below)

      i get it on the client side
      i have all the client libraries on my classpath
      i am using sun jdk 1.4

      I was trying to get upto speed on jboss to port a websphere application to jboss and stumbling on "HelloWorld EJB" :(
      public static void main(String[] args)
      Hashtable prop = new Hashtable();
      prop.put ("java.naming.factory.url.pkgs","org.jboss.naming:org.jnp.interfaces");
      prop.put ("java.naming.provider.url","jnp://");
      prop.put ("java.naming.factory.initial","org.jnp.interfaces.NamingContextFactory");
      try {
      Context ctx = new InitialContext(prop);
      Object obj = ctx.lookup("helloworld/HelloWorld");
      HelloHome home = (HelloHome)javax.rmi.PortableRemoteObject.narrow(obj, HelloHome.class);
      Hello helloWorld = home.create();
      String str = helloWorld.hello();
      }catch(Exception e){

      java.rmi.ConnectIOException: Exception creating connection to:; n
      ested exception is:
      java.net.SocketException: Software caused connection abort: connect
      at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:580)
      at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:185
      at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:171)