FusionCharts Forum: error of call from HtmlUnit2.5 for export img - FusionCharts Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

error of call from HtmlUnit2.5 for export img

#1 User is offline   smhx 

  • Forum Newbie
  • Group: Members
  • Posts: 1
  • Joined: 29-April 09

Posted 03 July 2009 - 03:10 AM

all right is operation in firefox 3.5

but in HtmlUnit 2.5

final WebClient webClient = new WebClient(BrowserVersion.FIREFOX_3);

		final HtmlPage page = (HtmlPage) webClient

				.getPage("http://127.0.0.1:8080/test3.jsp");

	

		final HtmlAnchor anchor = page.getAnchorByName("crtimg");

		anchor.click();




error:

2009-7-3 15:41:06 com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify

??: Obsolete content type encountered: 'text/javascript'.

2009-7-3 15:41:07 com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify

??: Obsolete content type encountered: 'text/javascript'.



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

EcmaError: lineNumber=[16] column=[0] lineSource=[null] name=[TypeError] sourceName=[script in http://127.0.0.1:8080/test3.jsp from (7, 34) to (21, 20)] message=[TypeError: Cannot find function exportChart in object [object HTMLEmbedElement]. (script in http://127.0.0.1:8080/test3.jsp from (7, 34) to (21, 20)#16)]

com.gargoylesoftware.htmlunit.ScriptException: TypeError: Cannot find function exportChart in object [object HTMLEmbedElement]. (script in http://127.0.0.1:8080/test3.jsp from (7, 34) to (21, 20)#16)

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.callFunction(JavaScriptEngine.java:444)

at com.gargoylesoftware.htmlunit.html.HtmlPage.executeJavaScriptFunctionIfPossible(HtmlPage.java:961)

at com.gargoylesoftware.htmlunit.javascript.host.EventListenersContainer.executeEventHandler(EventListenersContainer.java:152)

at com.gargoylesoftware.htmlunit.javascript.host.EventListenersContainer.executeBubblingListeners(EventListenersContainer.java: 165)

at com.gargoylesoftware.htmlunit.javascript.host.Node.fireEvent(Node.java:576)

at com.gargoylesoftware.htmlunit.html.HtmlElement$2.run(HtmlElement.java:916)

at org.mozilla.javascript.Context.call(Context.java:515)

at org.mozilla.javascript.ContextFactory.call(ContextFactory.java:507)

at com.gargoylesoftware.htmlunit.html.HtmlElement.fireEvent(HtmlElement.java:921)

at com.gargoylesoftware.htmlunit.html.ClickableElement.click(ClickableElement.java:136)

at com.gargoylesoftware.htmlunit.html.ClickableElement.click(ClickableElement.java:107)

at com.gargoylesoftware.htmlunit.html.ClickableElement.click(ClickableElement.java:76)

at test.MyTest.homePage_Firefox(MyTest.java:37)

at test.MyTest.main(MyTest.java:18)

Caused by: org.mozilla.javascript.EcmaError: TypeError: Cannot find function exportChart in object [object HTMLEmbedElement]. (script in http://127.0.0.1:8080/test3.jsp from (7, 34) to (21, 20)#16)

at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3654)

at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3632)

at org.mozilla.javascript.ScriptRuntime.typeError(ScriptRuntime.java:3660)

at org.mozilla.javascript.ScriptRuntime.typeError2(ScriptRuntime.java:3679)

at org.mozilla.javascript.ScriptRuntime.notFunctionError(ScriptRuntime.java:3743)

at org.mozilla.javascript.ScriptRuntime.getPropFunctionAndThisHelper(ScriptRuntime.java:2247)

at org.mozilla.javascript.ScriptRuntime.getPropFunctionAndThis(ScriptRuntime.java:2214)

at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:3143)

at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2487)

at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:164)

at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:398)

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

at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3065)

at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:162)

at com.gargoylesoftware.htmlunit.javascript.host.EventHandler.call(EventHandler.java:82)

at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.callFunction(JavaScriptEngine.java:472)

at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$6.doRun(JavaScriptEngine.java:437)

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

... 16 more

Enclosed exception:

org.mozilla.javascript.EcmaError: TypeError: Cannot find function exportChart in object [object HTMLEmbedElement]. (script in http://127.0.0.1:8080/test3.jsp from (7, 34) to (21, 20)#16)

at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3654)

at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3632)

at org.mozilla.javascript.ScriptRuntime.typeError(ScriptRuntime.java:3660)

at org.mozilla.javascript.ScriptRuntime.typeError2(ScriptRuntime.java:3679)

at org.mozilla.javascript.ScriptRuntime.notFunctionError(ScriptRuntime.java:3743)

at org.mozilla.javascript.ScriptRuntime.getPropFunctionAndThisHelper(ScriptRuntime.java:2247)

at org.mozilla.javascript.ScriptRuntime.getPropFunctionAndThis(ScriptRuntime.java:2214)

at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:3143)

at script.ExportMyChart(script in http://127.0.0.1:8080/test3.jsp from (7, 34) to (21, 20):16)

at script(onclick event for HtmlAnchor[] in http://127.0.0.1:8080/test3.jsp)

at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2487)

at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:164)

at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:398)

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

at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3065)

at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:162)

at com.gargoylesoftware.htmlunit.javascript.host.EventHandler.call(EventHandler.java:82)

at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.callFunction(JavaScriptEngine.java:472)

at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$6.doRun(JavaScriptEngine.java:437)

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.callFunction(JavaScriptEngine.java:444)

at com.gargoylesoftware.htmlunit.html.HtmlPage.executeJavaScriptFunctionIfPossible(HtmlPage.java:961)

at com.gargoylesoftware.htmlunit.javascript.host.EventListenersContainer.executeEventHandler(EventListenersContainer.java:152)

at com.gargoylesoftware.htmlunit.javascript.host.EventListenersContainer.executeBubblingListeners(EventListenersContainer.java: 165)

at com.gargoylesoftware.htmlunit.javascript.host.Node.fireEvent(Node.java:576)

at com.gargoylesoftware.htmlunit.html.HtmlElement$2.run(HtmlElement.java:916)

at org.mozilla.javascript.Context.call(Context.java:515)

at org.mozilla.javascript.ContextFactory.call(ContextFactory.java:507)

at com.gargoylesoftware.htmlunit.html.HtmlElement.fireEvent(HtmlElement.java:921)

at com.gargoylesoftware.htmlunit.html.ClickableElement.click(ClickableElement.java:136)

at com.gargoylesoftware.htmlunit.html.ClickableElement.click(ClickableElement.java:107)

at com.gargoylesoftware.htmlunit.html.ClickableElement.click(ClickableElement.java:76)

at test.MyTest.homePage_Firefox(MyTest.java:37)

at test.MyTest.main(MyTest.java:18)

== CALLING JAVASCRIPT ==

function () {

[native code, arity=0]

}
0

Other Replies To This Topic

#2 User is offline   Sudipto Choudhury 

  • Supreme Being
  • Group: Administrators
  • Posts: 1919
  • Joined: 19-March 07

Posted 09 July 2009 - 10:10 AM

Hi,



We have not tested with HTMLUNIT as of now.



One this we need to make sure whether the chart is actually getting rendered at first place.



Could you please check whether the chart is calling up FC_Rendered() function when it finishes rendering.



You would need to add a JS function FC_Rendered and trace this function.
Regards,

Sudipto Choudhury
FusionCharts Team

Follow us on Twitter

I code, therefore I am.

0

Other Replies To This Topic

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic