Class-Path entry in Manifest file


EJB programming & troubleshooting: Class-Path entry in Manifest file

  1. Class-Path entry in Manifest file (4 messages)

    I am having some problems while deploying a EAR file in Weblogic 6.1 sp1 server.

    My EAR file contains two jar file and one war file say,


    Since some EJB's in A.jar file are referencing classes in B.jar, I added class-path entry for B.jar in manifest file of A.jar.

    Still I am getting ClassNotFoundError while deploying. The strange problem is if I drop the same EAR file again in Weblogic applications directory(using hot deployment), the application is deployed.

    Any clues??

  2. Hi

    I have experienced the same behaviour. I think the problem lies in that each ejb-jar file is viewed as a unit that can be deployed separately, which causes a class not found exception when classes are kept in one jar and exposed through another.

    Why it works if you do it twice in a row could be that they have circular reference problems.

    - Thomas
  3. BTW - can you actually use the "manifest Class-Path" to add utility jar files to ejb-jars?

  4. Sure, you can. There is no problem to add
    Class-Path: ../../morelibs/utilities.jar
    to the manifest of a deployment unit in WLS 6.1. Then
    the server will search for xerces.jar in

    The same works for JBoss without problems, but $JBOSS_HOME/morelibs/utilities.jar must be declared
    Class-Path: ../morelibs/utilities.jar
  5. There should be a new line character after each entry in the manifest file.