4 Replies Latest reply on Oct 22, 2005 11:06 AM by Aldo Nievas

    ClassNotFoundException, classloader issue, how to share a ja

    Joel Collins Newbie

      We are trying to share a jar library between our EJB and WEB modules. Right now, we have placed our shared jar in the root of the EAR and added Class-Path tags to the MANIFEST.MF files of the EAR and WAR. At deploy time, it throws the following exception:

      java.lang.ClassNotFoundException: org.apache.myfaces.component.html.ext.HtmlDataTablePhaseListener
      at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1332)
      at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1181)
      at com.sun.faces.util.Util.loadClass(Util.java:406)
      ....

      The directory structure is as follows
      theEar.ear
      shared.jar
      WEB.WAR
      META-INF
      MANIFEST.MF (Class-Path: shared.jar)
      EJB.JAR
      META-INF
      MANIFEST.MF (Class-Path: shared.jar)

      Thank you for your help.