Running in tomcat service in Windows 2012

68 views
Skip to first unread message

dosi...@gmail.com

unread,
Jun 10, 2019, 2:33:44 AM6/10/19
to documents4j
Hello,

I am using the library for converting word documents into pdf. With the Desktop folder created it works well for Windows 2008. However, the solution does not work in Windows 2012. The process to start word itself times out in Windows 2012. Increasing the time out also does not help. Temporarily, I have started the application from startup Tomcat script so as to avoid this issue. But what would be a permanent resolution for this issue in Windows 2012?

18:14:53.096 [http-nio-8082-exec-3] DEBUG o.z.exec.ProcessExecutor - Executing [cmd, /C, "C:\PortalRelated\test_output\word_start1553450901.vbs"] in C:\PortalRelated\test_output.
18:14:53.096 [http-nio-8082-exec-3] DEBUG o.z.exec.ProcessExecutor - Started java.lang.ProcessImpl@1520b12f
18:14:58.112 [http-nio-8082-exec-3] DEBUG o.z.exec.ProcessExecutor - java.lang.ProcessImpl@1520b12f is running too long
18:14:58.112 [WaitForProcess-java.lang.ProcessImpl@1520b12f] DEBUG o.zeroturnaround.exec.WaitForProcess - Stopping java.lang.ProcessImpl@1520b12f...
18:14:58.127 [http-nio-8082-exec-3] ERROR c.d.c.msoffice.MicrosoftWordBridge - Thread responsible for running script timed out: C:\PortalRelated\test_output\word_start1553450901.vbs
java.util.concurrent.TimeoutException: Timed out waiting for java.lang.ProcessImpl@1520b12f to finish, timeout: 5000 milliseconds, executed command [cmd, /C, "C:\PortalRelated\test_output\word_start1553450901.vbs"] in directory C:\PortalRelated\test_output, output was 0 bytes

at org.zeroturnaround.exec.ProcessExecutor.newTimeoutException(ProcessExecutor.java:1079) ~[ProcessExecutor.class:na]


java.lang.IllegalStateException: class com.documents4j.conversion.msoffice.MicrosoftWordBridge could not be created by a (File, long, TimeUnit) constructor
at com.documents4j.conversion.ExternalConverterDiscovery.make(ExternalConverterDiscovery.java:32)
at com.documents4j.conversion.ExternalConverterDiscovery.makeAll(ExternalConverterDiscovery.java:42)
at com.documents4j.conversion.ExternalConverterDiscovery.loadConfiguration(ExternalConverterDiscovery.java:85)
at com.documents4j.conversion.DefaultConversionManager.<init>(DefaultConversionManager.java:22)
at com.documents4j.job.LocalConverter.makeConversionManager(LocalConverter.java:74)
at com.documents4j.job.LocalConverter.<init>(LocalConverter.java:47)
at com.documents4j.job.LocalConverter$Builder.build(LocalConverter.java:162)
at org.bks.pad.view.LbFormPdfView.renderMergedOutputModel(LbFormPdfView.java:69)
at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:267)
at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1221)
at org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1005)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:952)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:870)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:961)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:852)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:618)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:837
com.documents4j.conversion.msoffice.AbstractMicrosoftOfficeBridge.runNoArgumentScript(AbstractMicrosoftOfficeBridge.java:51)
at com.documents4j.conversion.msoffice.AbstractMicrosoftOfficeBridge.tryStart(AbstractMicrosoftOfficeBridge.java:34)
at com.documents4j.conversion.msoffice.MicrosoftWordBridge.startUp(MicrosoftWordBridge.java:44)
at com.documents4j.conversion.msoffice.MicrosoftWordBridge.<init>(MicrosoftWordBridge.java:39)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)


Rafael Winterhalter

unread,
Jun 10, 2019, 3:53:46 PM6/10/19
to dosi...@gmail.com, documents4j
Hei, did you consider the advice given on documents4j.com under "Running documents4j application as Windows service"?

Cheers, Rafael

--
You received this message because you are subscribed to the Google Groups "documents4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email to documents4j...@googlegroups.com.
To post to this group, send email to docum...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/documents4j/adb8e4b0-313e-40a7-9639-204f9bc97aa1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Garima Dosi

unread,
Jun 11, 2019, 12:44:21 AM6/11/19
to Rafael Winterhalter, documents4j
Have already tried it. Does not work in Windows 2012. With Windows 2008, works fine.

Rafael Winterhalter

unread,
Jun 17, 2019, 4:45:18 AM6/17/19
to Garima Dosi, documents4j
There is probably some trick to get Word working as a service on Windows 2012 that differs to that of Windows 2008. Normally, the issue is that the service user is lacking some folders that Word expects that exist for "regular" users. I have no experience with Windows 2012, unfortunately. But I am sure there is a way.

Reply all
Reply to author
Forward
0 new messages