2 Replies Latest reply on Mar 17, 2009 7:31 AM by Igor K

    Syntax error exception

    Igor K Newbie

      Hello,
      I'm using Tomcat 5.5, JSF 1.2_07, Richfaces 3.3.0 GA and JSFUnit 1.0.0 GA.
      I am getting the below exception while trying to run tests
      (occurs when creating JSFSession) .

      syntax error (http://localhost:8080/bella_crm/faces/a4j/g/3_3_0.GAorg/richfaces/renderkit/html/scripts/skinning.js#72)
      
      ======= EXCEPTION START ========
      Exception class=[org.mozilla.javascript.EvaluatorException]
      com.gargoylesoftware.htmlunit.ScriptException: syntax error (http://localhost:8080/bella_crm/faces/a4j/g/3_3_0.GAorg/richfaces/renderkit/html/scripts/skinning.js#72)
      at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:513)
      at org.mozilla.javascript.Context.call(Context.java:515)
      at org.mozilla.javascript.ContextFactory.call(ContextFactory.java:507)
      at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.compile(JavaScriptEngine.java:369)
      at com.gargoylesoftware.htmlunit.html.HtmlPage.loadJavaScriptFromUrl(HtmlPage.java:1112)
      at com.gargoylesoftware.htmlunit.html.HtmlPage.loadExternalJavaScriptFile(HtmlPage.java:1002)
      at com.gargoylesoftware.htmlunit.html.HtmlScript.executeScriptIfNeeded(HtmlScript.java:358)
      at com.gargoylesoftware.htmlunit.html.HtmlScript$1.execute(HtmlScript.java:212)
      at com.gargoylesoftware.htmlunit.html.HtmlScript.onAllChildrenAddedToPage(HtmlScript.java:238)
      at com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.endElement(HTMLParser.java:569)
      at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
      at com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.endElement(HTMLParser.java:523)
      at org.cyberneko.html.filters.DefaultFilter.endElement(DefaultFilter.java:210)
      at org.cyberneko.html.filters.NamespaceBinder.endElement(NamespaceBinder.java:329)
      at org.cyberneko.html.HTMLTagBalancer.callEndElement(HTMLTagBalancer.java:993)
      at org.cyberneko.html.HTMLTagBalancer.endElement(HTMLTagBalancer.java:896)
      at org.cyberneko.html.HTMLScanner$ContentScanner.scanEndElement(HTMLScanner.java:2893)
      at org.cyberneko.html.HTMLScanner$ContentScanner.scan(HTMLScanner.java:1954)
      at org.cyberneko.html.HTMLScanner.scanDocument(HTMLScanner.java:893)
      at org.cyberneko.html.HTMLConfiguration.parse(HTMLConfiguration.java:495)
      at org.cyberneko.html.HTMLConfiguration.parse(HTMLConfiguration.java:448)
      at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
      at com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.parse(HTMLParser.java:771)
      at com.gargoylesoftware.htmlunit.html.HTMLParser.parse(HTMLParser.java:252)
      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:439)
      at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:327)
      at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:384)
      at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:369)
      at org.jboss.jsfunit.framework.SimpleInitialRequestStrategy.doInitialRequest(SimpleInitialRequestStrategy.java:48)
      at org.jboss.jsfunit.framework.WebClientSpec.doInitialRequest(WebClientSpec.java:244)
      at org.jboss.jsfunit.jsfsession.JSFSession.<init>(JSFSession.java:80)
      at org.jboss.jsfunit.jsfsession.JSFSession.<init>(JSFSession.java:57)
      at com.bella.portal.common.LoginTest.login(LoginTest.java:28)
      at com.bella.portal.common.LoginTest.testLogin(LoginTest.java:42)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at org.apache.cactus.internal.AbstractCactusTestCase.runBareServer(AbstractCactusTestCase.java:153)
      at org.apache.cactus.internal.server.AbstractWebTestCaller.doTest(AbstractWebTestCaller.java:119)
      at org.apache.cactus.internal.server.AbstractWebTestController.handleRequest_aroundBody0(AbstractWebTestController.java:93)
      at org.apache.cactus.internal.server.AbstractWebTestController.handleRequest_aroundBody1$advice(AbstractWebTestController.java:224)
      at org.apache.cactus.internal.server.AbstractWebTestController.handleRequest(AbstractWebTestController.java)
      at org.apache.cactus.server.ServletTestRedirector.doPost_aroundBody2(ServletTestRedirector.java:101)
      at org.apache.cactus.server.ServletTestRedirector.doPost_aroundBody3$advice(ServletTestRedirector.java:217)
      at org.apache.cactus.server.ServletTestRedirector.doPost(ServletTestRedirector.java)
      at org.jboss.jsfunit.framework.JSFUnitServletRedirector.doPost(JSFUnitServletRedirector.java:46)
      at org.apache.cactus.server.ServletTestRedirector.doGet_aroundBody0(ServletTestRedirector.java:72)
      at org.apache.cactus.server.ServletTestRedirector.doGet_aroundBody1$advice(ServletTestRedirector.java:217)
      at org.apache.cactus.server.ServletTestRedirector.doGet(ServletTestRedirector.java)
      at org.jboss.jsfunit.framework.JSFUnitServletRedirector.doGet(JSFUnitServletRedirector.java:52)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
      at org.jboss.jsfunit.framework.JSFUnitFilter.doFilter(JSFUnitFilter.java:116)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)
      at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
      at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
      at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
      at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
      at java.lang.Thread.run(Thread.java:619)
      Caused by: org.mozilla.javascript.EvaluatorException: syntax error (http://localhost:8080/bella_crm/faces/a4j/g/3_3_0.GAorg/richfaces/renderkit/html/scripts/skinning.js#72)
      at com.gargoylesoftware.htmlunit.javascript.StrictErrorReporter.error(StrictErrorReporter.java:75)
      at org.mozilla.javascript.Parser.addError(Parser.java:146)
      at org.mozilla.javascript.Parser.reportError(Parser.java:160)
      at org.mozilla.javascript.Parser.primaryExpr(Parser.java:2469)
      at org.mozilla.javascript.Parser.memberExpr(Parser.java:1955)
      at org.mozilla.javascript.Parser.unaryExpr(Parser.java:1813)
      at org.mozilla.javascript.Parser.mulExpr(Parser.java:1742)
      at org.mozilla.javascript.Parser.addExpr(Parser.java:1723)
      at org.mozilla.javascript.Parser.shiftExpr(Parser.java:1703)
      at org.mozilla.javascript.Parser.relExpr(Parser.java:1677)
      at org.mozilla.javascript.Parser.eqExpr(Parser.java:1633)
      at org.mozilla.javascript.Parser.bitAndExpr(Parser.java:1622)
      at org.mozilla.javascript.Parser.bitXorExpr(Parser.java:1611)
      at org.mozilla.javascript.Parser.bitOrExpr(Parser.java:1600)
      at org.mozilla.javascript.Parser.andExpr(Parser.java:1588)
      at org.mozilla.javascript.Parser.orExpr(Parser.java:1576)
      at org.mozilla.javascript.Parser.condExpr(Parser.java:1559)
      at org.mozilla.javascript.Parser.assignExpr(Parser.java:1544)
      at org.mozilla.javascript.Parser.expr(Parser.java:1523)
      at org.mozilla.javascript.Parser.xmlInitializer(Parser.java:1854)
      at org.mozilla.javascript.Parser.unaryExpr(Parser.java:1807)
      at org.mozilla.javascript.Parser.mulExpr(Parser.java:1742)
      at org.mozilla.javascript.Parser.addExpr(Parser.java:1723)
      at org.mozilla.javascript.Parser.shiftExpr(Parser.java:1703)
      at org.mozilla.javascript.Parser.relExpr(Parser.java:1677)
      at org.mozilla.javascript.Parser.eqExpr(Parser.java:1633)
      at org.mozilla.javascript.Parser.bitAndExpr(Parser.java:1622)
      at org.mozilla.javascript.Parser.bitXorExpr(Parser.java:1611)
      at org.mozilla.javascript.Parser.bitOrExpr(Parser.java:1600)
      at org.mozilla.javascript.Parser.andExpr(Parser.java:1588)
      at org.mozilla.javascript.Parser.orExpr(Parser.java:1576)
      at org.mozilla.javascript.Parser.condExpr(Parser.java:1559)
      at org.mozilla.javascript.Parser.assignExpr(Parser.java:1544)
      at org.mozilla.javascript.Parser.expr(Parser.java:1523)
      at org.mozilla.javascript.Parser.statementHelper(Parser.java:1246)
      at org.mozilla.javascript.Parser.statement(Parser.java:707)
      at org.mozilla.javascript.Parser.parse(Parser.java:401)
      at org.mozilla.javascript.Parser.parse(Parser.java:338)
      at org.mozilla.javascript.Context.compileImpl(Context.java:2368)
      at org.mozilla.javascript.Context.compileString(Context.java:1359)
      at org.mozilla.javascript.Context.compileString(Context.java:1348)
      at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$4.doRun(JavaScriptEngine.java:360)
      at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:507)
      ... 73 more
      Enclosed exception:
      org.mozilla.javascript.EvaluatorException: syntax error (http://localhost:8080/bella_crm/faces/a4j/g/3_3_0.GAorg/richfaces/renderkit/html/scripts/skinning.js#72)
      at com.gargoylesoftware.htmlunit.javascript.StrictErrorReporter.error(StrictErrorReporter.java:75)
      at org.mozilla.javascript.Parser.addError(Parser.java:146)
      at org.mozilla.javascript.Parser.reportError(Parser.java:160)
      at org.mozilla.javascript.Parser.primaryExpr(Parser.java:2469)
      at org.mozilla.javascript.Parser.memberExpr(Parser.java:1955)
      at org.mozilla.javascript.Parser.unaryExpr(Parser.java:1813)
      at org.mozilla.javascript.Parser.mulExpr(Parser.java:1742)
      at org.mozilla.javascript.Parser.addExpr(Parser.java:1723)
      at org.mozilla.javascript.Parser.shiftExpr(Parser.java:1703)
      at org.mozilla.javascript.Parser.relExpr(Parser.java:1677)
      at org.mozilla.javascript.Parser.eqExpr(Parser.java:1633)
      at org.mozilla.javascript.Parser.bitAndExpr(Parser.java:1622)
      at org.mozilla.javascript.Parser.bitXorExpr(Parser.java:1611)
      at org.mozilla.javascript.Parser.bitOrExpr(Parser.java:1600)
      at org.mozilla.javascript.Parser.andExpr(Parser.java:1588)
      at org.mozilla.javascript.Parser.orExpr(Parser.java:1576)
      at org.mozilla.javascript.Parser.condExpr(Parser.java:1559)
      at org.mozilla.javascript.Parser.assignExpr(Parser.java:1544)
      at org.mozilla.javascript.Parser.expr(Parser.java:1523)
      at org.mozilla.javascript.Parser.xmlInitializer(Parser.java:1854)
      at org.mozilla.javascript.Parser.unaryExpr(Parser.java:1807)
      at org.mozilla.javascript.Parser.mulExpr(Parser.java:1742)
      at org.mozilla.javascript.Parser.addExpr(Parser.java:1723)
      at org.mozilla.javascript.Parser.shiftExpr(Parser.java:1703)
      at org.mozilla.javascript.Parser.relExpr(Parser.java:1677)
      at org.mozilla.javascript.Parser.eqExpr(Parser.java:1633)
      at org.mozilla.javascript.Parser.bitAndExpr(Parser.java:1622)
      at org.mozilla.javascript.Parser.bitXorExpr(Parser.java:1611)
      at org.mozilla.javascript.Parser.bitOrExpr(Parser.java:1600)
      at org.mozilla.javascript.Parser.andExpr(Parser.java:1588)
      at org.mozilla.javascript.Parser.orExpr(Parser.java:1576)
      at org.mozilla.javascript.Parser.condExpr(Parser.java:1559)
      at org.mozilla.javascript.Parser.assignExpr(Parser.java:1544)
      at org.mozilla.javascript.Parser.expr(Parser.java:1523)
      at org.mozilla.javascript.Parser.statementHelper(Parser.java:1246)
      at org.mozilla.javascript.Parser.statement(Parser.java:707)
      at org.mozilla.javascript.Parser.parse(Parser.java:401)
      at org.mozilla.javascript.Parser.parse(Parser.java:338)
      at org.mozilla.javascript.Context.compileImpl(Context.java:2368)
      at org.mozilla.javascript.Context.compileString(Context.java:1359)
      at org.mozilla.javascript.Context.compileString(Context.java:1348)
      at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$4.doRun(JavaScriptEngine.java:360)
      at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:507)
      at org.mozilla.javascript.Context.call(Context.java:515)
      at org.mozilla.javascript.ContextFactory.call(ContextFactory.java:507)
      at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.compile(JavaScriptEngine.java:369)
      at com.gargoylesoftware.htmlunit.html.HtmlPage.loadJavaScriptFromUrl(HtmlPage.java:1112)
      at com.gargoylesoftware.htmlunit.html.HtmlPage.loadExternalJavaScriptFile(HtmlPage.java:1002)
      at com.gargoylesoftware.htmlunit.html.HtmlScript.executeScriptIfNeeded(HtmlScript.java:358)
      at com.gargoylesoftware.htmlunit.html.HtmlScript$1.execute(HtmlScript.java:212)
      at com.gargoylesoftware.htmlunit.html.HtmlScript.onAllChildrenAddedToPage(HtmlScript.java:238)
      at com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.endElement(HTMLParser.java:569)
      at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
      at com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.endElement(HTMLParser.java:523)
      at org.cyberneko.html.filters.DefaultFilter.endElement(DefaultFilter.java:210)
      at org.cyberneko.html.filters.NamespaceBinder.endElement(NamespaceBinder.java:329)
      at org.cyberneko.html.HTMLTagBalancer.callEndElement(HTMLTagBalancer.java:993)
      at org.cyberneko.html.HTMLTagBalancer.endElement(HTMLTagBalancer.java:896)
      at org.cyberneko.html.HTMLScanner$ContentScanner.scanEndElement(HTMLScanner.java:2893)
      at org.cyberneko.html.HTMLScanner$ContentScanner.scan(HTMLScanner.java:1954)
      at org.cyberneko.html.HTMLScanner.scanDocument(HTMLScanner.java:893)
      at org.cyberneko.html.HTMLConfiguration.parse(HTMLConfiguration.java:495)
      at org.cyberneko.html.HTMLConfiguration.parse(HTMLConfiguration.java:448)
      at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
      at com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.parse(HTMLParser.java:771)
      at com.gargoylesoftware.htmlunit.html.HTMLParser.parse(HTMLParser.java:252)
      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:439)
      at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:327)
      at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:384)
      at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:369)
      at org.jboss.jsfunit.framework.SimpleInitialRequestStrategy.doInitialRequest(SimpleInitialRequestStrategy.java:48)
      at org.jboss.jsfunit.framework.WebClientSpec.doInitialRequest(WebClientSpec.java:244)
      at org.jboss.jsfunit.jsfsession.JSFSession.<init>(JSFSession.java:80)
      at org.jboss.jsfunit.jsfsession.JSFSession.<init>(JSFSession.java:57)
      at com.bella.portal.common.LoginTest.login(LoginTest.java:28)
      at com.bella.portal.common.LoginTest.testLogin(LoginTest.java:42)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at org.apache.cactus.internal.AbstractCactusTestCase.runBareServer(AbstractCactusTestCase.java:153)
      at org.apache.cactus.internal.server.AbstractWebTestCaller.doTest(AbstractWebTestCaller.java:119)
      at org.apache.cactus.internal.server.AbstractWebTestController.handleRequest_aroundBody0(AbstractWebTestController.java:93)
      at org.apache.cactus.internal.server.AbstractWebTestController.handleRequest_aroundBody1$advice(AbstractWebTestController.java:224)
      at org.apache.cactus.internal.server.AbstractWebTestController.handleRequest(AbstractWebTestController.java)
      at org.apache.cactus.server.ServletTestRedirector.doPost_aroundBody2(ServletTestRedirector.java:101)
      at org.apache.cactus.server.ServletTestRedirector.doPost_aroundBody3$advice(ServletTestRedirector.java:217)
      at org.apache.cactus.server.ServletTestRedirector.doPost(ServletTestRedirector.java)
      at org.jboss.jsfunit.framework.JSFUnitServletRedirector.doPost(JSFUnitServletRedirector.java:46)
      at org.apache.cactus.server.ServletTestRedirector.doGet_aroundBody0(ServletTestRedirector.java:72)
      at org.apache.cactus.server.ServletTestRedirector.doGet_aroundBody1$advice(ServletTestRedirector.java:217)
      at org.apache.cactus.server.ServletTestRedirector.doGet(ServletTestRedirector.java)
      at org.jboss.jsfunit.framework.JSFUnitServletRedirector.doGet(JSFUnitServletRedirector.java:52)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
      at org.jboss.jsfunit.framework.JSFUnitFilter.doFilter(JSFUnitFilter.java:116)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)
      at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
      at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
      at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
      at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
      at java.lang.Thread.run(Thread.java:619)
      


      When i turn LoadStyleStrategy or LoadScriptStrategy to "NONE", tests running fine.
      Is there any solution to fix this issue ?

      Thanks for advance,
      Igor