Servlet invoking EJB


EJB programming & troubleshooting: Servlet invoking EJB

  1. Servlet invoking EJB (3 messages)

    I have made two session beans.First stateful which is invoking my stateless bean.they both r working just fine when i tried them using client.But when i tried to invoke stateful bean through my servlet which is on different server,its giving following exception
       class cast exception:statefulTestimpl_stub.
     where statefulTest is name of my stateful bean.
  2. Servlet invoking EJB[ Go to top ]

    I assume you're on weblogic. I found a similar oddity, and I don't know why. I think it may have to do with the weblogic classloader.

    The solution for me was to change my servlet classpath in the file. I think that commenting it out, or else changing it to something else might help.
  3. Servlet invoking EJB[ Go to top ]

    thanx for ur reply.i am working on weblogic server.Exact exception that i am getting is
    class cast exception:statefultestbeanhomeimpl_servicestub
    when my servlet which i am running using jsdk2.1 server tries to get home reference of my bean which is on weblogic server.I tried by commenting my servlet class path but it didn't work.i will be obliged if u can give bit more details.
  4. You need to remove from the servlet classpath the classes that are already put in the deployment jar. For example, the home and remote interfaces of your bean must not be present in the classpath of the servlet. They will be gotten from the deployment jar.

    This is a WebLogic bug, IMHO.

    Gene Florintsev
    gene at ejbility dot com