[jboss-user] [EJB 3.0] - Help!! Failed to call remote methods in jboss 4. (EJB3, Stat

MyNameIsDaniel do-not-reply at jboss.com
Mon Sep 29 07:27:47 EDT 2008


Hi all,

I got a problem with my first EJB3 test.
I could call my remote method ONLY in the computer that runs JBoss.
Here's the detailed situation:

I wrote a Stateless Session Bean in Eclipse.
It simply provides (remote) a static String method SayHello(String name).
SayHello("Daniel") -> "Daniel says: Hello!"
Then I copied the exported JAR file into server/default/deploy.
JBoss 4 was launched and the jndi was up there. HelloWorldBean/remote
Everything ran pretty well.

Then I started another project in Eclipse which is called "SwingEJBTest"
I wanted to use a Swing project to call the remote method.
There was a JTextField (for Input), a JTextArea (for Output) and a JButton.
I'm not good at describing things in English, please see my code below...

I copied the interface HelloWorld.class and all the JARs in client folder.
Then I set all the Classpaths, wrote codes and generated JAR with FatJAR.
I launched the SwingEJBTest.jar with .bat file and everything was OK.
I input "localhost:Daniel" and it outputs "Daniel says: Hello!".

Then I copied the JAR to another computer and the problem came:
I input "192.168.1.101:Daniel" (JBossServer: 192.168.1.101:1099).
There was an exception thrown: 
Could not obtain connection to any of these urls: 192.168.1.101:1099...

I closed the firewall on the JBossServer computer, pinged 198.168.1.101,
but I found nothing abnormal. I can access the server computer,
JBoss was still running there, firewall totally off.

I packed the JAR with FatJAR, totally dependant from external JARs.

Could anyone tell me why I got this Exception on another computer? 

Thanks a lot for your kind help.

Regards,

Daniel

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4179329#4179329

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4179329



More information about the jboss-user mailing list