EJB ClassCastException - Urgent - EJB guru's please respond

Discussions

EJB programming & troubleshooting: EJB ClassCastException - Urgent - EJB guru's please respond

  1. Here's the scenario i am trying to tackle :

    We are currently using IAS app-server for ejb deployment. I have a BEAN-A in JAR-A deployed to the container. Similarly i have BEAN-B in JAR-B depolyed to the same container. BEAN-A calls BEAN-B ( BEAN-A ----> BEAN-B)

    I first go and deploy JAR-B and generate the client side stubs. Next I deploy JAR-A to the same container using the client side stubs generated from the earlier step.

    The issue:
    When i try to access BEAN-B from BEAN-A...I get a ClassCastException ( in the create method of BEAN-B). From what i gathered from some other thread if the home/remote interfaces are available in multiple places in the path then we usually hit into this issue. Is that true ???

    If yes, how could i go about handling this situation other than merging the beans into a single jar and deploying them together.

    EJB-guru's looking forward to ur response.

    Thanks.
  2. Have a look at the IAS/BAS ejb container class loading policies - you may need to set it to 'Container'.

    For examples have a look at <install>\examples\ejb\pigs

    Regards,

    Carlos
  3. Simply do an EAR with your two JARs inside.
    Regards.