title: Glassfish - Deploying two JARs with mutual dependencies
body: <p>I'm a newcomer to Java EE so perhaps this is a dummy question. But I'm deploying a WAR and a JAR containing EJBs to a Glassfish 3.1. server. WAR has a reference to one of the EJBs in the JAR file. Is it mandatory to include the EJB JAR in the WAR file's <code>lib</code> directory in order to make this work? Since both WAR and JAR will be running on the same app server, I was hoping that I wouldn't need to take care of these dependencies. However, I am getting a <code>java.lang.NoClassDefFoundError</code> when I deploy the WAR if it doesn't include the EJB JAR (even though the EJB JAR is already deployed on the app server).</p>