Overview

General

Configuration

Servers

Integrations

Community

Related Projects

Index

Feeds

 

That's right, let us know what annoys you when using OpenEJB. Big or small, doesn't matter, let us know and let other users know. You can help other OpenEJB users get around annoying things you've faced and help us find ways to keep improving OpenEJB.

Most people assume that many of the annoying things they face when using open source software are their fault or intentionally hard. Not true. We do the best we can with the feedback we get just like you. Let us know, let others know and we can make things better!

Click the Edit link in the upper right and let it rip.

If this takes off, we will create a JIRA category for this so people can vote for the ones that annoy them the most.

You call that a feature?

  • CMP Config The fact that I have to muck with so many xml files to configure a CMP Container is completely annoying. What's with the Local and Global transaction database.xml files! Why can't I just have a mapping file and that's it!
  • openejb-jar.xml I hate having to fill in all the CMP finder OQL evertime I redeploy my beans. Why can't you just update the existing openejb-jar.xml

What a strange error...

Ever encounter an error that was less than clear? Let us know.

Took me forever to find this answer...

Ever spend forever searching the archives for answer? Save people some time and put it here. Put a link, put the whole answer, anything.

If you have EJBs that extend from a base class that is in your classpath, you may get the "mislocated class" error incorrectly. 

Suppose we have a base class

public abstract class AbstractSessionBase implements SessionBean

and all our stateless session EJBs extend this class.  For example,

public class LookupBean extends AbstractSessionBase

We build AbstractSessionBase into base-classes.jar in our classpath, and LookupBean into its own EJB jar, lookup-ejb.jar.  When we attempt to validate or deploy the EJB using the command line: 

java -classpath lib/base-classes.jar -jar %OPENEJB_HOME%/lib/openejb-core-1.0.jar validate lookup-ejb.jar

We get:

     [java] java.lang.NoClassDefFoundError: com/xyz/system/AbstractSessionBase
   
     [java]  ERROR ... Cannot validate jar

     [java]     com/xyz/system/AbstractSessionBase

     [java]  FAIL ... LookupBean: Misslocated class

     [java]     The class com.xyz.business.LookupBean was found in a parent classloader and was loaded from there rather than this jar.  However, a dependent class com/xyz/system/AbstractSessionBase was not found in the parent classloader.

 This is message is misleading; there is a classloading problem, but it's not what is described in the message. 
 
 The real issue is that, when we use the -jar parameter on the java command line, the executable jar gets its own classloader, which is separate from the one that loads the -classpath.  So OpenEJB can't find the AbstractSessionBase class from its classloader, and gives the NoClassDefFoundError.
 
 The solution is to run the OpenEJB command with the OpenEJB jar in the classpath, and the class name on the command line, like this:
 
  java -classpath lib/base-classes.jar;%OPENEJB_HOME%/lib/openejb-core-1.0.jar org.openejb.cli.Main validate lookup-ejb.jar
 
 This way, the OpenEJB classes share the same classloader with our base class, and all is well.
 

   

Apache OpenEJB is an project of The Apache Software Foundation (ASF) - Website Privacy Policy -
Site Powered by Atlassian Confluence .
[ edit ]