EJB remote call issue

Discussions

EJB programming & troubleshooting: EJB remote call issue

  1. EJB remote call issue (2 messages)

    Hi,
    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...

    Cesar.

    Threaded Messages (2)

  2. EJB remote call issue[ Go to top ]

    Julio,

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

    Mike
    MALKI SYSTEMS INC.
  3. EJB remote call issue[ Go to top ]

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