You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by Balaji Bondili <bb...@health.nyc.gov> on 2011/03/09 19:06:06 UTC

ejb client code issue

Hi,

 

I am trying to access an EJB which is deployed in Glassfish app server
and below is the my client code and error .  I also included
"openejb-client-3.1.4.jar" in my classpath.

 

My EJB client code:

 

     Properties props = new Properties();

 
props.put(Context.INITIAL_CONTEXT_FACTORY,"org.apache.openejb.client.Rem
oteInitialContextFactory");

        props.put(Context.PROVIDER_URL,"ejbd://10.135.71.134:3700");    

 

        Context ctx = new InitialContext(props);

        

        Object ref = ctx.lookup("abc.abccore.ABCInterfaceProxyRemote");
//error occurred here

        ABCInterfaceProxyRemote abcInterface =
(MciInterfaceProxyRemote)PortableRemoteObject.narrow(ref,MciInterfacePro
xyRemote.class);

 

Error Description:

 

javax.naming.NamingException: Cannot lookup
'/abc.abccore.ABCInterfaceProxyRemote '. [Root exception is
java.rmi.RemoteException: Error while communicating with server: ;
nested exception is: 

      java.lang.NumberFormatException: For input string: "_"]

      at
org.apache.openejb.client.JNDIContext.lookup(JNDIContext.java:224)

      at javax.naming.InitialContext.lookup(Unknown Source)

 

 

Thanks in advance,

Balaji Bondili

**********************************************************************
The New York City Department of Health & Mental Hygiene is now offering information important for the health of all New Yorkers.  To sign up for these new and valuable updates, log-on to our website at http://www.nyc.gov/health/email and select the NYC DOHMH updates you'd like to receive.
IMPORTANT NOTICE:  This email is meant only for the use of the intended recipient.  It may contain confidential information that is legally privileged or otherwise protected by law.  If you have received this communication in error, please notify me immediately by replying to this message and please delete it from your computer.  Thank you for your cooperation.

Re: ejb client code issue

Posted by David Blevins <da...@gmail.com>.
On Mar 9, 2011, at 10:06 AM, Balaji Bondili wrote:

> I am trying to access an EJB which is deployed in Glassfish app server
> and below is the my client code and error .  I also included
> "openejb-client-3.1.4.jar" in my classpath.

The openejb-client jar only works with the OpenEJB app server.

If the goal is to communicate between and OpenEJB app server and a Glassfish app server, web services might be a good option.


-David