我使用documents4j 库创建了一个word 文件。
有时它可以工作,但有时它不起作用并经历超时异常。
以下是输出错误:
ERROR c.d.c.msoffice.MicrosoftWordBridge - Thread responsible for running script timed out: C:\****\****\****\word_start287628854.vbs
java.util.concurrent.TimeoutException: Timed out waiting for Process[pid=15988, exitValue="not exited"] to finish, timeout: 5000 milliseconds, executed command [cmd, /S, /C, "C:\****\****\****\word_start287628854.vbs""] in directory C:\****\****\Desktop, output was 0 bytes:
at org.zeroturnaround.exec.ProcessExecutor.newTimeoutException(ProcessExecutor.java:1079) ~[zt-exec-1.8.jar:na]
at org.zeroturnaround.exec.ProcessExecutor.waitFor(ProcessExecutor.java:1042) ~[zt-exec-1.8.jar:na]
at org.zeroturnaround.exec.ProcessExecutor.execute(ProcessExecutor.java:860) ~[zt-exec-1.8.jar:na]
at com.documents4j.conversion.AbstractExternalConverter.runNoArgumentScript(AbstractExternalConverter.java:72) ~[documents4j-util-transformer-process-1.0.3.jar:na]
at com.documents4j.conversion.msoffice.AbstractMicrosoftOfficeBridge.runNoArgumentScript(AbstractMicrosoftOfficeBridge.java:51) ~[documents4j-transformer-msoffice-base-1.0.3.jar:na]
at com.documents4j.conversion.msoffice.AbstractMicrosoftOfficeBridge.tryStart(AbstractMicrosoftOfficeBridge.java:34) ~[documents4j-transformer-msoffice-base-1.0.3.jar:na]
at com.documents4j.conversion.msoffice.MicrosoftWordBridge.startUp(MicrosoftWordBridge.java:44) ~[documents4j-transformer-msoffice-word-1.0.3.jar:na]
at com.documents4j.conversion.msoffice.MicrosoftWordBridge.<init>(MicrosoftWordBridge.java:39) ~[documents4j-transformer-msoffice-word-1.0.3.jar:na]
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:na]
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[na:na]
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[na:na]
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500) ~[na:na]
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:481) ~[na:na]
at com.documents4j.conversion.ExternalConverterDiscovery.make(ExternalConverterDiscovery.java:30) ~[documents4j-transformer-1.0.3.jar:na]
at com.documents4j.conversion.ExternalConverterDiscovery.makeAll(ExternalConverterDiscovery.java:42) ~[documents4j-transformer-1.0.3.jar:na]
at com.documents4j.conversion.ExternalConverterDiscovery.loadConfiguration(ExternalConverterDiscovery.java:85) ~[documents4j-transformer-1.0.3.jar:na]
at com.documents4j.conversion.DefaultConversionManager.<init>(DefaultConversionManager.java:22) ~[documents4j-transformer-1.0.3.jar:na]
at com.documents4j.job.LocalConverter.makeConversionManager(LocalConverter.java:79) ~[documents4j-local-1.0.3.jar:na]
at com.documents4j.job.LocalConverter.<init>(LocalConverter.java:51) ~[documents4j-local-1.0.3.jar:na]
at com.documents4j.job.LocalConverter$Builder.build(LocalConverter.java:186) ~[documents4j-local-1.0.3.jar:na]
at org.processmining.framework.util.ui.scalableview.interaction.ExportInteractionPanel.export(ExportInteractionPanel.java:408) ~[bin/:na]
at org.processmining.framework.util.ui.scalableview.interaction.ExportInteractionPanel$1.run(ExportInteractionPanel.java:78) ~[bin/:na]
at java.base/java.lang.Thread.run(Thread.java:835) ~[na:na]
我该如何解决这个错误?