[jboss-user] [EJB 3.0] - org.jboss.remoting.CannotConnectException: Can not get conne
romanchr
do-not-reply at jboss.com
Wed Aug 2 10:21:35 EDT 2006
Hi all,
I am experiencing a strange problem: I can not execute any business methods on my ejb 3.0 stateless session bean. Looking up the remote interface is no problem but any executed remote method leads to a CannotConnectException.
Here is my client side code:
public void testRemoteMethod()
{
Properties properties = new Properties();
properties.pu("java.naming.factory.initial","org.jnp.interfaces.NamingContextFactory");
properties.put("java.naming.factory.url.pkgs","=org.jboss.naming:org.jnp.interfaces");
properties.put("java.naming.provider.url","localhost:1299");
Context context;
try
{
context = new InitialContext(properties);
RemoteFacade beanRemote = (RemoteFacade)context.lookup("ejb/RemoteFacade");
beanRemote.callBusinessMethod();
}
catch (Exception e)
{
e.printStackTrace();
}
}
I get the following exception:
org.jboss.remoting.CannotConnectException: Can not get connection to server. Problem establishing socket connection.
at org.jboss.remoting.transport.socket.SocketClientInvoker.transport(SocketClientInvoker.java:230)
at org.jboss.remoting.RemoteClientInvoker.invoke(RemoteClientInvoker.java:112)
at org.jboss.remoting.Client.invoke(Client.java:226)
at org.jboss.remoting.Client.invoke(Client.java:189)
at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:55)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:61)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:55)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:65)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
at org.jboss.ejb3.stateless.StatelessRemoteProxy.invoke(StatelessRemoteProxy.java:102)
at $Proxy0.runTournament(Unknown Source)
at com.tas.unit.testcase.RemoteTester.testRemoteMethod(RemoteTester.java:49)
System: Windows XP 5.1 (SP2), JBoss 4.0.4 GA, with EJB 3.0 extension (out of the box installation with provided installer).
Any help appreciated!
Regards
Christoph
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3962477#3962477
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3962477
More information about the jboss-user
mailing list