11 Replies Latest reply on Jan 2, 2014 9:33 AM by mauroa85

    Help with Labs from Sumbit2013

    magick93

      Hi

       

      I'm working my way through the labs, and have having a few problems.

       

      Lab1

      After completing all steps in the Lab, I then run the MortgageClient.java and get the following:

       

      09:31:01,498 INFO  [org.switchyard.component.test.mixins.http.HTTPMixIn] Received response header:[Server=Apache-Coyote/1.1]

      09:31:01,498 INFO  [org.switchyard.component.test.mixins.http.HTTPMixIn] Received response header:[Content-Type=text/html;charset=utf-8]

      09:31:01,498 INFO  [org.switchyard.component.test.mixins.http.HTTPMixIn] Received response header:[Content-Length=1102]

      09:31:01,498 INFO  [org.switchyard.component.test.mixins.http.HTTPMixIn] Received response header:[Date=Sun, 29 Sep 2013 07:31:01 GMT]

      09:31:01,499 INFO  [org.switchyard.component.test.mixins.http.HTTPMixIn] Received response body:[HTTP/1.1 404 Not Found [Server: Apache-Coyote/1.1, Content-Type: text/html;charset=utf-8, Content-Length: 1102, Date: Sun, 29 Sep 2013 07:31:01 GMT]]

       

      Lab2

      And then when I run QualifyServiceClient in Lab2 I get the following (all unit tests pass):

      Exception in thread "main" java.lang.RuntimeException: javax.jms.JMSException: Failed to create session factory

        at org.switchyard.component.test.mixins.hornetq.HornetQMixIn.createJMSSession(HornetQMixIn.java:356)

        at mortgages.QualifyServiceClient.main(QualifyServiceClient.java:28)

      Caused by: javax.jms.JMSException: Failed to create session factory

        at org.hornetq.jms.client.HornetQConnectionFactory.createConnectionInternal(HornetQConnectionFactory.java:587)

        at org.hornetq.jms.client.HornetQConnectionFactory.createConnection(HornetQConnectionFactory.java:107)

        at org.switchyard.component.test.mixins.hornetq.HornetQMixIn.createJMSSession(HornetQMixIn.java:350)

        ... 1 more

      Caused by: HornetQException[errorType=NOT_CONNECTED message=HQ119026: Cannot connect to server(s). Tried with all available servers.]

        at org.hornetq.core.client.impl.ServerLocatorImpl.createSessionFactory(ServerLocatorImpl.java:850)

        at org.hornetq.jms.client.HornetQConnectionFactory.createConnectionInternal(HornetQConnectionFactory.java:583)

        ... 3 more

       

      I've double-checked that I added the user to Jboss.

       

       

      Thanks

        • 1. Re: Help with Labs from Sumbit2013
          kcbabo

          Have you started and deployed the applications to a SwitchYard runtime?  Is the target runtime on localhost or another server?  The issue with lab1 looks like the application is not deployed.  The issue with lab2 looks like the server is not up.

          • 2. Re: Help with Labs from Sumbit2013
            jmalpica

            Hi everyone,

             

            I'm getting the same error when executing the lab1.  But what I've noticed when deploying the lab1.jar in the server is that I got the following error:

             

            12:52:38,378 INFO  [org.jboss.weld.deployer] (MSC service thread 1-5) JBAS016002: Procesamiento de implementación de soldadura lab1.jar

            12:52:38,406 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-5) MSC000001: Failed to start service jboss.deployment.unit."lab1.jar".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."lab1.jar".POST_MODULE: JBAS018733: Error al procesar la fase POST_MODULE de deployment "lab1.jar"

              at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:127) [jboss-as-server-7.2.1.Final-redhat-10.jar:7.2.1.Final-redhat-10]

              at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]

              at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]

              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_15]

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_15]

              at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_15]

            Caused by: java.lang.NoSuchFieldError: PORTABLE_EXTENSIONS

              at org.switchyard.as7.extension.deployment.SwitchYardCdiIntegrationProcessor.checkExtension(SwitchYardCdiIntegrationProcessor.java:69)

              at org.switchyard.as7.extension.deployment.SwitchYardCdiIntegrationProcessor.deploy(SwitchYardCdiIntegrationProcessor.java:58)

              at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:120) [jboss-as-server-7.2.1.Final-redhat-10.jar:7.2.1.Final-redhat-10]

              ... 5 more

             

             

            I would really appreciate if you could provide some help.

             

            Thanks in advance.

             

            Juan.-

            • 3. Re: Help with Labs from Sumbit2013
              kcbabo

              Juan - which version of EAP are you using?

              • 4. Re: Help with Labs from Sumbit2013
                jmalpica

                Hi Keith,

                 

                I'm using JBoss EAP 6.1.1 (from Red Hat).

                 

                Thank you.

                • 5. Re: Help with Labs from Sumbit2013
                  kcbabo

                  EAP 6.1.0 is required for SwitchYard 1.0.0.Final.  I have logged an issue for this against SY 1.1:

                  https://issues.jboss.org/browse/SWITCHYARD-1743

                  • 6. Re: Help with Labs from Sumbit2013
                    jmalpica

                    Thank you Keith.

                     

                    Installing EAP 6.1.0, I could deploy lab1.jar successfully.

                     

                    Best regards,

                     

                    Juan.-

                    • 7. Re: Help with Labs from Sumbit2013
                      mauroa85

                      Hi have a problem in lab 2 Step 5 all JUnit Tests are OK, but When i Follow deploy and run apllication i get the following errors:

                      The output  errors

                      Exception in thread "main" java.lang.RuntimeException: javax.jms.JMSException: Failed to create session factory

                        at org.switchyard.component.test.mixins.hornetq.HornetQMixIn.createJMSSession(HornetQMixIn.java:356)

                        at mortgages.QualifyServiceClient.main(QualifyServiceClient.java:28)

                      Caused by: javax.jms.JMSException: Failed to create session factory

                        at org.hornetq.jms.client.HornetQConnectionFactory.createConnectionInternal(HornetQConnectionFactory.java:587)

                        at org.hornetq.jms.client.HornetQConnectionFactory.createConnection(HornetQConnectionFactory.java:107)

                        at org.switchyard.component.test.mixins.hornetq.HornetQMixIn.createJMSSession(HornetQMixIn.java:350)

                        ... 1 more

                      Caused by: HornetQException[errorType=NOT_CONNECTED message=HQ119026: Cannot connect to server(s). Tried with all available servers.]

                        at org.hornetq.core.client.impl.ServerLocatorImpl.createSessionFactory(ServerLocatorImpl.java:850)

                        at org.hornetq.jms.client.HornetQConnectionFactory.createConnectionInternal(HornetQConnectionFactory.java:583)

                        ... 3 more

                       

                      Server error

                      Caused by: org.switchyard.SwitchYardException: org.apache.camel.FailedToCreateRouteException: Failed to create route V1CamelJmsBindingModel/QualificationService@_QualificationService_jms_1#1762044779: Route[[From[jms:queue:QualifyRequest?connectionFactory=%23Co... because of Failed to resolve endpoint: jms://queue:QualifyRequest?connectionFactory=%23ConnectionFactory&replyTo=QualifyResponse due to: No bean could be found in the registry for: ConnectionFactory of type: javax.jms.ConnectionFactory

                        at org.switchyard.component.camel.common.handler.InboundHandler.<init>(InboundHandler.java:69)

                        at org.switchyard.component.camel.common.deploy.BaseBindingActivator.createInboundHandler(BaseBindingActivator.java:51)

                        at org.switchyard.component.camel.common.deploy.BaseBindingActivator.activateBinding(BaseBindingActivator.java:43)

                        at org.switchyard.deploy.internal.Deployment.deployServiceBindings(Deployment.java:618)

                        at org.switchyard.deploy.internal.Deployment.start(Deployment.java:145)

                        at org.switchyard.as7.extension.deployment.SwitchYardDeployment.start(SwitchYardDeployment.java:101)

                        at org.switchyard.as7.extension.services.SwitchYardService.start(SwitchYardService.java:73)

                        ... 5 more

                      • 8. Re: Help with Labs from Sumbit2013
                        kcbabo

                        Did you start the server using the standalone-full.xml configuration?  The standalone.xml config does not have messaging enabled.

                        • 9. Re: Help with Labs from Sumbit2013
                          mauroa85

                          Thanks you are right about the cfg xml file now i have  another problem

                           

                          this appens whem i run QualifyServiceClient class as a java aplication.

                          ERROR [org.hornetq.core.server] (Old I/O server worker (parentId: -472847470, [id: 0xe3d0eb92, /127.0.0.1:5445])) HQ224018: Failed to create session: HornetQException[errorType=SECURITY_EXCEPTION message=HQ119031: Unable to validate user: guest]

                           

                          now i just need to configure  something else just need to know where.

                          • 10. Re: Help with Labs from Sumbit2013
                            kcbabo

                            Did you follow the setup steps in lab 1?

                            learning/summit2013/guides/sy-gs-lab1.pdf at master · jboss-switchyard/learning · GitHub

                             

                            Pg. 36 instructs you to add an application user to your runtime.  From the error message you posted, it appears as though that user is missing.

                            • 11. Re: Help with Labs from Sumbit2013
                              mauroa85

                              thank you that was the step i missed/skiped. its working perfectly now

                               

                              i think isnt menstioned in Lab2pdf  that the server must be configurerd with standalone-full.xml .  that info shoub be updated added

                              Thanks one again.