Discussions

EJB programming & troubleshooting: Setting classpath to utility classes in weblogic-7.0

  1. Hi,
      I have some utility classes in my application those are used by both ejbs and web application. I am using the following directory structure,
    myapplication/myejb1.jar
    myapplication/myejb2.jar
    myapplication/mywebapp.war
    myapplication/META-INF/application.xml
    myapplication/META-INF/classes/myutilityclasses.jar
    myapplication/META-INF/MANIFEST.MF
     I wrote the following line in manifest file 'Class-Path: myejb1.jar myejb2.jar mywebapp.war myutilityclasses.jar' and created myapp.ear file by using the command 'jar -cvfm myapp.ear META-INF\MANIFEST.MF . ' from myapplication directory. While deploying the myapp.ear file in weblogic-7.0 I am getting (utility) class not found exception. Please suggest me a solution for this classpath issue.
    Thanks in advance,
    Chowdary
  2. You need to add a Class-Path entry in your ejb.jar that uses the utility class. e.g.

    EAR
    +ejb.jar --> manifest of this jar should have Class-Path: util.jar
    +web.war
    +util.jar

    the manifest of the JAR not the EAR.

    Cheers,
    AT