title: Using GlassFish <class-loader delegate="false" /> in WAR of EAR causes ClassNotFoundExceptions on JARs in WAR
body: <p>The problem:  I'm doing maintenance/enhancement work on a project using an old (2.0.3) version of Mojarra, and recently hit a bug.  Updating Mojarra corrects the problem.  Unfortunately, updating Mojarra on the production Glassfish server isn't an option; a whole bunch of applications in production are on that server, and there is no possible way our QA department would be able to check all of them for regression errors.</p>
  
  <p>The proposed solution:  Deploy Mojarra with just this application, I've dropped the new Mojarra jar (<code>javax.faces-2.1.26.jar</code>) into <code>/WEB-INF/lib</code>, and changed the <code>sun-web.xml</code> <a href="https://stackoverflow.com/questions/10782528/how-to-update-mojarra-version-in-glassfish/10784147#10782528">per BalusC's answer in another question.</a></p>
  
  <p>The complication:  Doesn't work.  Setting <code>&lt;class-loader delegate="false" /&gt;</code> results in a null-pointer exception when I log into the app; apparently, my EJBs are no longer being set properly.  Leaving "delegate" set to "true" gets me into the app, but is using the old Mojarra on the server, leaving me back where I started.</p>
  
  <p>So, how do I accomplish what I want here?  Is there some other way of doing this (other than updating the JAR on the Glassfish server itself, which is a non-starter) or of correcting the behavior I'm seeing?</p>
  
  <hr>
  
  <p><b>EDIT:</b>  Taking a closer look at the console output, I'm getting a TON of <code>ClassNotFoundException</code>s.  It looks like my other JAR files aren't getting pulled-in.</p>