Problem with Session Bean and Weblogic.

Discussions

EJB programming & troubleshooting: Problem with Session Bean and Weblogic.

  1. Problem with Session Bean and Weblogic. (4 messages)

    Hi,

    I have deployed a Session Bean and it's ok, but when I start Weblogic, then gives me:

    <E> <EJB> Could not deploy:
    'c:/weblogic/myserver/com_shopSite_categoryManager.jar': file is not a valid jar file, or does not contain a valid bean.

    weblogic.ejb.common.DeploymentException: DeploymentException opening JAR file c:\weblogic\myserver\com_shopSite_categoryManager.jar; nested exception is:
    weblogic.ejb.deployment.JarLoadException - with nested exception:
    [weblogic.ejb.common.DeploymentException: Problem creating deployment c:/weblogic/myserver/com_shopSite_categoryManager.jar from c:\weblogic\myserver\com_shopSite_categoryManager.jar; nested exception is:
    java.lang.NoClassDefFoundError: com/shopSite/ejb/CategoryClass]
    weblogic.ejb.common.DeploymentException: Problem creating deployment c:/weblogic/myserver/com_shopSite_categoryManager.jar from c:\weblogic\myserver\com_shopSite_categoryManager.jar; nested exception is:
    java.lang.NoClassDefFoundError: com/shopSite/ejb/CategoryClass

    CategoryClass is a class that i need in the Session Bean, besides the classes of the Bean. Does anybody know why the deploy it's ok and when i start the weblogic server gives me this error?

    Thanks in advance,

    Poli
  2. Either the classpath is not set properly in the startscript or the class "com/shopSite/ejb/CategoryClass" is not there in the c:\weblogic\myserver directory....
    Did you already verify these?
  3. Hi,
    java.lang.NoClassDefFoundError: com/shopSite/ejb/CategoryClass

     indicates a class path problem.


    I am assuming CategoryClass is a shared class and not a bean.
    You can resolve this in two ways:
    1. Add the jar name to the class path.
    2. create the class as part of a package and put the shared class in class path and import the package and invoke.
    --Bhaskar
  4. Helper classes should be stored under /weblogic/myserver/serverclasses by convention for weblogic (in full package hierarchy).
  5. I have the same problem[ Go to top ]

    Hi there,

    I have the same problem...
    My EJBs use classes stored in a jar file which has been included in the server classpath. Some EJBs are deployed OK and others aren´t.
    I verify that all classes that weblogic says are missing are in the jar file. And some EJBs are able to see them !!!
    I´d appreciate some help.

    Thank you in advance!