This a followup to my message regarding UnmarshalException when obtaining an
EJBObject from a handle.

It was suggested that I use PortableRemoteObject.narrow(obj,homeClass) to
obtain a reference to the home object as it uses RMI-IIOP.  I've made the
change and now the code looks like

    Context ctx = new InitialContext();
    Object obj = ctx.lookup("com.session.ProductHome");
    ProductHome home = (ProductHome)
PortableRemoteObject.narrow(obj,ProductHome.class);
    product = home.create();

    session.setAttribute("handle", product.getHandle());
    handle = (Handle) session.getAttribute("handle");
    product = (Product) handle.getEJBObject();

The error is thrown at the last line and is as follows:

java.rmi.UnmarshalException: error unmarshalling return: nested exception
is: java.lang.ClassNotFoundException: com.session.ProductObject_Stub (no
security manager: RMI class loader disabled)
java.lang.ClassNotFoundException: com.session.ProductObject_Stub (no
security manager: RMI class loader disabled)
    at sun.rmi.server.LoaderHandler.loadClass(unknown source)
    at sun.rmi.server.LoaderHandler.loadClass(unknown source)
    .
    .
    .
    at allaire.ejipt.Ejipt_Stub._getObject(unknown source)
    at allaire.ejipt._Handle.getEJBObject(_Handle.java:47)
    at TestSessionServlet.doPost(TestSessionServlet.java:48)
    .
    .
    .

>From Scott's suggestion to Usha regarding JNDI (similar error message), I
have checked that I am running JDK1.3

In the Jrun samples I see that a security policy file is specified which is
included when the clients are run (not compiled) using a line similar to the
one below:
    java -Djava.security.policy=sample.policy Client

In this case, the client is a servlet, so where do I specify security policy
as I do think this is the cause of my problems.

Thanks
Vivek



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to