Shawn J wrote:
>
> The provide url should be like this:
>
> props.setProperty("java.naming.provider.url", "ejbd:"+hostName+":"+port);
>
> --
> Shawn
>
>
I thought that too, but in that case I receive:
24/Mai/2010 16:00:33 org.apache.openejb.client.StickyConnectionStrategy
connect
WARNING: Failover: Cannot connect to server(s): ejbd://ejbd:localhost:4201
Exception: Cannot connect to server: 'ejbd://ejbd:localhost:4201' due to an
unkown exception in the OpenEJB client: java.lang.IllegalArgumentException :
port out of range:-1. Trying next.
javax.naming.NamingException: Cannot lookup '/TaskBean/remote'. [Root
exception is java.rmi.RemoteException: Unable to connect; nested exception
is:
java.rmi.RemoteException: Cannot connect to any servers: Server #0:
ejbd://ejbd:localhost:4201]
at org.apache.openejb.client.JNDIContext.lookup(JNDIContext.java:224)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
It seems it automatically adds that "ejbd://" prefix. Changed to:
props.setProperty("java.naming.provider.url", "ejbd://"+hostName+":"+port);
Will give the same error as before:
java.lang.RuntimeException: Invalid response from server: -1
at org.apache.openejb.client.JNDIContext.lookup(JNDIContext.java:277)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
In the meantime, I found the following error on Geronimo console:
15:55:13,406 ERROR [remote] "null OEJ/0.0" FAIL "Unexpected error - For
input string: "/""
java.lang.NumberFormatException: For input string: "/"
at
java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
at java.lang.Integer.parseInt(Integer.java:449)
at java.lang.Integer.parseInt(Integer.java:499)
at
org.apache.openejb.client.ProtocolMetaData.init(ProtocolMetaData.java:56)
at
org.apache.openejb.client.ProtocolMetaData.readExternal(ProtocolMetaData.java:92)
at
org.apache.openejb.server.ejbd.EjbDaemon.service(EjbDaemon.java:103)
at
org.apache.openejb.server.ejbd.EjbDaemon.service(EjbDaemon.java:84)
at
org.apache.openejb.server.ejbd.EjbServer.service(EjbServer.java:60)
at org.apache.openejb.server.ServicePool$2.run(ServicePool.java:78)
at org.apache.openejb.server.ServicePool$3.run(ServicePool.java:101)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
It appears when receive the "Invalid response from server: -1" on client
side.
Is it required to have an openejb definition file (openejb-jar.xml) on the
EJB so geronimo makes it available to the client apps?
Any help appreciated.
Thanks
--
View this message in context:
http://apache-geronimo.328035.n3.nabble.com/EJB-in-Apache-Geronimo-Java-client-invokation-tp839481p839839.html
Sent from the Users mailing list archive at Nabble.com.