9 Replies Latest reply on Mar 11, 2008 10:01 AM by kurtstam

    Help Deploying ESB in Jboss-4.2.2.GA with ports-01

    ldecaro

      Gday everyone!

      I have a fully functional esb that works fine when deployed in jboss as-4.2.2.GA.

      This ESB has one WS and one entity EJB.

      When i try to deploy it in another container configured with ports-01 i get errors (NamingException/connection refused). The errors don't come out during the deployment, but during runtime. I also changed the settings for the WS to work on the new port (juddi.properties).

      As far as i see the ws works ok with the new config on the juddi file. The problem seems to be related to jms and jboss esb.

      ------
      What should i do to deploy ESBs in brand new container configured with ports-01?
      ------

      The stack goes bellow. It seems something is still pointing to the old port (1099 and not 1199):

      2008-03-10 11:28:38,187 DEBUG [com.arjuna.ats.arjuna.logging.arjLogger] Periodic recovery - first pass <Seg, 10 Mar 2008 11:28:38>
      2008-03-10 11:28:38,187 DEBUG [com.arjuna.ats.arjuna.logging.arjLogger] StatusModule: first pass
      2008-03-10 11:28:38,187 DEBUG [com.arjuna.ats.txoj.logging.txojLoggerI18N] [com.arjuna.ats.internal.txoj.recovery.TORecoveryModule_3] - TORecoveryModule - first pass
      2008-03-10 11:28:38,187 DEBUG [com.arjuna.ats.jta.logging.loggerI18N] [com.arjuna.ats.internal.jta.recovery.info.firstpass] Local XARecoveryModule - first pass
      2008-03-10 11:28:42,843 INFO [org.jboss.internal.soa.esb.rosetta.pooling.JmsConnectionPool] Received NamingException, refreshing context.
      2008-03-10 11:28:44,031 DEBUG [org.jnp.interfaces.NamingContext] Failed to connect to localhost:1099
      javax.naming.CommunicationException: Failed to connect to server localhost:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server localhost:1099 [Root exception is java.net.ConnectException: Connection refused: connect]]
      at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:274)
      at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1533)
      at org.jnp.interfaces.NamingContext.list(NamingContext.java:868)
      at org.jnp.interfaces.NamingContext.list(NamingContext.java:861)
      at javax.naming.InitialContext.list(InitialContext.java:395)
      at org.jboss.soa.esb.helpers.NamingContext.getServerContext(NamingContext.java:66)
      at org.jboss.soa.esb.helpers.NamingContext.getFreshServerContext(NamingContext.java:97)
      at org.jboss.internal.soa.esb.rosetta.pooling.JmsConnectionPool.addAnotherSession(JmsConnectionPool.java:133)
      at org.jboss.internal.soa.esb.rosetta.pooling.JmsConnectionPool.getSession(JmsConnectionPool.java:201)
      at org.jboss.internal.soa.esb.rosetta.pooling.JmsConnectionPool.getQueueSession(JmsConnectionPool.java:229)
      at org.jboss.internal.soa.esb.rosetta.pooling.JmsConnectionPool.getQueueSession(JmsConnectionPool.java:224)
      at org.jboss.internal.soa.esb.couriers.JmsCourier.getJmsSession(JmsCourier.java:155)
      at org.jboss.internal.soa.esb.couriers.JmsCourier.createMessageConsumer(JmsCourier.java:486)
      at org.jboss.internal.soa.esb.couriers.JmsCourier.pickupPayload(JmsCourier.java:402)
      at org.jboss.internal.soa.esb.couriers.JmsCourier.pickup(JmsCourier.java:391)
      at org.jboss.internal.soa.esb.couriers.TwoWayCourierImpl.pickup(TwoWayCourierImpl.java:223)
      at org.jboss.internal.soa.esb.couriers.TwoWayCourierImpl.pickup(TwoWayCourierImpl.java:205)
      at org.jboss.soa.esb.listeners.message.MessageAwareListener.waitForEventAndProcess(MessageAwareListener.java:269)
      at org.jboss.soa.esb.listeners.message.MessageAwareListener.doRun(MessageAwareListener.java:253)
      at org.jboss.soa.esb.listeners.lifecycle.AbstractThreadedManagedLifecycle.run(AbstractThreadedManagedLifecycle.java:115)
      at java.lang.Thread.run(Thread.java:595)
      Caused by: javax.naming.ServiceUnavailableException: Failed to connect to server localhost:1099 [Root exception is java.net.ConnectException: Connection refused: connect]
      at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:248)
      ... 20 more
      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.SocksSocketImpl.connect(SocksSocketImpl.java:364)
      at java.net.Socket.connect(Socket.java:507)
      at java.net.Socket.connect(Socket.java:457)
      at java.net.Socket.(Socket.java:365)
      at java.net.Socket.(Socket.java:265)
      at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:84)
      at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:77)
      at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:244)
      ... 20 more

        • 1. Re: Help Deploying ESB in Jboss-4.2.2.GA with ports-01
          ldecaro

          Hi, it also prints out:

          11:30:58,690 INFO [ServiceInvoker] Unresponsive EPR: JMSEpr [ PortReference < <
          wsa:Address jms://localhost/queue/controle_conteudo_esb/>, <wsa:ReferencePropert
          ies jbossesb:java.naming.factory.initial : org.jnp.interfaces.NamingContextFacto
          ry/>, <wsa:ReferenceProperties jbossesb:java.naming.provider.url : localhost/>,
          <wsa:ReferenceProperties jbossesb:destination-type : queue/>, <wsa:ReferenceProp
          erties jbossesb:specification-version : 1.1/>, <wsa:ReferenceProperties jbossesb
          :connection-factory : ConnectionFactory/>, <wsa:ReferenceProperties jbossesb:per
          sistent : true/>, <wsa:ReferenceProperties jbossesb:acknowledge-mode : 1/>, <wsa
          :ReferenceProperties jbossesb:type : urn:jboss/esb/epr/type/jms/> > ] for messag
          e: header: [ To: JMSEpr [ PortReference < <wsa:Address jms://localhost/queue/con
          trole_conteudo_esb/>, <wsa:ReferenceProperties jbossesb:java.naming.factory.init
          ial : org.jnp.interfaces.NamingContextFactory/>, <wsa:ReferenceProperties jbosse
          sb:java.naming.provider.url : localhost/>, <wsa:ReferenceProperties jbossesb:des
          tination-type : queue/>, <wsa:ReferenceProperties jbossesb:specification-version
          : 1.1/>, <wsa:ReferenceProperties jbossesb:connection-factory : ConnectionFacto
          ry/>, <wsa:ReferenceProperties jbossesb:persistent : true/>, <wsa:ReferencePrope
          rties jbossesb:acknowledge-mode : 1/>, <wsa:ReferenceProperties jbossesb:type :
          urn:jboss/esb/epr/type/jms/> > ] ReplyTo: JMSEpr [ PortReference < <wsa:Address
          jms://127.0.0.1:1199/queue/controle_conteudo_esb_reply/>, <wsa:ReferenceProperti
          es jbossesb:java.naming.provider.url : localhost/>, <wsa:ReferenceProperties jbo
          ssesb:java.naming.factory.initial : org.jnp.interfaces.NamingContextFactory/>, <
          wsa:ReferenceProperties jbossesb:destination-type : queue/>, <wsa:ReferencePrope
          rties jbossesb:specification-version : 1.1/>, <wsa:ReferenceProperties jbossesb:
          connection-factory : ConnectionFactory/>, <wsa:ReferenceProperties jbossesb:mess
          age-selector : jbossESBresponseUUID='fbb5f85f-783a-4072-a024-2c7e2ffaa859'/>, <w
          sa:ReferenceProperties jbossesb:persistent : true/>, <wsa:ReferenceProperties jb
          ossesb:acknowledge-mode : 1/> > ] ]

          • 2. Re: Help Deploying ESB in Jboss-4.2.2.GA with ports-01
            ldecaro

            I also changed the registry config in jbossesb.sar to:

             <properties name="registry">
             <property name="org.jboss.soa.esb.registry.queryManagerURI" value="jnp://localhost:1199/InquiryService?org.apache.juddi.registry.rmi.Inquiry#inquire"/> <property name="org.jboss.soa.esb.registry.lifeCycleManagerURI" value="jnp://localhost:1199/PublishService?org.apache.juddi.registry.rmi.Publish#publish"/>
             <property name="org.jboss.soa.esb.registry.implementationClass" value="org.jboss.internal.soa.esb.services.registry.JAXRRegistryImpl"/>
             <property name="org.jboss.soa.esb.registry.factoryClass" value="org.apache.ws.scout.registry.ConnectionFactoryImpl"/>
             <property name="org.jboss.soa.esb.registry.user" value="jbossesb"/>
             <property name="org.jboss.soa.esb.registry.password" value="password"/>
             <!-- the following parameter is scout specific to set the type of communication between scout and the UDDI (embedded, rmi, soap) -->
             <property name="org.jboss.soa.esb.scout.proxy.transportClass" value="org.apache.ws.scout.transport.RMITransport"/>
             </properties>
            



            Cheers,


            :Luiz.

            • 3. Re: Help Deploying ESB in Jboss-4.2.2.GA with ports-01
              kurtstam

              Did you try cleaning out your registry? You may still have a bunch of old EPRs.

              --Kurt

              • 4. Re: Help Deploying ESB in Jboss-4.2.2.GA with ports-01
                ldecaro

                Hi Kurt, tnx for the reply.

                How am i supposed to do that? Cleaning the temp dir? That has already been done and nothing happened.

                :Luiz.

                • 5. Re: Help Deploying ESB in Jboss-4.2.2.GA with ports-01
                  kurtstam

                  By default is it using HSQLDB. In JBoss it keeps its db-files in server/default/data/hypersonic/. You can simply delete those, or hook up the uddibrowser (see the Registry Guide) and be more selective.

                  --Kurt

                  • 6. Re: Help Deploying ESB in Jboss-4.2.2.GA with ports-01
                    ldecaro

                    The problem still exists.

                    If i get a fresh copy of the default container but configuring it to use ports-01 it gives me some NamingException and the JMSEpr doesn't work.

                    Any ideas?

                    Cheers,


                    :Luiz.

                    • 7. Re: Help Deploying ESB in Jboss-4.2.2.GA with ports-01
                      kurtstam

                      Did you update port setting in the jndiUrl in the jms-provider section of the jboss-esb.xml?

                      • 8. Re: Help Deploying ESB in Jboss-4.2.2.GA with ports-01
                        ldecaro

                        Gosh you are great!!

                        I had to insert the jndi-url in the jms-provider config inside jboss-esb.xml:


                        <jms-provider name="JBossMQ"
                         connection-factory="ConnectionFactory"
                         jndi-context-factory="org.jnp.interfaces.NamingContextFactory"
                         jndi-URL="jnp://localhost:1199">
                         <jms-bus busid="controleConteudoEsbChannel">
                         <jms-message-filter dest-type="QUEUE"
                         dest-name="queue/controle_conteudo_esb" />
                         </jms-bus>
                        </jms-provider>
                        


                        Thank you very much. It made me understand a lot more about jboss-esb

                        • 9. Re: Help Deploying ESB in Jboss-4.2.2.GA with ports-01
                          kurtstam

                          Thanks :). Great to see that worked and thanks for closing the loop. --Kurt