0 Replies Latest reply on Aug 19, 2009 4:22 AM by jean pinaud

    EJB3 : "Can not connect http client invoker" with eclipse la

    jean pinaud Newbie

      Hello,

      I have a problem when I try to call an EJB deployed on JBoss server (4.2.3.GA) from a Main class.

      If I call my EJB from a webapp deployed on a JBoss server it works perfectly, but if I try to call the same ejb from a main launched by eclipse the look-up work fine (a sysout on the interface give this result : jboss.j2ee:ear=myEjb.ear,jar=ejb-private.jar,name=myEjbImpl,service=EJB3
      ).
      Nevertheless when I launch a method from the ejb I receive this error : org.jboss.remoting.CannotConnectException: Can not connect http client invoker. Connection refused: connect.

      I configured eclipse to use the jboss library in JBOSS_HOME/client when I execute my application.

      Thank for any help you can provide.

      Jean

      PS : the full stacktrace


      org.jboss.remoting.CannotConnectException: Can not connect http client invoker. Connection refused: connect.
       at org.jboss.remoting.transport.http.HTTPClientInvoker.useHttpURLConnection(HTTPClientInvoker.java:348)
       at org.jboss.remoting.transport.http.HTTPClientInvoker.transport(HTTPClientInvoker.java:137)
       at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:122)
       at org.jboss.remoting.Client.invoke(Client.java:1634)
       at org.jboss.remoting.Client.invoke(Client.java:548)
       at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:62)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:67)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:53)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:74)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.stateless.StatelessRemoteProxy.invoke(StatelessRemoteProxy.java:107)
       at $Proxy0.askForPayAuth(Unknown Source)
       at xxxxxx.TesteurMain.main(TesteurMain.java:29)
      Caused by: java.net.ConnectException: Connection refused: connect
       at java.net.PlainSocketImpl.socketConnect(Native Method)
       at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
       at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
       at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
       at java.net.Socket.connect(Socket.java:519)
       at sun.net.NetworkClient.doConnect(NetworkClient.java:152)
       at sun.net.www.http.HttpClient.openServer(HttpClient.java:382)
       at sun.net.www.http.HttpClient.openServer(HttpClient.java:509)
       at sun.net.www.http.HttpClient.<init>(HttpClient.java:231)
       at sun.net.www.http.HttpClient.New(HttpClient.java:304)
       at sun.net.www.http.HttpClient.New(HttpClient.java:316)
       at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:817)
       at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:769)
       at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:694)
       at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:861)
       at org.jboss.remoting.transport.http.HTTPClientInvoker.useHttpURLConnection(HTTPClientInvoker.java:277)
       at org.jboss.remoting.transport.http.HTTPClientInvoker.transport(HTTPClientInvoker.java:137)
       at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:122)
       at org.jboss.remoting.Client.invoke(Client.java:1634)
       at org.jboss.remoting.Client.invoke(Client.java:548)
       at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:62)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:67)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:53)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:74)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.stateless.StatelessRemoteProxy.invoke(StatelessRemoteProxy.java:107)
       at $Proxy0.askForPayAuth(Unknown Source)
       at xxxxx.factory.TesteurMain.main(TesteurMain.java:29)
       at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:74)
       ... 10 more