设置导出服务器时,我对highcharts有一些问题。 我的目录结构如下:
C:\HighChart --|
highcharts-export --|
highcharts-export-convert
highcharts-export-web
pom.xml
phantomjs --|
phantomjs.exe
我编辑app-convert.properties(在C:\ HighChart \ highcharts-export \ highcharts-export-web \ src \ main \ webapp \ WEB-INF \ spring中),如下所示:
#### phantomjs properties ####
# the host and port phantomjs listens to
host = 127.0.0.1
port = 7777
# location of the phantomjs executable, could be for example /usr/local/bin/phantomjs
exec = C:/HighChart/phantomjs/phantomjs.exe
# name of the convert script used by phantomjs
script = C:/HighChart/highcharts-export/highcharts-export-convert/src/main/resources/phantomjs/highcharts-convert.js
#### connect properties used to connect with phantomjs running as HTTP-server ####
# all values in milliseconds
# specifies the timeout when reading from phantomjs when a connection is established
readTimeout = 6000
# timeout to be used when opening a communications link to the phantomjs server
connectTimeout = 500
# the whole request to the phantomjs server is scheduled, max timeout can last to this value. This is because in java you can't rely on the above two timeouts.
maxTimeout = 6500
#### Pool properties ####
# number of phantomjs servers you can run in the pool.
poolSize = 5
# The pool is implemented as a BlockingQueue. When asking for a phantom server connection and nothing is available, it waits for the number of milliseconds defined by maxWait
maxWait = 500
# Keep files in the temp folder for a certain retentionTime, defined in miliseconds
retentionTime = 30000
最后我输入mvn clean package
创建一个.war文件,并将它同时触发jetty和tomcat,但是当服务器启动时,它会发生如下错误:
[ERROR] [pool-1-thread-1] (TaskUtils.java:handleError:95) Unexpected error occurred in scheduled task.
java.lang.RuntimeException: Error,PhantomJS couldnot start
at com.highcharts.export.server.Server.<init>(Server.java:60)....
我还在app-convert.properties serval中更改了exec和脚本,但是当我启动服务器时,它总是像这样...... 需要帮助!