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://10.209.142.157:1099");
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();
System.out.println(str);
helloWorld.remove();
}catch(Exception e){
e.printStackTrace();
}
}
java.rmi.ConnectIOException: Exception creating connection to: 10.209.142.157; 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)