java.io.IOException: Cannot run program "phantomjs": error=2, No such file or directory
at java.base/java.lang.ProcessBuilder.start(Unknown Source) ~[na:na]
at java.base/java.lang.ProcessBuilder.start(Unknown Source) ~[na:na]
at java.base/java.lang.Runtime.exec(Unknown Source) ~[na:na]
at java.base/java.lang.Runtime.exec(Unknown Source) ~[na:na]
at java.base/java.lang.Runtime.exec(Unknown Source) ~[na:na]
at com.futuremind.fm.utils.EchartsUtil.generateBarImage(EchartsUtil.java:66) ~[classes!/:1.0.1]
at com.futuremind.fm.service.impl.QuestionnaireRecordService.exportEvaluationPDF(QuestionnaireRecordService.java:1364) ~[classes!/:1.0.1]
at com.futuremind.fm.service.impl.QuestionnaireRecordService$$FastClassBySpringCGLIB$$1a51b9db.invoke(<generated>) ~[classes!/:1.0.1]
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) ~[spring-core-5.0.5.RELEASE.jar!/:5.0.5.RELEASE]
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:685) ~[spring-aop-5.0.5.RELEASE.jar!/:5.0.5.RELEASE]
at com.futuremind.fm.service.impl.QuestionnaireRecordService$$EnhancerBySpringCGLIB$$f9ce6422.exportEvaluationPDF(<generated>) ~[classes!/:1.0.1]
at com.futuremind.fm.service.impl.EvaluationScoringRulesService.lambda$caculationEvaluationGroupScore$1(EvaluationScoringRulesService.java:182) ~[classes!/:1.0.1]
at java.base/java.lang.Thread.run(Unknown Source) ~[na:na]
Caused by: java.io.IOException: error=2, No such file or directory
at java.base/java.lang.ProcessImpl.forkAndExec(Native Method) ~[na:na]
at java.base/java.lang.ProcessImpl.<init>(Unknown Source) ~[na:na]
at java.base/java.lang.ProcessImpl.start(Unknown Source) ~[na:na]
... 13 common frames omitted
首先检测环境变量是否配置完好
phantomjs-2.1.1-linux-x86_64 根据环境配置phantomjs 的环境变量即可
就可以了