7 Replies Latest reply on Jan 28, 2010 6:47 AM by Andrew Redhead

    Run test 3 times to make it pass (a struggling beginner)

    Andrew Redhead Newbie
      Hi,
        • 1. Re: Run test 3 times to make it pass (a struggling beginner)
          Andrew Redhead Newbie

          It seems that somthing chopped most of my first attempt at posting

           

          I'll have another go...

           

          I've got an application which uses Seam (2.2.0 GA) and RichFaces (3.3.2.SR1) running in JBoss 4.3.0 GA that I'd like to test using JSFUnit.

           

          The majority of the Seam components are EJB3 stateful session beans.

           

          This is my first try at using JSFUnit and I've run into some problems...

           

          If I re-run the test case 3 times in a row (just clicking the browser refresh button) then I get a "tests passed" result from cactus, however the first two tests will fail:

           

          I've added the cactus result page and the console logging output from each test run below.

           

          I've got the app packaged so that the jsfunit tests will run (I've used Cactus with JUnit before, so this step is familiar to me).

           


          The test case is very simple:

           


          public class TestCaseOrderDetails extends ServletTestCase {

           

              /** */
              private JSFClientSession _client;

           

              /** */
              private JSFServerSession _server;

           

              /** */
              RichFacesClient _richClient;

           


              /**
               * Create the test suite.
               *
               * @return the test suite
               */
              public static Test suite() {
                 return new TestSuite(TestCaseOrderDetails.class);
              }

           

              /**
               * Set up first page.
               *
               * @throws IOException sometimes
               */
              public void setUp() throws IOException {
                 // Initial JSF request
                 JSFSession jsfSession = new JSFSession("/app/checkout/order-details.seam?locale=uk&quote-id=1268");
                 _client = jsfSession.getJSFClientSession();
                 _server = jsfSession.getJSFServerSession();
                 _richClient = new RichFacesClient(_client);
              }

           

              /**
               * Actually run a test.
               * @throws IOException
               */
              public void testHelloWorld() throws IOException {

           

                  assertTrue(true);

           

              }

           

          }

          • 2. Re: Run test 3 times to make it pass (a struggling beginner)
            Andrew Redhead Newbie
            The test results and log output are shown below.


            Test run 1)

            Cactus page

            testHelloWorld    Error    illegally formed XML syntax (http://localhost:8080/web/a4j/g/3_3_2.SR1/org/ajax4jsf/framework.pack.js.xhtml#34)

            =======
            EXCEPTION
            START
            ======== Exception
            class=[net.sourceforge.htmlunit.corejs.javascript.EvaluatorException] com.gargoylesoftware.htmlunit.ScriptException:
            illegally
            formed
            XML
            syntax
            (http://localhost:8080/web/a4j/g/3_3_2.SR1/org/ajax4jsf/framework.pack.js.xhtml#34) at
            com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:534) at

            In the appserver console I have what looks like two seperate issues.


            Logging output for Error A:

            2010-01-26 10:24:26,316 DEBUG [org.jboss.seam.jsf.SeamPhaseListener] [http-127.0.0.1-8080-3] [372BA0C6D312A5A8B6B16C3FE23E9B0D] beginning transaction prior to phase: RESTORE_VIEW 1
            2010-01-26 10:24:26,332 ERROR [org.jboss.seam.exception.Exceptions] [http-127.0.0.1-8080-3] [372BA0C6D312A5A8B6B16C3FE23E9B0D] handled and logged exception
            java.lang.IllegalStateException: Could not start transaction
                    at org.jboss.seam.jsf.SeamPhaseListener.begin(SeamPhaseListener.java:598)
                    at org.jboss.seam.jsf.SeamPhaseListener.begin(SeamPhaseListener.java:583)
                    at org.jboss.seam.jsf.SeamPhaseListener.handleTransactionsBeforePhase(SeamPhaseListener.java:327)
                    at org.jboss.seam.jsf.SeamPhaseListener.beforeServletPhase(SeamPhaseListener.java:144)
                    at org.jboss.seam.jsf.SeamPhaseListener.beforePhase(SeamPhaseListener.java:118)
                    at org.ajax4jsf.resource.ResourceLifecycle.invokePhaseListener(ResourceLifecycle.java:200)
                    at org.ajax4jsf.resource.ResourceLifecycle.processPhaseListeners(ResourceLifecycle.java:176)
                    at org.ajax4jsf.resource.ResourceLifecycle.send(ResourceLifecycle.java:117)
                    at org.ajax4jsf.resource.InternetResourceService.load(InternetResourceService.java:335)
                    at org.ajax4jsf.cache.LRUMapCache.load(LRUMapCache.java:116)
                    at org.ajax4jsf.cache.LRUMapCache.get(LRUMapCache.java:87)
                    at org.ajax4jsf.resource.InternetResourceService.serviceResource(InternetResourceService.java:195)
                    at org.ajax4jsf.resource.InternetResourceService.serviceResource(InternetResourceService.java:141)
                    at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:508)
                    at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56)
                    at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                    at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:60)
                    at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                    at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
                    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                    at com.electrocomponents.web.filter.UserFilter.doFilter(UserFilter.java:168)
                    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                    at com.electrocomponents.web.filter.SiteControlFilter.doFilter(SiteControlFilter.java:284)
                    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                    at com.electrocomponents.web.filter.ExceptionFilter.doFilter(ExceptionFilter.java:75)
                    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                    at com.electrocomponents.web.filter.SiteMonitorFilter.doFilter(SiteMonitorFilter.java:110)
                    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
                    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
                    at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
                    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
                    at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
                    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
                    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
                    at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
                    at com.electrocomponents.web.tomcat.BadInputValve.invoke(BadInputValve.java:272)
                    at com.electrocomponents.web.tomcat.UTF8EncoderValve.invoke(UTF8EncoderValve.java:59)
                    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
                    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
                    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
                    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
                    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
                    at java.lang.Thread.run(Thread.java:595)
            Caused by: javax.ejb.NoSuchEJBException: Could not find stateful bean: a74b12-idjz6u-g4wjfzbk-1-g4wjijxb-30
                    at org.jboss.ejb3.cache.simple.SimpleStatefulCache.get(SimpleStatefulCache.java:390)
                    at org.jboss.ejb3.cache.simple.SimpleStatefulCache.get(SimpleStatefulCache.java:375)
                    at org.jboss.ejb3.stateful.StatefulInstanceInterceptor.invoke(StatefulInstanceInterceptor.java:61)
                    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                    at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
                    at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:106)
                    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                    at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46)
                    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                    at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
                    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                    at org.jboss.ejb3.stateful.StatefulContainer.localInvoke(StatefulContainer.java:204)
                    at org.jboss.ejb3.stateful.StatefulLocalProxy.invoke(StatefulLocalProxy.java:117)
                    at $Proxy723.afterTransactionBegin(Unknown Source)
                    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.seam.util.Reflections.invoke(Reflections.java:22)
                    at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:32)
                    at org.jboss.seam.intercept.ClientSideInterceptor$1.proceed(ClientSideInterceptor.java:76)
                    at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
                    at org.jboss.seam.intercept.ClientSideInterceptor.invoke(ClientSideInterceptor.java:54)
                    at org.javassist.tmp.java.lang.Object_$$_javassist_seam_1.afterTransactionBegin(Object_$$_javassist_seam_1.java)
                    at org.jboss.seam.transaction.UTTransaction.begin(UTTransaction.java:40)
                    at org.jboss.seam.jsf.SeamPhaseListener.begin(SeamPhaseListener.java:593)
                    ... 48 more
            2010-01-26 10:24:26,394 INFO  [com.electrocomponents.web.filter.SiteMonitorFilter] [http-127.0.0.1-8080-3] [372BA0C6D312A5A8B6B16C3FE23E9B0D] REQOUT - Total Execution Time (ms): 109, Thread ID: 149, Requested URL: /web/a4j/g/3_3_2.SR1/org/ajax4jsf/framework.pack.js.xhtml?
            2010-01-26 10:24:26,488 ERROR [org.jboss.web.tomcat.service.jca.CachedConnectionValve] [http-127.0.0.1-8080-3] [] Application error: Faces Servlet did not complete its transaction


            Log for Error B:

            2010-01-26 10:24:26,488 DEBUG [org.jboss.seam.core.Manager] [http-127.0.0.1-8080-2] [372BA0C6D312A5A8B6B16C3FE23E9B0D] No stored conversation
            2010-01-26 10:24:26,488 WARN  [com.gargoylesoftware.htmlunit.html.HtmlPage] [http-127.0.0.1-8080-2] [372BA0C6D312A5A8B6B16C3FE23E9B0D] Expected content type of 'application/javascript' or 'application/ecmascript' for remotely loaded JavaScript element at 'http://localhost:8080/web/a4j/g/3_3_2.SR1/org/ajax4jsf/framework.pack.js.xhtml', but got 'text/html'.
            ] lineOffset=[8]:26,550 ERROR [com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine] [http-127.0.0.1-8080-2] [372BA0C6D312A5A8B6B16C3FE23E9B0D] error: message=[illegally formed XML syntax] sourceName=[http://localhost:8080/web/a4j/g/3_3_2.SR1/org/ajax4jsf/framework.pack.js.xhtml] line=[34] lineSource=[</html>

            • 3. Re: Run test 3 times to make it pass (a struggling beginner)
              Andrew Redhead Newbie

              Cactus

              page:

               


              testHelloWorld    Error    illegally formed XML syntax (http://localhost:8080/web/a4j/g/3_3_2.SR1/org/richfaces/ui.pack.js.xhtml#34)

              =======
              EXCEPTION
              START
              ======== Exception
              class=[net.sourceforge.htmlunit.corejs.javascript.EvaluatorException] com.gargoylesoftware.htmlunit.ScriptException:
              illegally
              formed
              XML
              syntax
              (http://localhost:8080/web/a4j/g/3_3_2.SR1/org/richfaces/ui.pack.js.xhtml#34) at
              com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:534) at

               

              Log for Error C:

               

              2010-01-26 10:32:14,170 DEBUG [org.jboss.seam.jsf.SeamPhaseListener] [http-127.0.0.1-8080-2] [CF061DE774FD117D1067A862AC5A536A] beginning transaction prior to phase: RESTORE_VIEW 1
              2010-01-26 10:32:14,170 ERROR [org.jboss.seam.exception.Exceptions] [http-127.0.0.1-8080-2] [CF061DE774FD117D1067A862AC5A536A] handled and logged exception
              java.lang.IllegalStateException: Could not start transaction
                      at org.jboss.seam.jsf.SeamPhaseListener.begin(SeamPhaseListener.java:598)
                      at org.jboss.seam.jsf.SeamPhaseListener.begin(SeamPhaseListener.java:583)
                      at org.jboss.seam.jsf.SeamPhaseListener.handleTransactionsBeforePhase(SeamPhaseListener.java:327)
                      at org.jboss.seam.jsf.SeamPhaseListener.beforeServletPhase(SeamPhaseListener.java:144)
                      at org.jboss.seam.jsf.SeamPhaseListener.beforePhase(SeamPhaseListener.java:118)
                      at org.ajax4jsf.resource.ResourceLifecycle.invokePhaseListener(ResourceLifecycle.java:200)
                      at org.ajax4jsf.resource.ResourceLifecycle.processPhaseListeners(ResourceLifecycle.java:176)
                      at org.ajax4jsf.resource.ResourceLifecycle.send(ResourceLifecycle.java:117)
                      at org.ajax4jsf.resource.InternetResourceService.load(InternetResourceService.java:335)
                      at org.ajax4jsf.cache.LRUMapCache.load(LRUMapCache.java:116)
                      at org.ajax4jsf.cache.LRUMapCache.get(LRUMapCache.java:87)
                      at org.ajax4jsf.resource.InternetResourceService.serviceResource(InternetResourceService.java:195)
                      at org.ajax4jsf.resource.InternetResourceService.serviceResource(InternetResourceService.java:141)
                      at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:508)
                      at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56)
                      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                      at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:60)
                      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                      at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
                      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                      at com.electrocomponents.web.filter.UserFilter.doFilter(UserFilter.java:168)
                      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                      at com.electrocomponents.web.filter.SiteControlFilter.doFilter(SiteControlFilter.java:284)
                      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                      at com.electrocomponents.web.filter.ExceptionFilter.doFilter(ExceptionFilter.java:75)
                      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                      at com.electrocomponents.web.filter.SiteMonitorFilter.doFilter(SiteMonitorFilter.java:110)
                      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
                      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
                      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
                      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
                      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
                      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
                      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
                      at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
                      at com.electrocomponents.web.tomcat.BadInputValve.invoke(BadInputValve.java:272)
                      at com.electrocomponents.web.tomcat.UTF8EncoderValve.invoke(UTF8EncoderValve.java:59)
                      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
                      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
                      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
                      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
                      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
                      at java.lang.Thread.run(Thread.java:595)
              Caused by: javax.ejb.NoSuchEJBException: Could not find stateful bean: a74b12-idjz6u-g4wjfzbk-1-g4wjstu0-38
                      at org.jboss.ejb3.cache.simple.SimpleStatefulCache.get(SimpleStatefulCache.java:390)
                      at org.jboss.ejb3.cache.simple.SimpleStatefulCache.get(SimpleStatefulCache.java:375)
                      at org.jboss.ejb3.stateful.StatefulInstanceInterceptor.invoke(StatefulInstanceInterceptor.java:61)
                      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                      at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
                      at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:106)
                      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                      at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46)
                      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                      at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
                      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                      at org.jboss.ejb3.stateful.StatefulContainer.localInvoke(StatefulContainer.java:204)
                      at org.jboss.ejb3.stateful.StatefulLocalProxy.invoke(StatefulLocalProxy.java:117)
                      at $Proxy723.afterTransactionBegin(Unknown Source)
                      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.seam.util.Reflections.invoke(Reflections.java:22)
                      at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:32)
                      at org.jboss.seam.intercept.ClientSideInterceptor$1.proceed(ClientSideInterceptor.java:76)
                      at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
                      at org.jboss.seam.intercept.ClientSideInterceptor.invoke(ClientSideInterceptor.java:54)
                      at org.javassist.tmp.java.lang.Object_$$_javassist_seam_1.afterTransactionBegin(Object_$$_javassist_seam_1.java)
                      at org.jboss.seam.transaction.UTTransaction.begin(UTTransaction.java:40)
                      at org.jboss.seam.jsf.SeamPhaseListener.begin(SeamPhaseListener.java:593)
                      ... 48 more

                     
                     
              Log for Error D:

               

              2010-01-26 10:32:14,248 WARN  [com.gargoylesoftware.htmlunit.html.HtmlPage] [http-127.0.0.1-8080-4] [CF061DE774FD117D1067A862AC5A536A] Expected content type of 'application/javascript' or 'application/ecmascript' for remotely loaded JavaScript element at 'http://localhost:8080/web/a4j/g/3_3_2.SR1/org/richfaces/ui.pack.js.xhtml', but got 'text/html'.
              ] lineOffset=[8]:14,248 ERROR [com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine] [http-127.0.0.1-8080-4] [CF061DE774FD117D1067A862AC5A536A] error: message=[illegally formed XML syntax] sourceName=[http://localhost:8080/web/a4j/g/3_3_2.SR1/org/richfaces/ui.pack.js.xhtml] line=[34] lineSource=[</html>

               


              Test run 3)

               

              Cactus page:

               

              testHelloWorld    Success

              • 4. Re: Run test 3 times to make it pass (a struggling beginner)
                Andrew Redhead Newbie
                I suspect I have two problems:

                1) something to do with trying to read non xml web resources (javascript and css files etc) as xml

                2) jsfunit failing to find Seam EJB components


                I'd appreciate any pointers on what I'm doing wrong or suggestions on how to start figuring out whats going on.

                Thanks,

                Andy
                • 5. Re: Run test 3 times to make it pass (a struggling beginner)
                  Stan Silvert Master

                  Right now we're having trouble with RichFaces 3.3.2.SR1 incompatibility with the latest Neko.  Can you try this with HtmlUnit 2.5 and Neko 1.9.9?

                   

                  Stan

                  • 6. Re: Run test 3 times to make it pass (a struggling beginner)
                    Andrew Redhead Newbie

                    Hi,

                     

                    Thanks for getting back to me, I should be able to try the library versions you suggest, I'm currently using just the complete bundles.

                     

                    I've been pulled into a production system issue so it will be a day or so before I have any results.

                     

                    I just had a quick go at replacing the Neko filter with the Tidy filter - it didn't make any difference.

                     

                    Cheers,

                     

                    Andy

                    • 7. Re: Run test 3 times to make it pass (a struggling beginner)
                      Andrew Redhead Newbie

                      Hi,

                       

                      using nekohttp 1.9.6 gave this error:

                       

                      testHelloWorld    Error    org/cyberneko/html/HTMLTagBalancingListener

                      java.lang.NoClassDefFoundError:
                      org/cyberneko/html/HTMLTagBalancingListener at
                      java.lang.ClassLoader.defineClass1(Native
                      Method) at
                      java.lang.ClassLoader.defineClass(ClassLoader.java:620) at
                      java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124) at
                      java.net.URLClassLoader.defineClass(URLClassLoader.java:260) at
                      java.net.URLClassLoader.access$100(URLClassLoader.java:56) at
                      java.net.URLClassLoader$1.run(URLClassLoader.java:195) at
                      java.security.AccessController.doPrivileged(Native
                      Method) at
                      java.net.URLClassLoader.findClass(URLClassLoader.java:188) at
                      org.jboss.mx.loading.RepositoryClassLoader.findClassLocally(RepositoryClassLoader.java:679) at
                      org.jboss.mx.loading.RepositoryClassLoader.findClass(RepositoryClassLoader.java:659) at
                      java.lang.ClassLoader.loadClass(ClassLoader.java:306) at
                      org.jboss.mx.loading.RepositoryClassLoader.loadClassLocally(RepositoryClassLoader.java:193) at
                      org.jboss.mx.loading.ClassLoadingTask$ThreadTask.run(ClassLoadingTask.java:131) at
                      org.jboss.mx.loading.LoadMgr3.nextTask(LoadMgr3.java:399) at
                      org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:520) at
                      org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:408) at
                      java.lang.ClassLoader.loadClass(ClassLoader.java:251) at
                      java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) at
                      com.gargoylesoftware.htmlunit.html.HTMLParser.parse(HTMLParser.java:270) at
                      com.gargoylesoftware.htmlunit.DefaultPageCreator.createHtmlPage(DefaultPageCreator.java:127) at
                      com.gargoylesoftware.htmlunit.DefaultPageCreator.createPage(DefaultPageCreator.java:101) at
                      com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:442) at
                      com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:329) at
                      com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:386) at
                      com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:371) at
                      org.jboss.jsfunit.framework.SimpleInitialRequestStrategy.doInitialRequest(SimpleInitialRequestStrategy.java:48) at
                      org.jboss.jsfunit.framework.WebClientSpec.doInitialRequest(WebClientSpec.java:259) at
                      org.jboss.jsfunit.jsfsession.JSFSession.<init>(JSFSession.java:81) at
                      org.jboss.jsfunit.jsfsession.JSFSession.<init>(JSFSession.java:58) at
                      com.electrocomponents.web.ordermanagement.jsfunit.TestCaseOrderDetails.setUp(TestCaseOrderDetails.java:65) at

                       

                       

                      Which is reasonable as I cant find the class HTMLTagBalancingListener in the nekohttp 1.9.6 jar

                       

                      I've just had another go, this time with nekohttp 1.9.13 (which includes the HMTLTagBalacingListener class), this results in the old failure of:

                       

                      testHelloWorldErrorillegally formed XML syntax (http://localhost:8080/web/a4j/g/3_3_2.SR1/org/ajax4jsf/framework.pack.js.xhtml#34)=======
                      EXCEPTION
                      START
                      ======== Exception
                      class=[net.sourceforge.htmlunit.corejs.javascript.EvaluatorException] com.gargoylesoftware.htmlunit.ScriptException:
                      illegally
                      formed
                      XML
                      syntax
                      (http://localhost:8080/web/a4j/g/3_3_2.SR1/org/ajax4jsf/framework.pack.js.xhtml#34)      at
                      com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:534)      at
                      net.sourceforge.htmlunit.corejs.javascript.Context.call(Context.java:515)      at
                      net.sourceforge.htmlunit.corejs.javascript.ContextFactory.call(ContextFactory.java:507)      at
                      com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.compile(JavaScriptEngine.java:389)      at
                      com.gargoylesoftware.htmlunit.html.HtmlPage.loadJavaScriptFromUrl(HtmlPage.java:1143)      at
                      com.gargoylesoftware.htmlunit.html.HtmlPage.loadExternalJavaScriptFile(HtmlPage.java:1034)      at
                      com.gargoylesoftware.htmlunit.html.HtmlScript.executeScriptIfNeeded(HtmlScript.java:359)      at
                      com.gargoylesoftware.htmlunit.html.HtmlScript$1.execute(HtmlScript.java:213)      at
                      com.gargoylesoftware.htmlunit.html.HtmlScript.onAllChildrenAddedToPage(HtmlScript.java:239)      at
                      com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.endElement(HTMLParser.java:595)      at
                      org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown
                      Source)      at

                       

                      Cheers,

                       

                      Andy