Discussions

EJB programming & troubleshooting: Error while deploying EJB on weblogic 5.1 (no service pack)

  1. Hi,

    When I try to deploy an EJB, which do not refer to any other classes, it gets thru fine .. But in case of a bean that refers to some different packages for different classes, while deploying them, server throws NoClassDefFoundError ... which indicates that one of the dependent class in other package is not available.

    I checked the jar file, the so called missing class is present in jar itself.

    Can anyone help me out ??

    Thanks,
    Kailash
  2. Is the dependent class used with the EJB serializable too?
    Check this out. I don't know if this would throw ClassDef.. error.

    Suresh
  3. Weblogic 5.1 classloader exports only classes that are used in remote interface method arguments/results. So if you have class in your ejb-jar, but this class does not referenced it bean interface, the classloader can not find this class after deployment.

    To fix it you may add your undeployed jar file to weblogic.classpath variable that you specify in weblogic startup script.

    Also I would recommend you to upgrade WL51 to SP8. There are a lot of problems fixed in SP8.


    WBR,
    Stanislav Markin
    Brainbench MVP for Java 1
    http://www.brainbench.com
  4. Thanks ..

    The classes that I mentioned are derived from Exception class, & hence are serializable.

    Applying Service pack is of no use.

    Currently i'm using startWeblogic.cmd file to start the server, in which i have added my compiled classe's path in weblogic_classpath variable, which in turn is available to weblogic.server as a proprty weblogic.classpath

    none of my admin will allow this on production server ..

    is this bug in weblogic servers ?
  5. Its not just weblogic that has this - I'm experiencing it on Borland App Server at deploy time - the class is visible at compile time ( its in my projects classpath ) but the verifier doesn't seem to be able to find the class.