users@glassfish.java.net

Remote Slsb Look up Failure

From: Jason Lee <lee_at_iecokc.com>
Date: Mon, 24 Apr 2006 11:22:51 -0500

When trying to get a reference to a remote session bean, I get the
follow stack trace from my client:
 
javax.naming.NamingException: ejb ref resolution error for remote
business interfacecom.iecokc.products.IBrandNameProduct [Root exception
is java.lang.NullPointerException]
 at com.sun.ejb.EJBUtils.lookupRemote30BusinessObject(EJBUtils.java:313)
 at
com.sun.ejb.containers.RemoteBusinessObjectFactory.getObjectInstance(Rem
oteBusinessObjectFactory.java:61)
 at
javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
 at
com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:314)
 at javax.naming.InitialContext.lookup(InitialContext.java:351)
 at
com.iecokc.products.BrandNameProductClient.main(BrandNameProductClient.j
ava:20)
Caused by: java.lang.NullPointerException
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
 at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:585)
 at com.sun.ejb.EJBUtils.lookupRemote30BusinessObject(EJBUtils.java:305)
 ... 5 more
 
The client code looks basically like this:
 
String jndiName = IBrandNameProduct.class.getName();
System.setProperty("org.omg.CORBA.ORBInitialHost", "localhost");
System.setProperty("org.omg.CORBA.ORBInitialPort", "3700");
System.setProperty("com.sun.appserv.iiop.endpoints", "localhost:3700");
System.setProperty("com.sun.CORBA.connection.ORBSocketFactory",
"com.sun.enterprise.iiop.IIOPSSLSocketFactory");
InitialContext ic = new InitialContext();
System.out.println ("Looking up " + jndiName);
IBrandNameProduct bnpr = (IBrandNameProduct)ic.lookup(jndiName);
 
Glassfish shows that the bean deployed. If I view the JNDI tree, I can
see the names there. For the record, my interface has @Remote, and the
implementing class has @Stateless on it. The confusing thing is that
this code used to work, but, obviously, something changed. I have no
clue what it might be.
 
Here's what my deployment archive looks like:
 
BrandNameProductSessionBean.ear
    lib/
        <bunch of supporting jars>
    META-INF/
        <ant-generated manifest>
    BrandNameProductSessionBean.jar <-- with interface and class
 
Does anybody have any idea what I'm missing? I'm completely stumped. :|
 
--
Jason Lee
Programmer/Analyst