1 Reply Latest reply on Dec 27, 2010 1:14 PM by Stan Silvert

    throw exception when i use jqplot framework

    yy zhang Newbie
      hi,i use jsfunit 1.3 to test.
      in my page i use jqplot framework to plotting,when i test this page throw error as follow:

       

      hi,i use jsfunit 1.3 to test.

      in my page i use jqplot framework to plotting,when i test this page throw error as follow:

       

       

       

      TypeError: Cannot set property "id" of null to "ex_canvas_" (http://localhost:8088/testtwesb/component/jqplot/excanvas.js#105)

       

      ======= EXCEPTION START ========

      EcmaError: lineNumber=[105] column=[0] lineSource=[<no source>] name=[TypeError] sourceName=[http://localhost:8088/testtwesb/component/jqplot/excanvas.js] message=[TypeError: Cannot set property "id" of null to "ex_canvas_" (http://localhost:8088/testtwesb/component/jqplot/excanvas.js#105)]

      com.gargoylesoftware.htmlunit.ScriptException: TypeError: Cannot set property "id" of null to "ex_canvas_" (http://localhost:8088/testtwesb/component/jqplot/excanvas.js#105)

      at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:601)

      at net.sourceforge.htmlunit.corejs.javascript.Context.call(Context.java:537)

      at net.sourceforge.htmlunit.corejs.javascript.ContextFactory.call(ContextFactory.java:538)

      at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.execute(JavaScriptEngine.java:499)

      at com.gargoylesoftware.htmlunit.html.HtmlPage.loadExternalJavaScriptFile(HtmlPage.java:970)

      at com.gargoylesoftware.htmlunit.html.HtmlScript.executeScriptIfNeeded(HtmlScript.java:363)

      at com.gargoylesoftware.htmlunit.html.HtmlScript$1.execute(HtmlScript.java:225)

      at com.gargoylesoftware.htmlunit.html.HtmlScript.onAllChildrenAddedToPage(HtmlScript.java:245)

      at com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.endElement(HTMLParser.java:578)

      at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)

      at com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.endElement(HTMLParser.java:536)

      at org.cyberneko.html.HTMLTagBalancer.callEndElement(HTMLTagBalancer.java:1136)

      at org.cyberneko.html.HTMLTagBalancer.endElement(HTMLTagBalancer.java:1038)

      at org.cyberneko.html.filters.DefaultFilter.endElement(DefaultFilter.java:206)

      at org.cyberneko.html.filters.NamespaceBinder.endElement(NamespaceBinder.java:329)

      at org.cyberneko.html.HTMLScanner$ContentScanner.scanEndElement(HTMLScanner.java:2999)

      at org.cyberneko.html.HTMLScanner$ContentScanner.scan(HTMLScanner.java:1991)

      at org.cyberneko.html.HTMLScanner.scanDocument(HTMLScanner.java:895)

      at org.cyberneko.html.HTMLConfiguration.parse(HTMLConfiguration.java:499)

      at org.cyberneko.html.HTMLConfiguration.parse(HTMLConfiguration.java:452)

      at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)

      at com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.parse(HTMLParser.java:765)

      at com.gargoylesoftware.htmlunit.html.HTMLParser.parse(HTMLParser.java:211)

      at com.gargoylesoftware.htmlunit.html.HTMLParser.parseHtml(HTMLParser.java:165)

      at com.gargoylesoftware.htmlunit.DefaultPageCreator.createHtmlPage(DefaultPageCreator.java:225)

      at com.gargoylesoftware.htmlunit.DefaultPageCreator.createPage(DefaultPageCreator.java:108)

      at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:429)

      at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:307)

      at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:369)

      at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:354)

      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.tongweb.esb.console.monitor.integration.MonitorTaskBeanJSFUnit.setUp(MonitorTaskBeanJSFUnit.java:26)

      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:224)

      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:224)

      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:617)

      at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)

      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

      at org.jboss.jsfunit.framework.JSFUnitFilter.doFilter(JSFUnitFilter.java:119)

      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:233)

      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)

      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)

      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)

      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)

      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)

      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)

      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)

      at java.lang.Thread.run(Thread.java:619)

      Caused by: net.sourceforge.htmlunit.corejs.javascript.EcmaError: TypeError: Cannot set property "id" of null to "ex_canvas_" (http://localhost:8088/testtwesb/component/jqplot/excanvas.js#105)

      at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3772)

      at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3750)

      at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.typeError(ScriptRuntime.java:3778)

      at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.typeError3(ScriptRuntime.java:3804)

      at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.undefWriteError(ScriptRuntime.java:3826)

      at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.setObjectProp(ScriptRuntime.java:1614)

      at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpretLoop(Interpreter.java:1408)

      at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpret(Interpreter.java:845)

      at net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:164)

      at net.sourceforge.htmlunit.corejs.javascript.ContextFactory.doTopCall(ContextFactory.java:429)

      at com.gargoylesoftware.htmlunit.javascript.HtmlUnitContextFactory.doTopCall(HtmlUnitContextFactory.java:269)

      at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3162)

      at net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.exec(InterpretedFunction.java:175)

      at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$3.doRun(JavaScriptEngine.java:490)

      at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:595)

      ... 65 more

      Enclosed exception:

      net.sourceforge.htmlunit.corejs.javascript.EcmaError: TypeError: Cannot set property "id" of null to "ex_canvas_" (http://localhost:8088/testtwesb/component/jqplot/excanvas.js#105)

      at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3772)

      at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3750)

      at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.typeError(ScriptRuntime.java:3778)

      at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.typeError3(ScriptRuntime.java:3804)

      at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.undefWriteError(ScriptRuntime.java:3826)

      at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.setObjectProp(ScriptRuntime.java:1614)

      at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpretLoop(Interpreter.java:1408)

      at script.addNamespacesAndStylesheet(http://localhost:8088/testtwesb/component/jqplot/excanvas.js:105)

      at script(http://localhost:8088/testtwesb/component/jqplot/excanvas.js:113)

      at script(http://localhost:8088/testtwesb/component/jqplot/excanvas.js:37)

      at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpret(Interpreter.java:845)

      at net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:164)

      at net.sourceforge.htmlunit.corejs.javascript.ContextFactory.doTopCall(ContextFactory.java:429)

      at com.gargoylesoftware.htmlunit.javascript.HtmlUnitContextFactory.doTopCall(HtmlUnitContextFactory.java:269)

      at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3162)

      at net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.exec(InterpretedFunction.java:175)

      at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$3.doRun(JavaScriptEngine.java:490)

      at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:595)

      at net.sourceforge.htmlunit.corejs.javascript.Context.call(Context.java:537)

      at net.sourceforge.htmlunit.corejs.javascript.ContextFactory.call(ContextFactory.java:538)

      at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.execute(JavaScriptEngine.java:499)

      at com.gargoylesoftware.htmlunit.html.HtmlPage.loadExternalJavaScriptFile(HtmlPage.java:970)

      at com.gargoylesoftware.htmlunit.html.HtmlScript.executeScriptIfNeeded(HtmlScript.java:363)

      at com.gargoylesoftware.htmlunit.html.HtmlScript$1.execute(HtmlScript.java:225)

      at com.gargoylesoftware.htmlunit.html.HtmlScript.onAllChildrenAddedToPage(HtmlScript.java:245)

      at com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.endElement(HTMLParser.java:578)

      at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)

      at com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.endElement(HTMLParser.java:536)

      at org.cyberneko.html.HTMLTagBalancer.callEndElement(HTMLTagBalancer.java:1136)

      at org.cyberneko.html.HTMLTagBalancer.endElement(HTMLTagBalancer.java:1038)

      at org.cyberneko.html.filters.DefaultFilter.endElement(DefaultFilter.java:206)

      at org.cyberneko.html.filters.NamespaceBinder.endElement(NamespaceBinder.java:329)

      at org.cyberneko.html.HTMLScanner$ContentScanner.scanEndElement(HTMLScanner.java:2999)

      at org.cyberneko.html.HTMLScanner$ContentScanner.scan(HTMLScanner.java:1991)

      at org.cyberneko.html.HTMLScanner.scanDocument(HTMLScanner.java:895)

      at org.cyberneko.html.HTMLConfiguration.parse(HTMLConfiguration.java:499)

      at org.cyberneko.html.HTMLConfiguration.parse(HTMLConfiguration.java:452)

      at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)

      at com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.parse(HTMLParser.java:765)

      at com.gargoylesoftware.htmlunit.html.HTMLParser.parse(HTMLParser.java:211)

      at com.gargoylesoftware.htmlunit.html.HTMLParser.parseHtml(HTMLParser.java:165)

      at com.gargoylesoftware.htmlunit.DefaultPageCreator.createHtmlPage(DefaultPageCreator.java:225)

      at com.gargoylesoftware.htmlunit.DefaultPageCreator.createPage(DefaultPageCreator.java:108)

      at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:429)

      at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:307)

      at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:369)

      at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:354)

      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.tongweb.esb.console.monitor.integration.MonitorTaskBeanJSFUnit.setUp(MonitorTaskBeanJSFUnit.java:26)

      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:224)

      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:224)

      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:617)

      at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)

      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

      at org.jboss.jsfunit.framework.JSFUnitFilter.doFilter(JSFUnitFilter.java:119)

      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:233)

      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)

      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)

      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)

      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)

      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)

      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)

      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)

      at java.lang.Thread.run(Thread.java:619)

      ======= EXCEPTION END ========

       

       

      my page

      <script language="javascript" type="text/javascript" src="<c:out value="${pageContext.request.contextPath}"/>/component/jqplot/excanvas.js"></script>

       

       

      thanks