tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From freeway <>
Subject Problems deploying EJBs in embedded Tomcat OpenEJB
Date Fri, 13 Nov 2009 17:37:30 GMT

I am new to OpenEJB and to EJBs in general, attempting to set up a Tomcat
6.0.16 environment to use embedded OpenEJB 3.1.2.  My objective is port an
existing JEE application to run as a single webapp inside Tomcat, with
OpenEJB loading and managing access to its EJBs.  All the EJB classes are
packaged in a single JAR file that is part of the webapp.  The code is not
written with injection or any annotations, and I am defining the EJB objects
to the webapp entirely using the XML files WEB-INF/web.xml,
META-INF/context.xml, META-INF/ejb-jar.xml, and

The problem is that after Tomcat startup, which does not show any errors in
the Tomcat logs, the application is unable to access any EJBs from JNDI.  I
expect I have configuration problems, and have searched the forums as well
as the OpenEJB documentation extensively for related posts and examples, but
the mixture of fragmentary current and stale information that available has
been difficult for an EJB newbie like myself to use.

Here is the JNDI error from the webapp at run-time.  The application is
looking up the name 'lsbpm/LsBpmEjbFrontDesk', so I presume that the full
name is being constructed by OpenEJB.

javax.naming.NameNotFoundException: Name
not found.

Here is the relevant EJB reference from the webapp's web.xml.


Here is the relevant EJB configuration element from context.xml.

   <Ejb name="lsbpm/LsBpmEjbFrontDesk" auth="Container" type="Session"

Here is (I think) the relevant configuration from a much longer ejb-jar.xml.

<ejb-jar id="LsBpmEjb_jar">

    <session id="LsBpmEjbFrontDesk">


Here is the loader servlet definition from the openejb webapp, which I did
not think was necessary but added nonetheless for testing purposes based on
some documentation that I found.


The EJB JAR file, which contains a META-INF/ejb-jar.xml file, is saved in
the directory ${catalina.base}/lsbpm/openejb/apps/.  I also left a copy in
the WEB-INF/lib/ directory of my webapp.

Finally, the $CATALINA_HOME/conf/openejb.xml file has not been modified, and
contains a Deployments element at the bottom referencing the EJB directory

<Deployments dir="apps/" />

The Tomcat stdout log entries on startup are as follows.

OpenEJB init-params:
	param-name: openejb.home, param-value: C:\Program Files\Apache Software
Foundation\Tomcat 6.0/lsbpm/openejb
	param-name: openejb.loader, param-value: LsBpmServer-webapp
log4j:WARN No appenders could be found for logger (OpenEJB.options).
log4j:WARN Please initialize the log4j system properly.
Apache OpenEJB 3.1.2    build: 20091010-03:11
context path = /LsBpmServer
context path = /openejb

After startup, the JNDI viewer in the openejb webapp does not show any of my
EJBs.  To compound the problem, I have been unable to increase the OpenEJB
log level by overriding the file with my own file as described in the OpenEJB documentation.  Whether I
place the override file in the openejb lib/, openejb WEB-INF/classes, or
$CATALINA_HOME/lib directories, it does not affect the log output.  Is this
a known OpenEJB issue?

Please provide any hints you can.  I can obviously provide much more detail,
but did not want to overload this post until I knew what was most relevant. 
I expect that I have simply misunderstood the configuration that is
necessary to use embedded OpenEJB.

Thx in advance.
View this message in context:
Sent from the OpenEJB User mailing list archive at

View raw message