users@glassfish.java.net

Re: Remote Slsb Look up Failure

From: Hong Zhang <Hong.Zhang_at_Sun.COM>
Date: Mon, 08 May 2006 16:44:02 -0400

>> When did your application start to fail for you? And what was the
>> build it last worked?
>>
>> We have a similar ejb dev test (standalone client code is under its
>> client subdirectory: client/StandaloneClient.java) and you could take
>> a look.
>>
>>
>> http://fisheye5.cenqua.com/viewrep/glassfish/appserv-tests/devtests/ejb/ejb30/hello/session/
>>
>>
>> I just ran the test against the latest glassfish nightly build and
>> the test passed for me (ant build deploy run_standaloneclient).
>
> How i can download that java file you metioned ?
> basically is it possible to download stuff from fisheye ?

I think Fisheye is mainly for browsing. But you should be able to save
the files one by one as you view them.

Or you can check out the appserv-tests module (glassfish/appserv-tests)
from glassfish cvs repository. If you just want to look at the source
code for this particular test, you can check out this directory
(glassfish/appserv-tests/devtests/ejb/ejb30/hello/session). But if you
want to run the test, you also need some common build files which are
under the root level of glassfish/appserv-tests.

I can also send you a zip of this particular test directory if you want.
Let me know.

Thanks,

- Hong



>
>
>> Is it possible for you to provide your application for us to take a
>> look and reproduce the problem?
>>
>> Thanks,
>>
>> - Hong
>>
>>
>> Jason Lee wrote:
>>
>>> I hate to be a bother, but does anyone have any thoughts on this?
>>> I'm completely stumped. Thanks!
>>>
>>> --
>>> Jason Lee
>>> Programmer/Analyst
>>>
>>>
>>> ------------------------------------------------------------------------
>>>
>>> *From:* Jason Lee
>>> *Sent:* Monday, April 24, 2006 11:23 AM
>>> *To:* 'users_at_glassfish.dev.java.net'
>>> *Subject:* Remote Slsb Look up Failure
>>>
>>> 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(RemoteBusinessObjectFactory.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.java:20)
>>>
>>> Caused by: java.lang.NullPointerException
>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>> at
>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>>
>>> at
>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.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
>>>
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>