Adding dependency jars to EAR


General J2EE: Adding dependency jars to EAR

  1. Adding dependency jars to EAR (2 messages)


    Can anybody give me some advise in how to add Jars to an EAR file which the ejb modules within the EAR are dependent upon. I have added the class path entries into the manifest.
    but it still throws the classdefnotfound exception.

    I will outline what i have done if anyone can help. I have an Ear file called a.Ear. In it there is one EJB module called BEJB.jar. This jar has a dependecy on another jar called c.jar.

    The BEJB.jar and c.Jar are both contained within the EAR file and in the application.xml file I have put the following for the EJb module


    In the manifest file I have added the following entry. This is the manifest file which is within the BEJB.jar

    Manifest-Version: 1.0
    Class-Path: c.jar

    The manifest file for the EAR i have not touched. I have built all the jars using ant. I have checked the manifest files and they are within the correct directory within the appropriate jar i.e meta-inf and contain the above information.

    This still throws the classdefnotfounderror.......Any ideas what i am missing?


    Threaded Messages (2)

  2. Adding dependency jars to EAR[ Go to top ]

    Try to

    I am also plannig to use that feature
    check the version of application.xml (I think 1.3 should be)
    add <java>c.jar</java>into the application.xml
  3. Adding dependency jars to EAR[ Go to top ]

    Hi Faisal,
    Whatever you are doing is correct and it should work. Please make sure the following
    1. View the manifest file of ejb-jar from within the ear file and make sure mnaifest file have the entry. Please also verify that c.jar is package at the root of the ear file.

    2. The extension mechnanism is supported from JDK1.3+ onwards. Please make sure you use JDK 1.3 to start the appServer.

    Let me know if you still have problems