Is it necessary to put the package(containing ..................


EJB programming & troubleshooting: Is it necessary to put the package(containing ..................

  1. Is it necessary to put the package(containing *.class files for EJB) in the CLASSPATH. If, say , I am calling an EJB from within the servlet/JSP, then, should I store the package in the .../applications/DefaultWebApp/WEB-INF/classes directory ????

    As what I observed, by not putting this it throws exception saying that the concerned java file(bean class or any of those two interfaces) is not found in the classpath....
    But when i put this it runs fine...
    As far as I know it should take the references from the depoyed JAR file with JNDI look-up..

    For yr kind reference, when I am deploying(using ant tool) in the running Weblogic Server, the Bean is put into the .wlstaging directory present under mydomain directory.

    is this the right place for the Bean after deployment????????
    Plz help..
    thnx in adavnce..

  2. Atleast the Remote Interface and the Home interface classes of the EJB should be in WEB-INF/classes directory. You should write your ant build.xml such way that the war file is packaged picking up the EJB client related classes and the servlets & servlet helpers & jsps
  3. hello Friend,
    I am not using my own defined Ant(build.xml) in stead, i m using the available ant command from console for DD or packaging...then deplying using weblogic.deploy command.

    so can u plz broaden yr answer??
    thnx any way..
  4. If you pacakge you WAR and JAR file into an EAR file than due to the nature of the Classloaders in Weblogic, the classes in the WAR file will be able to see the classes in the EJB JAR file.

  5. thnx David.......