Comments on: Connecting to an EJB 3.0 Remote SessionBean from Tomcat Friends of Oracle and Java Sat, 01 Aug 2015 11:10:05 +0000 hourly 1 By: Daniel Wed, 01 Apr 2009 06:49:53 +0000 I found this tutorial helpful but, it seems not applicable for manual deployment of a plain war file in Tomcat.
I am having some problems in what jar(s) file need to be copied in the %CATALINA_HOME%\shared\lib folder in order to run this successfully.
The errors I’ve encountered are “java.lang.NoClassDefFoundError: com/webage/ejbs/SimpleBean”, and others…

Any update on this. Any help would be highly appreciated. Thanks!

By: Martin Mon, 23 Feb 2009 15:55:07 +0000 I have the same problem than Rob. I’m using Glassfish 2.1 b60e and Tomcat 6.0.18. After I copied the mentioned jars to the lib folder and renamed it (otherwise there would be a conflict in the class loader loading hierarchy), I still have the problem that Tomcat can not create the resource instance processing the global JNDI resources.

Has anyone an idea what’s wrong here? Any help would be great. Thanks.

By: Rob Fri, 05 Dec 2008 15:29:55 +0000 Has anyone any help regarding this issue using Tomcat 6.0? There is no shared/lib folder in 6 and ading the jars to the lib folder causes Tomcat to fail to start. Any help would be appreciative.


By: Firoz Wed, 03 Dec 2008 15:48:55 +0000 Thanks very much. I’ve been battling with this for such a long time. Just trying to understand how it all works was a problem.
Note for all, after copying the jars to the shared\lib directory remember to RESTART the tomcat server.

By: sudhir Thu, 18 Oct 2007 01:00:52 +0000 This tutorial looks great and helpful in testing ejb 3.0. espicially calling ejb thru a servlet is interesting. it is great to look such kind of tutorials on web.

By: James Sun, 24 Jun 2007 10:30:02 +0000 Hi,
I tried the steps mentioned by you and it worked.
I was trying to figure out a way for this for a many days and your tips really helped me.

But I have a few issues,

The above mentioned tips works very well, if the project is not a JSF project.
But if you create a web project with the framework as JSF, then tomcat is failing to load the application properly.
Did you try this?
But it is perfectly working well if the project contains only jsps and servlets.
Eagerly awaiting your reply.

By: Wouter van Reeven Wed, 01 Nov 2006 11:26:25 +0000 Please note that when you’d like to connect to the remote session bean from another machine than the one running Glassfish, you need to do some additional configuration of Glassfish.
Open the Glassfish admin console in your browser and expand Configuration -> ORB -> IIOP Listeners. The listener named orb-listener-1 is created by default when you install Glassfish and it is configured to listen to port 3700 on all IP addresses ( If you try to connect to this listener remotely, it will throw an error saying it cannot resolve IP address
In order to fix this, add another IIOP listener and copy all configuration settings of orb-listener-1 except for the port and IP address. Make sure the port is set to another, available, port, e.g. 3701. Also make sure that the listener is listening on the “external” IP address of the machine running Glassfish. So, if the IP address of the machine running Glassfish is use this IP address.
Next, be sure to use the correct ORBInitialHost and ORBInitialPort settings. So, in this example use this

props.setProperty(“org.omg.CORBA.ORBInitialPort”, 3701);

After this, Tomcat should have no problems connecting to the remote session beans.
Please note that it is perfectly ok to modify the IP address that the orb-listener-1 listener is listening on to the “external” IP address. If you do this, local connections to your remote beans won’t work anymore.

By: Eduardo Pelegri-Llopart Fri, 20 Oct 2006 18:19:16 +0000 Cool. I am pushing a spotlight to it in a short while. See