I am new to JBoss and Beans so I am trying to get the 'interest' EJB example to work. I am running JBoss 2.4.4 - Tomcat 4.0.1 on a Win XP machine. Via ANT and the build files from the example documentation (documentation-example.zip), I am able to compile, JAR, and deploy the interest EJB to my JBOSS_DIST/deploy directory. JBoss spits out that it has deployed the bean. When I try to run the client (InterestClient), however, I can't get it to work.
When it tries to do the lookup with interest/Interest, it basically times out with the following error:
javax.naming.CommunicationException [Root exception is java.rmi.ConnectException: Connection refused to host: 152.163.0.0; nested exception is: java.net.ConnectException: Operation timed out: connect]
I'm not sure what the 152.163.0.0 port refers to. I am running the client app on the same machine as JBoss is running.
I have tried several things to try to get it running, such as:
- Having the client class not use the jndi.properties file but rather hardcode the values in a Properties object in the client class and pass that into InitialContext.
- Run the client from the command-line: both using the jndi.properties file and using the Properties object for the values.
- Modifying the ejb-jar.xml file to include the line:
<!DOCTYPE ejb-jar
PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN"
"http://java.sun.com/dtd/ejb-jar_2_0.dtd"
>
Nothing seems to work.
I also went to http://localhost:8082/ to see if the EJB showed up. Under the 'Management' area it did list jndiName: interest/Interest.
I followed that link and when it listed the value for the container it stated:
Type Not Supported
[org.jboss.ejb.StatelessSessionContainer@39b8d0]
I'm not sure if the 'Type Not Supported' is stating that something is wrong with the EJB.
This seems to be such a simple example to get working. I just can't seem to find out why the lookup is failing. Could it be the OS (Win XP - home edition)?
I have searched through the EJB forum and have used some items that others have mentioned but no luck yet.
I would appreciate any new thoughts.
Thanks - Peter Len