title: Glassfish 3: Why do I have to deploy all my libraries into domains/lib/ to get it to work?
body: <p>I just got handed over a project from another group. EJB session bean / web service. It deployed without any issue on JavaCAPS 6. </p>
  
  <p>However, on Oralce Glassfish V3 (3.0.1 Build 22), when I deployed the jar file (Applicaton / EJB Module), it kept complaining certain external libraries (which is included in the jar), can not be found. </p>
  
  <p>Error in annotation processing: java.lang.NoClassDefFoundError: org/apache/commons/vfs/FileSystemException|#]</p>
  
  <p>The Apache VFS jar is in the jar, but it can't find it. </p>
  
  <p>However, if i move the jar and its dependencies into $Glassfish home/domains/domain1/lib</p>
  
  <p>Everything is fine. </p>
  
  <p>What are we doing wrong here? </p>
  
  <p>Thanks</p>