Announcement Announcement Module
Collapse
No announcement yet.
spring & ejb Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • spring & ejb

    I am trying to deploy a stateless sesion bean on weblogicserver8.1. When I try to deploy the application it is giving me the following error message.

    class: org/springframework/ejb/support/AbstractStatelessSessionBean please make sure this class is contained within WebLogic Builder's classpath.



    my directory structure is as follows
    springapp
    |___META-INF
    | |_ejb.jar.xml
    | weblogic-jar.xml
    |___firstbean
    |_Hello.class
    HelloService.class
    HelloImpl.class
    HelloBean.class
    HelloHome.class
    |_applicationContext.xml
    |_HelloClient.class
    |_BeanConfig.xml
    |__WEB-INF
    |_lib
    |_spring.jar
    commons-logging.jar

    Please tell me how I can solve his problem.

    Thanks in advance

  • #2
    Do not place the spring.jar (and dependent jars) in WEB-INF/lib as these jars are loaded by a different classloader. Just place it in the root of your EAR. That should do.

    Regards,
    Andreas

    Comment


    • #3
      Spring & EJB

      Thank you Andreas. I tried deploying after placing the spring.jar and common-logging.jar in the root folder of my application. It is giving the same error message that
      class: org/springframework/ejb/support/AbstractStatelessSessionBean please make sure this class is contained within WebLogic Builder's classpath

      I tried deploying from the console window instead of the weblogic builder.The deployment failed there also. The message in the server window looked like this.

      <Oct 30, 2007 3:13:43 PM GMT+05:30> <Warning> <DRS> <BEA-002506> <The current ve
      rsion 42 for DataIdentifier DataIdentifierID: 1 does not match with incoming version 43 for a one-phase update.>
      <Oct 30, 2007 3:13:44 PM GMT+05:30> <Warning> <Deployer> <BEA-149004> <Failures were detected while initiating Deploy task for application sathya.>
      <Oct 30, 2007 3:13:44 PM GMT+05:30> <Error> <Deployer> <BEA-149201> <Failed to complete the deployment task with ID 1 for the application sathya.
      java.lang.NoClassDefFoundError:org/springframework/ejb/support/AbstractStatelessSessionBean
      .....
      .......

      Comment


      • #4
        To be sure: You should have your application in one jar.
        This jar and all dependent jars (spring etc.) should the reside in the root of an EAR. If that does not work, try referring the dependent jars in the "Class-Path" manifest entry of the jar containing your application classes.
        i.e.
        Code:
        Class-Path: spring.jar commons-logging.jar
        Note that classpath entries are whitespace separated

        Comment


        • #5
          Weblogic offers another (non-standard) way of utility jars deployment. Try to find some docs on ear packaging and APP-INF.

          Comment

          Working...
          X