[jboss-user] [EJB/JBoss] - PortableRemoteObject.narrow() returns null
oops.ch
do-not-reply at jboss.com
Thu Jan 11 02:45:36 EST 2007
Hi there
I've got some problem with runing an EJB application over RMI/IIOP.
I went through the tutorial DukesBank from JBoss http://docs.jboss.org/jbossas/getting_started/v5/html_single/ . After I successful could run the application, I tried to run it over RMI/IIOP. I thought, I just have to do change some properties. But it wasn't as easy as I expected.
| public static CustomerControllerHome getCustomerControllerHome()
| throws NamingException {
| InitialContext initial = new InitialContext();
|
| String customerControllerEjbhome = "ebankCustomerController";
| Object objref = initial.lookup(customerControllerEjbhome);
|
| Object obj = PortableRemoteObject.narrow(objref, CustomerControllerHome.class);
|
| return (CustomerControllerHome) obj ;
| }
|
When I run this code, the call PortableRemoteObject.narrow() returns null. I don't know why. The Object obj is a CORBAObjectImpl Object and for me it seems that it contains all the necessary things.
I googled for this problem but I didn't find a resolution.
What I think is strange, when I debug the code, I see, that it uses the Sun classloader and not a JBoss classloader. Is this normal? Has anybody an idea, why the call PortableRemoteObject.narrow() returns null?
I'm using the following environment:
JDK: Sun JDK 1.5.0_09
JBoss: JBoss 4.0.5
Thanks for your help
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4000297#4000297
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4000297
More information about the jboss-user
mailing list