title: EJB modules cannot find class from another EJB module on glassfish
body: <p>I have an EJB 3 module deployed on my Glassfish 2.1 server.</p>
  
  <p>I'm trying to deploy a second EJB module, which depends on this first module, but the deployment fails with java.lang.NoClassDefFoundError about a class that can be found in the first EJB Module.</p>
  
  <p>What's the best way to solve this dependecy between 2 EJB modules? I want to deploy them separately, and not have them in the same EAR. </p>
  
  <p>More specifically, I have a Dependecy Injection of an EJB from my first EJB Module in one of my EJBs of my second EJB module:</p>
  
  <pre><code>@EJB (name="ejb/FirstEJB")
  private FirstEJBRemote ejb;
  </code></pre>
  
  <p>But during deployment I get NoClassDefFoundError about the class FirstEJBRemote:</p>
  
  <pre><code>Error in annotation processing: java.lang.NoClassDefFoundError: FirstEJBRemote
  </code></pre>