7 Replies Latest reply on Apr 30, 2008 5:50 PM by Kevin Conner

    JBossESB QA Test Fail (JmsGatewayListenerUnitTest)

    Zaiwen Gong Newbie

      Hi,

      My JBossESB QA Test fails at JmsGatewayListenerUnitTest.

      Details:
      1. I downloaded jboss-4.2.1.GA.zip, unzip it and start it to be used as my running JBoss AS.
      2. I downloaded jbossesb-4.2.1GA-src.zip, unzip and run "ant dist" under product to build the jbossesb.
      3. Run the "test" ant build target from the "qa" folder.

      Error received:

      [junit] 14:14:53,659 DEBUG [main][JmsGatewayListenerUnitTest] JmsGatewayListenerUnitTest.esb is not a valid URL, no protocol: JmsGatewayListenerUnitTest.esb

      [junit] Test failed to deliver files to build dir: D:\jbossesb-4.2.1GA-src\qa\build\TargetServiceAction-Service1-Received, D:\jbossesb-4.2.1GA-src\qa\build\TargetServiceAction-Service2-Received
      [junit] junit.framework.AssertionFailedError: Test failed to deliver files to build dir: D:\jbossesb-4.2.1GA-src\qa\build\TargetServiceAction-Service1-Received, D:\jbossesb-4.2.1GA-src\qa\build\TargetServiceAction-Service2-Received
      [junit] at org.jboss.soa.esb.jms.JmsGatewayListenerUnitTest.test(JmsGatewayListenerUnitTest.java:57)
      [junit] at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
      [junit] at junit.extensions.TestSetup$1.protect(TestSetup.java:23)
      [junit] at junit.extensions.TestSetup.run(TestSetup.java:27)

      Any clue? Thanks for any reply....

        • 1. Re: JBossESB QA Test Fail (JmsGatewayListenerUnitTest)
          Daniel Bevenius Master

          Hi,

          try running 'ant ci-test' from the qa directory. This will start an esb server and then run the qa tests.

          Regards,

          /Daniel

          • 2. Re: JBossESB QA Test Fail (JmsGatewayListenerUnitTest)
            Zaiwen Gong Newbie

            If I ran "ant ci-test" from qa, different error. Now it seems the ftp test fails, but the root cause is still listener:

            [java] [junit] 14:11:23,329 ERROR [main][FtpUnitTest] mbeanException
            [java] [junit] Incomplete Deployment listing:

            [java] [junit] --- MBeans waiting for other MBeans ---
            [java] [junit] ObjectName: jboss.esb:deployment=ftp-test.esb
            [java] [junit] State: FAILED
            [java] [junit] Reason: java.lang.RuntimeException: org.jboss.soa.esb.listeners.lifecycle.ManagedLifecycleException: Unexpected exception while instantiating managed instance
            [java] [junit] I Depend On:
            [java] [junit] jboss.esb:test=server
            [java] [junit] jboss.esb:deployment=jbossesb.esb
            [java] [junit] jboss.esb.qa.junit.destination:service=Queue,name=ftptest

            [java] [junit] --- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
            [java] [junit] ObjectName: jboss.esb:deployment=ftp-test.esb
            [java] [junit] State: FAILED
            [java] [junit] Reason: java.lang.RuntimeException: org.jboss.soa.esb.listeners.lifecycle.ManagedLifecycleException: Unexpected exception while instantiating managed instance
            [java] [junit] I Depend On:
            [java] [junit] jboss.esb:test=server
            [java] [junit] jboss.esb:deployment=jbossesb.esb
            [java] [junit] jboss.esb.qa.junit.destination:service=Queue,name=ftptest

            [java] [junit] Testcase: testFtp took 11.531 sec
            [java] [junit] FAILED
            [java] [junit] null expected:<scope1> but was:
            [java] [junit] junit.framework.ComparisonFailure: null expected:<scope1> but was:
            [java] [junit] at org.jboss.soa.esb.server.ftp.FtpUnitTest.test
            Ftp(FtpUnitTest.java:59)
            [java] [junit] at junit.extensions.TestDecorator.basicRun(TestD
            ecorator.java:24)
            [java] [junit] at junit.extensions.TestSetup$1.protect(TestSetu
            p.java:23)
            [java] [junit] at junit.extensions.TestSetup.run(TestSetup.java
            :27)

            [java] BUILD FAILED
            [java] D:\jbossesb-4.2.1GA-src\qa\build.xml:69: The following e
            rror occurred while executing this line:
            [java] D:\jbossesb-4.2.1GA-src\qa\junit\build.xml:216: Test org
            .jboss.soa.esb.server.ftp.FtpUnitTest failed


            Thank a lot!

            • 3. Re: JBossESB QA Test Fail (JmsGatewayListenerUnitTest)
              Daniel Bevenius Master

              Hi,

              Details:
              1. I downloaded jboss-4.2.1.GA.zip, unzip it and start it to be used as my running JBoss AS.
              2. I downloaded jbossesb-4.2.1GA-src.zip, unzip and run "ant dist" under product to build the jbossesb.
              3. Run the "test" ant build target from the "qa" folder.

              So, in step 1 you have started a JBossAS server. This should not be needed and might interfere with the qa test server (if they are using the same ports).

              I've tried these steps.
              1. Downloaded jbossesb-4.2.1GA-src.zip, unzip and run 'ant dist' in the product directory.
              2. Run 'ant ci-test' from the qa directory.

              Can you try that and make sure that you don't have any other JBoss servers running?

              Regards,

              Daniel

              • 4. Re: JBossESB QA Test Fail (JmsGatewayListenerUnitTest)
                Zaiwen Gong Newbie

                Thanks for your suggestion.

                I have tried as what you have suggested, but same error.
                I doubt it is due to the ftp server settiing in properties file.

                In \jbossesb-4.2.1GA-src\qa\quickstarts, there is a quickstarts.properties, in which it contains:

                # ftp properties
                org.jboss.esb.test.ftp.hostname=localhost:10021
                org.jboss.esb.test.ftp.user=esb
                org.jboss.esb.test.ftp.pwd=esb
                org.jboss.esb.test.ftp.dir=/

                I have FTP server on my localhost, but I am not sure if it is using porta 10021. Also since I can't create user 'esb/esb" on my system (password too short), so I update quickstarts.properties to use user/password "anonymous/anonymous".

                However, if I rerun the qa ci-test, still same error and it seems it is still trying to using esb/esb.

                [java] [junit] FTP URL=ftp://esb:esb@localhost:10021/%2FFtpUnitTestCase-1209563102735.dat

                Any clue as what else properties file I should update or how should I configure my system?

                Thanks a million!

                • 5. Re: JBossESB QA Test Fail (JmsGatewayListenerUnitTest)
                  Kevin Conner Master

                  The unit tests override the settings in the quickstart directory so that should not be the problem and, in any case, this is not a quickstart test.

                  The FTP server being used will be the one deployed into the ESB, you can verify this by looking at the log file.

                  What does the log file say about your FTP test failure? The section you included previously suggests that the test is not even deploying cleanly into the server.

                  • 6. Re: JBossESB QA Test Fail (JmsGatewayListenerUnitTest)
                    Zaiwen Gong Newbie

                    Thanks for the clarification. So the qa ci-test is a complete standalone test which does not require any input from me.

                    The qatest.log file says:

                    2008-04-30 09:45:01,454 DEBUG [main][org.jboss.soa.esb.server.ftp.FtpUnitTest] ==== setUp org.jboss.soa.esb.server.ftp.FtpUnitTest ====
                    2008-04-30 09:45:01,454 DEBUG [main][org.jboss.soa.esb.server.ftp.FtpUnitTest] JBossTestServices.setUp()
                    2008-04-30 09:45:01,501 DEBUG [main][org.jboss.soa.esb.server.ftp.FtpUnitTest] initialContext.getEnvironment()={jnp.parsedName=, java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.provider.url=localhost:1099, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces:com.sun.enterprise.naming}
                    2008-04-30 09:45:01,501 INFO [main][org.jboss.soa.esb.server.ftp.FtpUnitTest] jbosstest.beancount: ${jbosstest.beancount}
                    2008-04-30 09:45:01,501 INFO [main][org.jboss.soa.esb.server.ftp.FtpUnitTest] jbosstest.iterationcount: ${jbosstest.iterationcount}
                    2008-04-30 09:45:01,501 INFO [main][org.jboss.soa.esb.server.ftp.FtpUnitTest] jbosstest.threadcount: ${jbosstest.threadcount}
                    2008-04-30 09:45:01,501 INFO [main][org.jboss.soa.esb.server.ftp.FtpUnitTest] jbosstest.nodeploy: null
                    2008-04-30 09:45:01,501 INFO [main][org.jboss.soa.esb.server.ftp.FtpUnitTest] jbosstest.jndiurl: localhost:1099
                    2008-04-30 09:45:01,501 INFO [main][org.jboss.soa.esb.server.ftp.FtpUnitTest] jbosstest.jndifactory: org.jnp.interfaces.NamingContextFactory
                    2008-04-30 09:45:01,501 DEBUG [main][org.jboss.soa.esb.server.ftp.FtpUnitTest] ftp-test.esb is not a valid URL, no protocol: ftp-test.esb
                    2008-04-30 09:45:01,501 DEBUG [main][org.jboss.soa.esb.server.ftp.FtpUnitTest] Testing file: D:\jbossesb-4.2.1GA-src\qa\build\lib/ftp-test.esb
                    2008-04-30 09:45:01,501 DEBUG [main][org.jboss.soa.esb.server.ftp.FtpUnitTest] D:\jbossesb-4.2.1GA-src\qa\build\lib\ftp-test.esb is a valid file
                    2008-04-30 09:45:01,516 DEBUG [main][org.jboss.soa.esb.server.ftp.FtpUnitTest] Deploying ftp-test.esb, url=file:/D:/rosetta/ESB/jbossesb-4.2.1GA-src/qa/build/lib/ftp-test.esb
                    2008-04-30 09:45:01,938 DEBUG [main][org.jboss.soa.esb.server.ftp.FtpUnitTest] Invoking jboss.system:service=MainDeployer method=redeploy
                    2008-04-30 09:45:01,938 DEBUG [main][org.jboss.soa.esb.server.ftp.FtpUnitTest] args=[file:/D:/rosetta/ESB/jbossesb-4.2.1GA-src/qa/build/lib/ftp-test.esb]
                    2008-04-30 09:45:02,688 ERROR [main][org.jboss.soa.esb.server.ftp.FtpUnitTest] MbeanException
                    Incomplete Deployment listing:

                    --- MBeans waiting for other MBeans ---
                    ObjectName: jboss.esb:deployment=ftp-test.esb
                    State: FAILED
                    Reason: java.lang.RuntimeException: org.jboss.soa.esb.listeners.lifecycle.ManagedLifecycleException: Unexpected exception while instantiating managed instance
                    I Depend On:
                    jboss.esb:test=server
                    jboss.esb:deployment=jbossesb.esb
                    jboss.esb.qa.junit.destination:service=Queue,name=ftptest

                    --- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
                    ObjectName: jboss.esb:deployment=ftp-test.esb
                    State: FAILED
                    Reason: java.lang.RuntimeException: org.jboss.soa.esb.listeners.lifecycle.ManagedLifecycleException: Unexpected exception while instantiating managed instance
                    I Depend On:
                    jboss.esb:test=server
                    jboss.esb:deployment=jbossesb.esb
                    jboss.esb.qa.junit.destination:service=Queue,name=ftptest


                    at org.jboss.deployment.MainDeployer.checkIncompleteDeployments(MainDeployer.java:1385)
                    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:785)
                    at org.jboss.deployment.MainDeployer.redeploy(MainDeployer.java:566)
                    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                    at java.lang.reflect.Method.invoke(Method.java:585)
                    at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                    at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
                    at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                    at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
                    at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                    at java.lang.reflect.Method.invoke(Method.java:585)
                    at org.jboss.jmx.connector.invoker.InvokerAdaptorService.invoke(InvokerAdaptorService.java:266)
                    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                    at java.lang.reflect.Method.invoke(Method.java:585)
                    at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                    at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
                    at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                    at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
                    at org.jboss.jmx.connector.invoker.SerializableInterceptor.invoke(SerializableInterceptor.java:74)
                    at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                    at org.jboss.invocation.jrmp.server.JRMPProxyFactory.invoke(JRMPProxyFactory.java:179)
                    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                    at java.lang.reflect.Method.invoke(Method.java:585)
                    at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                    at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
                    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                    at org.jboss.invocation.jrmp.server.JRMPInvoker$MBeanServerAction.invoke(JRMPInvoker.java:818)
                    at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:419)
                    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                    at java.lang.reflect.Method.invoke(Method.java:585)
                    at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
                    at sun.rmi.transport.Transport$1.run(Transport.java:153)
                    at java.security.AccessController.doPrivileged(Native Method)
                    at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
                    at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
                    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
                    at java.lang.Thread.run(Thread.java:595)
                    2008-04-30 09:45:02,704 DEBUG [main][org.jboss.soa.esb.server.ftp.FtpUnitTest] ==== Starting testFtp ====
                    2008-04-30 09:45:13,156 DEBUG [main][org.jboss.soa.esb.server.ftp.FtpUnitTest] ftp-test.esb is not a valid URL, no protocol: ftp-test.esb
                    2008-04-30 09:45:13,156 DEBUG [main][org.jboss.soa.esb.server.ftp.FtpUnitTest] Testing file: D:\jbossesb-4.2.1GA-src\qa\build\lib/ftp-test.esb
                    2008-04-30 09:45:13,156 DEBUG [main][org.jboss.soa.esb.server.ftp.FtpUnitTest] D:\jbossesb-4.2.1GA-src\qa\build\lib\ftp-test.esb is a valid file
                    2008-04-30 09:45:13,156 DEBUG [main][org.jboss.soa.esb.server.ftp.FtpUnitTest] Undeploying ftp-test.esb, url=file:/D:/rosetta/ESB/jbossesb-4.2.1GA-src/qa/build/lib/ftp-test.esb
                    2008-04-30 09:45:13,156 DEBUG [main][org.jboss.soa.esb.server.ftp.FtpUnitTest] Invoking jboss.system:service=MainDeployer method=undeploy
                    2008-04-30 09:45:13,156 DEBUG [main][org.jboss.soa.esb.server.ftp.FtpUnitTest] args=[file:/D:/rosetta/ESB/jbossesb-4.2.1GA-src/qa/build/lib/ftp-test.esb]
                    2008-04-30 09:45:13,172 DEBUG [main][org.jboss.soa.esb.server.ftp.FtpUnitTest] undeployed package: ftp-test.esb
                    2008-04-30 09:45:13,172 DEBUG [main][org.jboss.soa.esb.server.ftp.FtpUnitTest] JBossTestServices.tearDown()

                    • 7. Re: JBossESB QA Test Fail (JmsGatewayListenerUnitTest)
                      Kevin Conner Master

                      The error is happening on construction of the listener but, unfortunately, the original cause is not being displayed in this output.

                      If you are competent with a debugger then you could try placing a breakpoint in the LifecycleUtil class and determine the cause of the InvocationTargetException. You can run the test in debug mode by using something similar to the following

                      ant -Dagent.jvmarg="-agentlib:jdwp=transport=dt_socket,address=8787,server=y,suspend=y" ci-test

                      You should then attach a debugger when the console says it is waiting for the server to start.