JavaScriptException: (TypeError): $wnd.Highcharts is undefined

Hello,

i created a standard vaadin Project, copied the library ‘invientcharts-0.8.3.jar’ under the folder web-inf/lib, createad a servlet class with the overrided methode ‘writeAjaxPageHtmlVaadinScripts’ and changed the web.xml, copied the folder graphics, js and jquery under the folder WebContent. Further i inserted the code for the pie-chart from the demo at the application class.
When i ran the Application under Eclipse (Tomcat) i get the error ‘JavaScriptException: (TypeError): $wnd.Highcharts is undefined’.
After i imported the demo into Eclipse and ran the wep-app, all gone fine.

What’s wrong?

Who can help me? Perhaps i don’t see the wood for the tree.

Regards
Paule

You forgot to compile the widgetset?

Hi!

What I did to get the javascripts to load consistently was the following:

  1. Moved the js-folders (jquery, js) to the VAADIN folder under WebContent

  2. changed the write calls in writeAjaxPageHtmlVaadinScripts with this:

page.write("document.write(\"<script language='javascript' src='"
				+ request.getContextPath()
				+ "/VAADIN/jquery/jquery-1.4.4.min.js'><\\/script>\");\n");
		page.write("document.write(\"<script language='javascript' src='"
				+ request.getContextPath()
				+ "/VAADIN/js/highcharts.js'><\\/script>\");\n");
		page.write("document.write(\"<script language='javascript' src='"
				+ request.getContextPath()
				+ "/VAADIN/js/modules/exporting.js'><\\/script>\");\n");
  1. Changed web.xml to this:
  <servlet-mapping>
  	<servlet-name>eev</servlet-name>
  	<url-pattern>/*</url-pattern>
  </servlet-mapping>

  <servlet-mapping>
  	<servlet-name>eev</servlet-name>
  	<url-pattern>/VAADIN/*</url-pattern>
  </servlet-mapping>

Thanks that solved my problem!

I had a similar issue. Please find the detailed steps to solve this here:
https://vaadin.com/forum/-/message_boards/view_message/1175215#_19_message_1175215