tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Blevins <>
Subject Re: Installation: ClassNotFoundException: org.apache.openejb.loader.OpenEJBListener
Date Fri, 01 Feb 2008 08:23:53 GMT
On Jan 31, 2008, at 10:34 PM, White-Gandalf wrote:

> Hi folks,
> i'm new on Tomcat and OpenEJB. I had installed Tomcat 6.0.14 with some
> problems, but nevertheless functioning at last. Now, i wanted to add
> OpenEJB. After starting the installation procedure by copying the  
> "war" to
> webapps, when i tried to restart the server, it wasn't starting  
> anymore. In
> "stderr_...log" are "ClassNotFoundException:
> org.apache.openejb.loader.OpenEJBListener" to be found.
> Has anybody an idea, what's going wrong?
> So far i had only followed the really simple copy operation, and i  
> have one
> speciality that possibly has something to do with that behavior.
> After the installation of the "war" by tomcat, the batch file for  
> starting
> the server as a user application from the command line was changed.  
> That
> contradicts the fact, that tomcat has to be running as a service on my
> system. To react on that, i executed the two lines in question by  
> hand,
> namely:

Right, I'm not sure that the bat files are used at all when installing  
tomcat as a windows service, so editing them in any way may have no  

The 6.0 docs have this page, which is basically a copy of the second  

Regarding the -javaagent param, it might be possible to set that up  
using the --JvmOptions flag as mentioned in those docs.  Seems the  
most likely of the unlikely looking options.  But I suspect it can  
only handle -X and -D vm options and the new -javaagent option might  
be unsupported.  The javaagent isn't strictly required, more strongly  
encouraged if you use JPA (aka EJB3 EntityBeans).

Regarding the annotations jar and the ClassNotFoundException, I  
suspect they might be the same problem.  I've seen it before with  
Tomcat as a windows service seemingly refusing to actually stop when  
you click their little stop/start or restart buttons and changes  
you've made to the classpath never take effect.

One thing to try is pop open the services panel in windows, find the  
tomcat service right click on it and select the stop option, then go  
ahead and start it again.  Or restart your machine for good measure.

If running tomcat as a service is not that important to you,  
definitely just grab a plain zip, unpack and boot from the bat files  
as it will be far less difficult to deal with and the ejb plugin will  
work -- all these issues are service related.

Tomcat can handle plain webapps not starting and continue to work, but  
it can't handle anything such as a tomcat specific listener not  
working.  Uninstalling the openejb webapp is as simple as deleting the  
webapp, removing OpenEJBListener declaration from your server.xml if  
you added it either manually or via the openejb webapp install page,  
then restarting tomcat.  The trick is if I am right in that Tomcat is  
in fact not restarting and is keeping the same old vm with the same  
classloaders, it won't work either.

Let us know if the more direct attempts at restarting work or not.  I  
suspect anyone who attempts to use Tomcat as a windows service may  
have difficulties with the integration and it'd be really good to get  
some up to date info on this and document accordingly.

As an FYI, a build of the beta 2 release is currently up for vote and  
does have improvements in the Tomcat integration -- specifically  
around the need for the OpenEjbListener, annotations-api.jar and the  
need for a restart (none are required anymore).  If you can get a  
clean Tomcat install again, it might be worth it to try them out.   
Binaries are here:

Let us know how things go and we can try and find another solution.   
If all else fails I can get my hands on a windows machine next week  
and hammer on it some.


View raw message