Search code examples
javatomcatphantomjshighcharts-ng

Java export server : (SVGConverter.java:convert:108) responce : ReferenceError: Can't find variable: Highcharts


System : windows 10 and AWS EC2

I have follow below steps:

  1. install jdk
  2. install tomcat8
  3. install maven
  4. PhantomJS
  5. Updated app-convert.properties according to system (windows/linux)
  6. Added new required highchart java-script files in diectory /phantomjs
  7. Updated required java-scripts files names in resources.json
  8. Export war/ install export server from repository
  9. Deploy war in tomcat/ start server using mvn jetty:run

On preview server logs error

[ERROR] [http-nio-8080-exec-25 05:19:49] (ExportController.java:writeFileToStream:356) Tried to read file from filesystem: File '/tmp/tomcat8-tomcat8-tmp/export4935023327417038147/output/UOBhqYub.png' does not exist

So I debug Server.java, server is responding as

"ReferenceError: Can't find variable: highcharts".

(SVGConverter.java:convert:108) responce json: ReferenceError: Can't find variable: Highcharts

I have added required js files in resource/phontomjs directory and mentioned these files in resources.json.

GitHub issue

Please correct me if I am missing anything.


Solution

  • My bad, my stupid mistake, I was using old version of highchart java-scripts files.