6 Replies Latest reply on Feb 25, 2010 3:40 AM by Andrew Redhead

    Test passes but an exception recorded in logs

    Andrew Redhead Newbie



      This is another newbie question...


      I've put together a very simple app which I'm using to get started with jsfunit (based on Seam 2.2.0.GA, RichFaces 3.3.2.SR1 and Facelets).


      I'm using the snapshot version of jsfunit which Stan posted on this forum a few days back and I've got RichFaces set up to use the Tidy filter.


      The test case is very simple - it basically uses a setup method to create a JSFSession based on "/app/hello.html" and then create a JSFClient. There is a single test method which just checks that the JSFClient is not null (the test page and test class are attached).


      The test case passes but there is an exception recorded in the log:


      2010-02-23 21:50:12,464 ERROR [com.gargoylesoftware.htmlunit.javascript.StrictErrorReporter] [JavaScript Job Thread 1] [] runtimeError: message=[Exception: java.lang.IllegalStateException: No active event context] sourceName=[http://localhost:8080/wk/nl/tracker/app/a4j/g/3_3_2.SR1/org/ajax4jsf/framework.pack.js] line=[5746] lineSource=[null] lineOffset=[0]
      2010-02-23 21:50:12,465 ERROR [com.gargoylesoftware.htmlunit.javascript.background.JavaScriptJobManagerImpl] [JavaScript Job Thread 1] [] Job run failed with unexpected RuntimeException: Exception: java.lang.IllegalStateException: No active event context (http://localhost:8080/wk/nl/tracker/app/a4j/g/3_3_2.SR1/org/ajax4jsf/framework.pack.js#5746)
      ======= EXCEPTION START ========
      Exception class=[net.sourceforge.htmlunit.corejs.javascript.EvaluatorException]
      com.gargoylesoftware.htmlunit.ScriptException: Exception: java.lang.IllegalStateException: No active event context (http://localhost:8080/wk/nl/tracker/app/a4j/g/3_3_2.SR1/org/ajax4jsf/framework.pack.js#5746)
              at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:527)


      The full log is attached.


      What are the implications of this error? Can I ignore it (after all, no exception was actually thrown by the setup method) or does this indicate that something needs to be addressed (and if so, where do I start! )


      Thanks, Andy