EJB remote call issue


EJB programming & troubleshooting: EJB remote call issue

  1. EJB remote call issue (2 messages)

    I have the following case:
    Client Classes:
    - A

    Server Classes:
    - A
    - B (subclass of A )
    - MySessionBean

    this session bean has a method like this:

    public A doSomething(){
    ...//run tasks
    //got B
    return (A) B ;
    Ok. now,
    The problem is that, the RMI tries to send back an instance of B instead of A . And, since B is not present in the client distribution(and it is supposed not to be), the client throws the following exception:

    Caused by: java.lang.ClassNotFoundException: B
    (no security manager: RMI class loader disabled)
    at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:368)

    How would this problem be addressed?...

    thanks for your comments...


    Threaded Messages (2)

  2. EJB remote call issue[ Go to top ]


    Casting to an ancestor does not change the underlying class, the class B must be in the client's classpath.

  3. EJB remote call issue[ Go to top ]

    I believe you must have the concrete class on the client-side also.