7 Replies Latest reply on Nov 23, 2012 6:04 PM by tcunning

    tomcat webservice and jboss esb problem

    vishal12345

      hi !

      i have a web service axis2 web service configured on tomcat 6.0.16 and i have plugged that in to ESB using action

      <action name="convertPOJO2Message" class="com.nativetung.soa.esb.actions.TMPojoToMessage" />
       <action name="soapui-client-action"
       class="org.jboss.soa.esb.actions.soap.SOAPClient">
       <!-- "http://127.0.0.1:8080/Quickstart_webservice_consumer1/HelloWorldWS?wsdl" -->
       <property name="wsdl" value="http://127.0.0.1:8084/axis2/services/LipikEngine1WS?wsdl" />
       <property name="responseAsOgnlMap" value="true" />
       <property name="SOAPAction" value="translate"/>
       </action>
      


      problem is when i deploy the esb on jboss and run it rest of the partworks fine except the Webservice invocation i get following error
      10:53:57,843 INFO [HttpMethodDirector] I/O exception (java.net.ConnectException) caught when processing request: Connection refused: connect
      10:53:57,843 INFO [HttpMethodDirector] Retrying request
      10:53:58,828 INFO [HttpMethodDirector] I/O exception (java.net.ConnectException) caught when processing request: Connection refused: connect
      10:53:58,828 INFO [HttpMethodDirector] Retrying request
      10:53:59,812 INFO [HttpMethodDirector] I/O exception (java.net.ConnectException) caught when processing request: Connection refused: connect
      10:53:59,812 INFO [HttpMethodDirector] Retrying request
      10:54:00,906 WARN [ActionProcessingPipeline] Unexpected exception caught while processing the action pipeline: header: [ To: JMSEpr [ PortReference < <wsa:Address jms://127.0.0.1:1099/queue/nt_tmanager/>, <wsa:ReferenceProperties jbossesb:java.naming.factory.initial : org.jnp.interfaces.NamingContextFactory/>, <wsa:ReferenceProperties jbossesb:java.naming.provider.url : jnp://127.0.0.1:1099/>, <wsa:ReferenceProperties jbossesb:java.naming.factory.url.pkgs : org.jboss.naming:org.jnp.interfaces/>, <wsa:ReferenceProperties jbossesb:destination-type : queue/>, <wsa:ReferenceProperties jbossesb:specification-version : 1.1/>, <wsa:ReferenceProperties jbossesb:connection-factory : ConnectionFactory/>, <wsa:ReferenceProperties jbossesb:persistent : true/>, <wsa:ReferenceProperties jbossesb:acknowledge-mode : AUTO_ACKNOWLEDGE/>, <wsa:ReferenceProperties jbossesb:transacted : false/>, <wsa:ReferenceProperties jbossesb:type : urn:jboss/esb/epr/type/jms/> > ] MessageID: 3ddcf116-5134-4a8c-a8ab-2454ca207bc7 RelatesTo: jms:correlationID#3ddcf116-5134-4a8c-a8ab-2454ca207bc7 ]
      org.jboss.soa.esb.actions.ActionProcessingException: Failed to invoke SOAP Endpoint: 'http://127.0.0.1:80/axis2/services/LipikEngine1WS.LipikEngine1WSHttpSoap11Endpoint ' - 'translate'.
       at org.jboss.soa.esb.actions.soap.SOAPClient.invokeEndpoint(SOAPClient.java:443)
       at org.jboss.soa.esb.actions.soap.SOAPClient.process(SOAPClient.java:395)
       at org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.process(ActionProcessingPipeline.java:316)
       at org.jboss.soa.esb.listeners.message.MessageAwareListener$TransactionalRunner.run(MessageAwareListener.java:530)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
       at java.lang.Thread.run(Unknown Source)
      Caused by: java.net.ConnectException: Connection refused: connect
       at java.net.TwoStacksPlainSocketImpl.socketConnect(Native Method)
       at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
       at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
       at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
       at java.net.PlainSocketImpl.connect(Unknown Source)
       at java.net.SocksSocketImpl.connect(Unknown Source)
       at java.net.Socket.connect(Unknown Source)
       at java.net.Socket.connect(Unknown Source)
       at java.net.Socket.<init>(Unknown Source)
       at java.net.Socket.<init>(Unknown Source)
       at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(Unknown Source)
       at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(Unknown Source)
       at org.apache.commons.httpclient.HttpConnection.open(Unknown Source)
       at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.open(Unknown Source)
       at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(Unknown Source)
       at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(Unknown Source)
       at org.apache.commons.httpclient.HttpClient.executeMethod(Unknown Source)
       at org.apache.commons.httpclient.HttpClient.executeMethod(Unknown Source)
       at org.jboss.soa.esb.actions.soap.SOAPClient.invokeEndpoint(SOAPClient.java:435)
       ... 6 more
      


      what can be reason ?

      i have run this code once successfully but later i tried making a very simple change and which i deleted back but i continued getting this error

      please help needed !

        • 1. Re: tomcat webservice and jboss esb problem
          vishal12345

          here is some more portion of output

          5,296 INFO [WsdlImporter] Finding importer for {http://webservices.nativetung.com}LipikEngine1WSHttpBinding
          10:56:55,296 INFO [WsdlImporter] Missing importer for {http://webservices.nativetung.com}LipikEngine1WSHttpBinding
          10:56:55,296 INFO [WsdlImporter] Finding importer for {http://webservices.nativetung.com}LipikEngine1WSHttpBinding
          10:56:55,296 INFO [WsdlImporter] Missing importer for {http://webservices.nativetung.com}LipikEngine1WSHttpBinding
          10:56:55,312 INFO [STDOUT] Progress: 1 - Caching definition from url [http://127.0.0.1:8084/axis2/services/LipikEngine1WS?wsdl]
          10:56:55,328 WARN [ActionProcessingPipeline] No reply to address defined for reply message! To: JMSEpr [ PortReference < <wsa:Address jms://127.0.0.1:1099/queue/nt_esb/>, <wsa:ReferenceProperties jbossesb:java.naming.factory.initial : org.jnp.interfaces.NamingContextFactory/>, <wsa:ReferenceProperties jbossesb:java.naming.provider.url : jnp://127.0.0.1:1099/>, <wsa:ReferenceProperties jbossesb:java.naming.factory.url.pkgs : org.jboss.naming:org.jnp.interfaces/>, <wsa:ReferenceProperties jbossesb:destination-type : queue/>, <wsa:ReferenceProperties jbossesb:specification-version : 1.1/>, <wsa:ReferenceProperties jbossesb:connection-factory : ConnectionFactory/>, <wsa:ReferenceProperties jbossesb:persistent : true/>, <wsa:ReferenceProperties jbossesb:acknowledge-mode : AUTO_ACKNOWLEDGE/>, <wsa:ReferenceProperties jbossesb:transacted : false/>, <wsa:ReferenceProperties jbossesb:type : urn:jboss/esb/epr/type/jms/> > ] MessageID: be9f7c82-c967-425c-bef0-545b9edca047 RelatesTo: jms:correlationID#be9f7c82-c967-425c-bef0-545b9edca047
          10:56:55,359 INFO [STDOUT] TManager
          10:56:55,515 WARN [HttpMethodBase] Going to buffer response body of large or unknown size. Using getResponseBodyAsStream instead is recommended.
          10:56:55,515 INFO [STDOUT] Progress: 1 - Loading definition from cache
          10:56:55,531 INFO [STDOUT] Retrieving document at 'http://127.0.0.1:8084/axis2/services/LipikEngine1WS?wsdl'.
          10:56:55,531 INFO [SchemaUtils] Loading schema types from [http://127.0.0.1:8084/axis2/services/LipikEngine1WS?wsdl]
          10:56:55,531 INFO [SchemaUtils] Getting schema http://127.0.0.1:8084/axis2/services/LipikEngine1WS?wsdl
          10:56:55,546 INFO [SchemaUtils] schema for [http://webservices.nativetung.com] contained [{}] namespaces
          10:56:56,562 INFO [HttpMethodDirector] I/O exception (java.net.ConnectException) caught when processing request: Connection refused: connect
          10:56:56,562 INFO [HttpMethodDirector] Retrying request
          10:56:57,656 INFO [HttpMethodDirector] I/O exception (java.net.ConnectException) caught when processing request: Connection refused: connect
          10:56:57,656 INFO [HttpMethodDirector] Retrying request
          10:56:58,765 INFO [HttpMethodDirector] I/O exception (java.net.ConnectException) caught when processing request: Connection refused: connect
          10:56:58,765 INFO [HttpMethodDirector] Retrying request
          10:56:59,859 WARN [ActionProcessingPipeline] Unexpected exception caught while processing the action pipeline: header: [ To: JMSEpr [ PortReference < <wsa:Address jms://127.0.0.1:1099/queue/nt_tmanager/>, <wsa:ReferenceProperties jbossesb:java.naming.factory.initial : org.jnp.interfaces.NamingContextFactory/>, <wsa:ReferenceProperties jbossesb:java.naming.provider.url : jnp://127.0.0.1:1099/>, <wsa:ReferenceProperties jbossesb:java.naming.factory.url.pkgs : org.jboss.naming:org.jnp.interfaces/>, <wsa:ReferenceProperties jbossesb:destination-type : queue/>, <wsa:ReferenceProperties jbossesb:specification-version : 1.1/>, <wsa:ReferenceProperties jbossesb:connection-factory : ConnectionFactory/>, <wsa:ReferenceProperties jbossesb:persistent : true/>, <wsa:ReferenceProperties jbossesb:acknowledge-mode : AUTO_ACKNOWLEDGE/>, <wsa:ReferenceProperties jbossesb:transacted : false/>, <wsa:ReferenceProperties jbossesb:type : urn:jboss/esb/epr/type/jms/> > ] MessageID: 802f3309-574c-47f1-b410-58e5d13399dc RelatesTo: jms:correlationID#802f3309-574c-47f1-b410-58e5d13399dc ]
          org.jboss.soa.esb.actions.ActionProcessingException: Failed to invoke SOAP Endpoint: 'http://127.0.0.1:80/axis2/services/LipikEngine1WS.LipikEngine1WSHttpSoap11Endpoint ' - 'translate'.
           at org.jboss.soa.esb.actions.soap.SOAPClient.invokeEndpoint(SOAPClient.java:443)
           at org.jboss.soa.esb.actions.soap.SOAPClient.process(SOAPClient.java:395)
           at org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.process(ActionProcessingPipeline.java:316)
           at org.jboss.soa.esb.listeners.message.MessageAwareListener$TransactionalRunner.run(MessageAwareListener.java:530)
           at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
           at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
           at java.lang.Thread.run(Unknown Source)
          Caused by: java.net.ConnectException: Connection refused: connect
           at java.net.TwoStacksPlainSocketImpl.socketConnect(Native Method)
           at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
           at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
           at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
           at java.net.PlainSocketImpl.connect(Unknown Source)
           at java.net.SocksSocketImpl.connect(Unknown Source)
           at java.net.Socket.connect(Unknown Source)
           at java.net.Socket.connect(Unknown Source)
           at java.net.Socket.<init>(Unknown Source)
           at java.net.Socket.<init>(Unknown Source)
           at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(Unknown Source)
           at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(Unknown Source)
           at org.apache.commons.httpclient.HttpConnection.open(Unknown Source)
           at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.open(Unknown Source)
           at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(Unknown Source)
           at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(Unknown Source)
           at org.apache.commons.httpclient.HttpClient.executeMethod(Unknown Source)
           at org.apache.commons.httpclient.HttpClient.executeMethod(Unknown Source)
           at org.jboss.soa.esb.actions.soap.SOAPClient.invokeEndpoint(SOAPClient.java:435)
           ... 6 more
          


          • 2. Re: tomcat webservice and jboss esb problem
            vishal12345

            Also this web service works fine if invoked from browser and from a java client too

            • 3. Re: tomcat webservice and jboss esb problem
              kconner

               

              "vishal12345" wrote:
              10:56:56,562 INFO [HttpMethodDirector] I/O exception (java.net.ConnectException) caught when processing request: Connection refused: connect
              10:56:56,562 INFO [HttpMethodDirector] Retrying request
              10:56:57,656 INFO [HttpMethodDirector] I/O exception (java.net.ConnectException) caught when processing request: Connection refused: connect
              10:56:57,656 INFO [HttpMethodDirector] Retrying request
              10:56:58,765 INFO [HttpMethodDirector] I/O exception (java.net.ConnectException) caught when processing request: Connection refused: connect
              10:56:58,765 INFO [HttpMethodDirector] Retrying request
              

              The above, followed by this
              "vishal12345" wrote:
              Caused by: java.net.ConnectException: Connection refused: connect
               at java.net.TwoStacksPlainSocketImpl.socketConnect(Native Method)
               at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
               at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown
              


              Would suggest that there is nothing listening on the port we are trying to access. Could you enable DEBUG logging on org.apache.commons.httpclient.HttpConnection and see what address we are trying to connec to?.

              Thanks


              • 4. Re: tomcat webservice and jboss esb problem
                fred86

                Hi, I have the same problem. I would like to know how you solved it. thanks

                • 5. Re: tomcat webservice and jboss esb problem
                  tcunning

                  My guess is that he found out he was running it on a different port or a different IP address than he originally thought.     If you are having the same problem, trying Kevin's advice of configuring DEBUG logging on HttpConnection would be a good start.

                  • 6. Re: tomcat webservice and jboss esb problem
                    fred86

                    to me the following message in console. ip is correct  -----------------

                    - I can not get the data from the wsdl method. tranks

                     

                     

                    10:25:50,370 INFO  [STDOUT] Retrieving document at 'http://192.168.208.124:8080/lefo-ear-lefo-negocio/IntegracionFacadeBean?wsdl'.

                    10:25:50,387 INFO  [SchemaUtils] Loading schema types from [http://192.168.208.124:8080/lefo-ear-lefo-negocio/IntegracionFacadeBean?wsdl]

                    10:25:50,387 INFO  [SchemaUtils] Getting schema http://192.168.208.124:8080/lefo-ear-lefo-negocio/IntegracionFacadeBean?wsdl

                    10:25:50,396 INFO  [SchemaUtils] schema for [http://facade.integracion.lefo.pcm.gob.pe/] contained [{}] namespaces

                    10:25:50,638 INFO  [WsdlImporter] Finding importer for {http://facade.integracion.lefo.pcm.gob.pe/}IntegracionFacadeBeanBinding

                    10:25:50,641 INFO  [WsdlImporter] Importing binding {http://facade.integracion.lefo.pcm.gob.pe/}IntegracionFacadeBeanBinding

                    10:25:50,720 INFO  [Soap11HttpBindingImporter] importing endpoint http://pcmn314:8080/lefo-ear-lefo-negocio/IntegracionFacadeBean

                    10:25:50,812 INFO  [Soap11HttpBindingImporter] importing operation getEntidad

                    10:25:50,830 INFO  [Soap11HttpBindingImporter] importing operation getEntidadDatosAdicionales

                    10:25:50,831 INFO  [Soap11HttpBindingImporter] importing operation pingService

                    10:25:50,882 INFO  [SchemaUtils] Getting schema http://192.168.208.124:8080/lefo-ear-lefo-negocio/IntegracionFacadeBean?wsdl

                    10:25:51,006 WARN  [HttpMethodBase] Going to buffer response body of large or unknown size. Using getResponseBodyAsStream instead is recommended.

                    10:26:12,227 INFO  [HttpMethodDirector] I/O exception (java.net.ConnectException) caught when processing request: Connection timed out: connect

                    10:26:12,227 INFO  [HttpMethodDirector] Retrying request

                    10:26:33,225 INFO  [HttpMethodDirector] I/O exception (java.net.ConnectException) caught when processing request: Connection timed out: connect

                    10:26:33,225 INFO  [HttpMethodDirector] Retrying request

                    • 7. Re: tomcat webservice and jboss esb problem
                      tcunning

                      Are you doing a load test, or using a lot of connections possibly?    Maybe the tomcat server is out of connections? 

                       

                      Just guesses.      Can you create a reproducible test case?