Unable to use reporting on Ubuntu/docker install

Hi,

I’m running the CUBA app on docker and all seems to be going well. However, I’m unable to get the report generation working. I’m using Ubuntu 16.04 and installed LibreOffice. In the app.properties I’ve configured the following:


reporting.openoffice.path = /usr/lib/libreoffice/program
reporting.displayDeviceUnavailable = true

The path is correct and has been mapped as a volume through docker-compose.

When running the application and running the report, I get this error (taken from the docker output):


e[33mweb_1       |e[0m 15:05:28.369 INFO  c.h.r.libintegration.CubaReporting - Started report [PageReport] with parameters [
e[33mweb_1       |e[0m entity:com.axxemble.base27.entity.Page-fc13b6d0-ca82-4a2f-b1bf-0f918e2c3ecf [detached]]
e[33mweb_1       |e[0m CE> /usr/lib/libreoffice/program/oosplash: error while loading shared libraries: libXinerama.so.1: cannot open shared object file: No such file or directory
e[33mweb_1       |e[0m 15:05:33.636 INFO  c.h.y.f.i.d.c.JavaProcessManager - OOServer is killing office instance with port 8100
e[33mweb_1       |e[0m 15:05:33.745 INFO  c.h.y.f.i.d.c.JavaProcessManager - Linux office process manager is going to kill following processes []
e[33mweb_1       |e[0m 15:05:33.749 WARN  c.h.y.formatters.impl.DocFormatter - An error occurred while generating doc report [PaginaRapport.doc]. System will retry to generate report again.
e[33mweb_1       |e[0m com.haulmont.yarg.exception.OpenOfficeException: Unable to create Open office components.
e[33mweb_1       |e[0m 	at com.haulmont.yarg.formatters.impl.doc.connector.OfficeConnection.open(OfficeConnection.java:78) ~[yarg-1.1.1.jar:na]
e[33mweb_1       |e[0m 	at com.haulmont.reports.libintegration.CubaOfficeIntegration$1.call(CubaOfficeIntegration.java:37) ~[reports-core-6.4.0.jar:6.4.0]
e[33mweb_1       |e[0m 	at com.haulmont.reports.libintegration.CubaOfficeIntegration$1.call(CubaOfficeIntegration.java:33) ~[reports-core-6.4.0.jar:6.4.0]
e[33mweb_1       |e[0m 	at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[na:1.8.0_111]
e[33mweb_1       |e[0m 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) ~[na:1.8.0_111]
e[33mweb_1       |e[0m 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) ~[na:1.8.0_111]
e[33mweb_1       |e[0m 	at java.lang.Thread.run(Thread.java:745) ~[na:1.8.0_111]
e[33mweb_1       |e[0m Caused by: com.sun.star.comp.helper.BootstrapException: null
e[33mweb_1       |e[0m 	at com.haulmont.yarg.formatters.impl.doc.connector.BootstrapConnector.connect(BootstrapConnector.java:131) ~[yarg-1.1.1.jar:na]
e[33mweb_1       |e[0m 	at com.haulmont.yarg.formatters.impl.doc.connector.BootstrapSocketConnector.connect(BootstrapSocketConnector.java:48) ~[yarg-1.1.1.jar:na]
e[33mweb_1       |e[0m 	at com.haulmont.yarg.formatters.impl.doc.connector.OfficeConnection.open(OfficeConnection.java:60) ~[yarg-1.1.1.jar:na]
e[33mweb_1       |e[0m 	... 6 common frames omitted
e[33mweb_1       |e[0m CE> /usr/lib/libreoffice/program/oosplash: error while loading shared libraries: libXinerama.so.1: cannot open shared object file: No such file or directory
e[33mweb_1       |e[0m 15:05:34.189 WARN  c.h.c.security.app.LoginWorkerBean - Attempt of trusted login from not permitted IP address: 172.20.0.1
e[33mweb_1       |e[0m 15:05:34.223 INFO  c.h.c.security.app.LoginServiceBean - Login failed: com.haulmont.cuba.security.global.LoginException: Unknown login name or bad password: 172.20.0.1
e[33mweb_1       |e[0m 15:05:38.775 INFO  c.h.y.f.i.d.c.JavaProcessManager - OOServer is killing office instance with port 8101
e[33mweb_1       |e[0m 15:05:38.780 INFO  c.h.y.f.i.d.c.JavaProcessManager - Linux office process manager is going to kill following processes []
e[33mweb_1       |e[0m 15:05:38.781 INFO  c.h.r.libintegration.CubaReporting - An error occurred while running report [PageReport] with parameters [
e[33mweb_1       |e[0m entity:com.axxemble.base27.entity.Page-fc13b6d0-ca82-4a2f-b1bf-0f918e2c3ecf [detached]].
e[33mweb_1       |e[0m 15:05:38.783 INFO  c.h.r.libintegration.CubaReporting - Trace: 
e[33mweb_1       |e[0m com.haulmont.yarg.exception.OpenOfficeException: Unable to create Open office components.
e[33mweb_1       |e[0m 	at com.haulmont.yarg.formatters.impl.doc.connector.OfficeConnection.open(OfficeConnection.java:78) ~[yarg-1.1.1.jar:na]
e[33mweb_1       |e[0m 	at com.haulmont.reports.libintegration.CubaOfficeIntegration$1.call(CubaOfficeIntegration.java:37) ~[reports-core-6.4.0.jar:6.4.0]
e[33mweb_1       |e[0m 	at com.haulmont.reports.libintegration.CubaOfficeIntegration$1.call(CubaOfficeIntegration.java:33) ~[reports-core-6.4.0.jar:6.4.0]
e[33mweb_1       |e[0m 	at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[na:1.8.0_111]
e[33mweb_1       |e[0m 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) ~[na:1.8.0_111]
e[33mweb_1       |e[0m 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) ~[na:1.8.0_111]
e[33mweb_1       |e[0m 	at java.lang.Thread.run(Thread.java:745) ~[na:1.8.0_111]
e[33mweb_1       |e[0m Caused by: com.sun.star.comp.helper.BootstrapException: null
e[33mweb_1       |e[0m 	at com.haulmont.yarg.formatters.impl.doc.connector.BootstrapConnector.connect(BootstrapConnector.java:131) ~[yarg-1.1.1.jar:na]
e[33mweb_1       |e[0m 	at com.haulmont.yarg.formatters.impl.doc.connector.BootstrapSocketConnector.connect(BootstrapSocketConnector.java:48) ~[yarg-1.1.1.jar:na]
e[33mweb_1       |e[0m 	at com.haulmont.yarg.formatters.impl.doc.connector.OfficeConnection.open(OfficeConnection.java:60) ~[yarg-1.1.1.jar:na]
e[33mweb_1       |e[0m 	... 6 common frames omitted
e[33mweb_1       |e[0m 15:05:38.806 ERROR c.h.cuba.core.sys.ServiceInterceptor - Exception: 
e[33mweb_1       |e[0m com.haulmont.reports.exception.FailedToConnectToOpenOfficeException: Unable to create Open office components. Report name [PageReport]
e[33mweb_1       |e[0m 	at com.haulmont.reports.ReportingBean.createReportDocument(ReportingBean.java:267) ~[reports-core-6.4.0.jar:6.4.0]
e[33mweb_1       |e[0m 	at com.haulmont.reports.ReportingBean.createReport(ReportingBean.java:173) ~[reports-core-6.4.0.jar:6.4.0]
e[33mweb_1       |e[0m 	at com.haulmont.reports.ReportServiceBean.createReport(ReportServiceBean.java:42) ~[reports-core-6.4.0.jar:6.4.0]
e[33mweb_1       |e[0m 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_111]
e[33mweb_1       |e[0m 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_111]
e[33mweb_1       |e[0m 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_111]
e[33mweb_1       |e[0m 	at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_111]
e[33mweb_1       |e[0m 	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333) [spring-aop-4.3.3.RELEASE.jar:4.3.3.RELEASE]
e[33mweb_1       |e[0m 	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190) [spring-aop-4.3.3.RELEASE.jar:4.3.3.RELEASE]
e[33mweb_1       |e[0m 	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) [spring-aop-4.3.3.RELEASE.jar:4.3.3.RELEASE]
e[33mweb_1       |e[0m 	at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:85) ~[spring-aop-4.3.3.RELEASE.jar:4.3.3.RELEASE]
e[33mweb_1       |e[0m 	at com.haulmont.cuba.core.sys.ServiceInterceptor.aroundInvoke(ServiceInterceptor.java:118) ~[cuba-core-6.4.0.jar:6.4.0]
e[33mweb_1       |e[0m 	at sun.reflect.GeneratedMethodAccessor216.invoke(Unknown Source) ~[na:na]
e[33mweb_1       |e[0m 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_111]
e[33mweb_1       |e[0m 	at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_111]
e[33mweb_1       |e[0m 	at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:629) [spring-aop-4.3.3.RELEASE.jar:4.3.3.RELEASE]
e[33mweb_1       |e[0m 	at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:618) [spring-aop-4.3.3.RELEASE.jar:4.3.3.RELEASE]
e[33mweb_1       |e[0m 	at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:70) [spring-aop-4.3.3.RELEASE.jar:4.3.3.RELEASE]
e[33mweb_1       |e[0m 	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:168) [spring-aop-4.3.3.RELEASE.jar:4.3.3.RELEASE]
e[33mweb_1       |e[0m 	at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92) [spring-aop-4.3.3.RELEASE.jar:4.3.3.RELEASE]
e[33mweb_1       |e[0m 	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) [spring-aop-4.3.3.RELEASE.jar:4.3.3.RELEASE]
e[33mweb_1       |e[0m 	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213) [spring-aop-4.3.3.RELEASE.jar:4.3.3.RELEASE]
e[33mweb_1       |e[0m 	at com.sun.proxy.$Proxy142.createReport(Unknown Source) [na:na]
e[33mweb_1       |e[0m 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_111]
e[33mweb_1       |e[0m 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_111]
e[33mweb_1       |e[0m 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_111]
e[33mweb_1       |e[0m 	at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_111]
e[33mweb_1       |e[0m 	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333) [spring-aop-4.3.3.RELEASE.jar:4.3.3.RELEASE]
e[33mweb_1       |e[0m 	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207) [spring-aop-4.3.3.RELEASE.jar:4.3.3.RELEASE]
e[33mweb_1       |e[0m 	at com.sun.proxy.$Proxy183.createReport(Unknown Source) [na:na]
e[33mweb_1       |e[0m 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_111]
e[33mweb_1       |e[0m 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_111]
e[33mweb_1       |e[0m 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_111]
e[33mweb_1       |e[0m 	at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_111]
e[33mweb_1       |e[0m 	at org.springframework.remoting.support.RemoteInvocation.invoke(RemoteInvocation.java:212) [spring-context-4.3.3.RELEASE.jar:4.3.3.RELEASE]
e[33mweb_1       |e[0m 	at com.haulmont.cuba.core.sys.remoting.CubaRemoteInvocationExecutor.invoke(CubaRemoteInvocationExecutor.java:109) [cuba-core-6.4.0.jar:6.4.0]
e[33mweb_1       |e[0m 	at org.springframework.remoting.support.RemoteInvocationBasedExporter.invoke(RemoteInvocationBasedExporter.java:78) [spring-context-4.3.3.RELEASE.jar:4.3.3.RELEASE]
e[33mweb_1       |e[0m 	at org.springframework.remoting.support.RemoteInvocationBasedExporter.invokeAndCreateResult(RemoteInvocationBasedExporter.java:114) [spring-context-4.3.3.RELEASE.jar:4.3.3.RELEASE]
e[33mweb_1       |e[0m 	at com.haulmont.cuba.core.sys.remoting.HttpServiceExporter.handleRequest(HttpServiceExporter.java:77) [cuba-core-6.4.0.jar:6.4.0]
e[33mweb_1       |e[0m 	at org.springframework.web.servlet.mvc.HttpRequestHandlerAdapter.handle(HttpRequestHandlerAdapter.java:51) [spring-webmvc-4.3.3.RELEASE.jar:4.3.3.RELEASE]
e[33mweb_1       |e[0m 	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:963) [spring-webmvc-4.3.3.RELEASE.jar:4.3.3.RELEASE]
e[33mweb_1       |e[0m 	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:897) [spring-webmvc-4.3.3.RELEASE.jar:4.3.3.RELEASE]
e[33mweb_1       |e[0m 	at com.haulmont.cuba.core.sys.remoting.RemotingServlet.doService(RemotingServlet.java:149) [cuba-core-6.4.0.jar:6.4.0]
e[33mweb_1       |e[0m 	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970) [spring-webmvc-4.3.3.RELEASE.jar:4.3.3.RELEASE]
e[33mweb_1       |e[0m 	at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:872) [spring-webmvc-4.3.3.RELEASE.jar:4.3.3.RELEASE]
e[33mweb_1       |e[0m 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:648) [servlet-api.jar:na]
e[33mweb_1       |e[0m 	at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846) [spring-webmvc-4.3.3.RELEASE.jar:4.3.3.RELEASE]
e[33mweb_1       |e[0m 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) [servlet-api.jar:na]
e[33mweb_1       |e[0m 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292) [catalina.jar:8.0.41]
e[33mweb_1       |e[0m 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) [catalina.jar:8.0.41]
e[33mweb_1       |e[0m 	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) [tomcat-websocket.jar:8.0.41]
e[33mweb_1       |e[0m 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) [catalina.jar:8.0.41]
e[33mweb_1       |e[0m 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) [catalina.jar:8.0.41]
e[33mweb_1       |e[0m 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212) [catalina.jar:8.0.41]
e[33mweb_1       |e[0m 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:94) [catalina.jar:8.0.41]
e[33mweb_1       |e[0m 	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504) [catalina.jar:8.0.41]
e[33mweb_1       |e[0m 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141) [catalina.jar:8.0.41]
e[33mweb_1       |e[0m 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) [catalina.jar:8.0.41]
e[33mweb_1       |e[0m 	at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:620) [catalina.jar:8.0.41]
e[33mweb_1       |e[0m 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88) [catalina.jar:8.0.41]
e[33mweb_1       |e[0m 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:509) [catalina.jar:8.0.41]
e[33mweb_1       |e[0m 	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1104) [tomcat-coyote.jar:8.0.41]
e[33mweb_1       |e[0m 	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:684) [tomcat-coyote.jar:8.0.41]
e[33mweb_1       |e[0m 	at org.apache.tomcat.util.net.AprEndpoint$SocketWithOptionsProcessor.run(AprEndpoint.java:2445) [tomcat-coyote.jar:8.0.41]
e[33mweb_1       |e[0m 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_111]
e[33mweb_1       |e[0m 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_111]
e[33mweb_1       |e[0m 	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-util.jar:8.0.41]
e[33mweb_1       |e[0m 	at java.lang.Thread.run(Thread.java:745) [na:1.8.0_111]
e[33mweb_1       |e[0m 15:05:38.877 ERROR com.haulmont.cuba.web.log.AppLog - Exception in com.haulmont.cuba.web.toolkit.ui.CubaButton: 
e[33mweb_1       |e[0m com.vaadin.server.ServerRpcManager$RpcInvocationException: Unable to invoke method click in com.vaadin.shared.ui.button.ButtonServerRpc
e[33mweb_1       |e[0m 	at com.vaadin.server.ServerRpcManager.applyInvocation(ServerRpcManager.java:160)
e[33mweb_1       |e[0m 	at com.vaadin.server.ServerRpcManager.applyInvocation(ServerRpcManager.java:119)
e[33mweb_1       |e[0m 	at com.vaadin.server.communication.ServerRpcHandler.handleInvocation(ServerRpcHandler.java:442)
e[33mweb_1       |e[0m 	at com.vaadin.server.communication.ServerRpcHandler.handleInvocations(ServerRpcHandler.java:414)
e[33mweb_1       |e[0m 	at com.vaadin.server.communication.ServerRpcHandler.handleRpc(ServerRpcHandler.java:274)
e[33mweb_1       |e[0m 	at com.vaadin.server.communication.UidlRequestHandler.synchronizedHandleRequest(UidlRequestHandler.java:90)
e[33mweb_1       |e[0m 	at com.haulmont.cuba.web.sys.CubaVaadinServletService$CubaUidlRequestHandler.lambda$synchronizedHandleRequest$0(CubaVaadinServletService.java:314)
e[33mweb_1       |e[0m 	at com.haulmont.cuba.web.sys.CubaVaadinServletService.withUserSession(CubaVaadinServletService.java:196)
e[33mweb_1       |e[0m 	at com.haulmont.cuba.web.sys.CubaVaadinServletService$CubaUidlRequestHandler.synchronizedHandleRequest(CubaVaadinServletService.java:314)
e[33mweb_1       |e[0m 	at com.vaadin.server.SynchronizedRequestHandler.handleRequest(SynchronizedRequestHandler.java:41)
e[33mweb_1       |e[0m 	at com.vaadin.server.VaadinService.handleRequest(VaadinService.java:1422)
e[33mweb_1       |e[0m 	at com.vaadin.server.VaadinServlet.service(VaadinServlet.java:384)
e[33mweb_1       |e[0m 	at com.haulmont.cuba.web.sys.CubaApplicationServlet.serviceAppRequest(CubaApplicationServlet.java:278)
e[33mweb_1       |e[0m 	at com.haulmont.cuba.web.sys.CubaApplicationServlet.service(CubaApplicationServlet.java:187)
e[33mweb_1       |e[0m 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
e[33mweb_1       |e[0m 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)
e[33mweb_1       |e[0m 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
e[33mweb_1       |e[0m 	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
e[33mweb_1       |e[0m 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
e[33mweb_1       |e[0m 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
e[33mweb_1       |e[0m 	at com.haulmont.cuba.web.sys.CubaHttpFilter.handleNotFiltered(CubaHttpFilter.java:108)
e[33mweb_1       |e[0m 	at com.haulmont.cuba.web.sys.CubaHttpFilter.doFilter(CubaHttpFilter.java:95)
e[33mweb_1       |e[0m 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
e[33mweb_1       |e[0m 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
e[33mweb_1       |e[0m 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
e[33mweb_1       |e[0m 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:94)
e[33mweb_1       |e[0m 	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504)
e[33mweb_1       |e[0m 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
e[33mweb_1       |e[0m 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
e[33mweb_1       |e[0m 	at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:620)
e[33mweb_1       |e[0m 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
e[33mweb_1       |e[0m 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:509)
e[33mweb_1       |e[0m 	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1104)
e[33mweb_1       |e[0m 	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:684)
e[33mweb_1       |e[0m 	at org.apache.tomcat.util.net.AprEndpoint$SocketWithOptionsProcessor.run(AprEndpoint.java:2445)
e[33mweb_1       |e[0m 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
e[33mweb_1       |e[0m 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
e[33mweb_1       |e[0m 	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
e[33mweb_1       |e[0m 	at java.lang.Thread.run(Thread.java:745)
e[33mweb_1       |e[0m Caused by: java.lang.reflect.InvocationTargetException
e[33mweb_1       |e[0m 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
e[33mweb_1       |e[0m 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
e[33mweb_1       |e[0m 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
e[33mweb_1       |e[0m 	at java.lang.reflect.Method.invoke(Method.java:498)
e[33mweb_1       |e[0m 	at com.vaadin.server.ServerRpcManager.applyInvocation(ServerRpcManager.java:158)
e[33mweb_1       |e[0m 	... 38 more
e[33mweb_1       |e[0m Caused by: com.vaadin.event.ListenerMethod$MethodException: Invocation of method buttonClick in com.haulmont.cuba.web.gui.components.WebButton$$Lambda$82/1919117239 failed.
e[33mweb_1       |e[0m 	at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:530)
e[33mweb_1       |e[0m 	at com.vaadin.event.EventRouter.fireEvent(EventRouter.java:200)
e[33mweb_1       |e[0m 	at com.vaadin.event.EventRouter.fireEvent(EventRouter.java:163)
e[33mweb_1       |e[0m 	at com.vaadin.server.AbstractClientConnector.fireEvent(AbstractClientConnector.java:1037)
e[33mweb_1       |e[0m 	at com.vaadin.ui.Button.fireClick(Button.java:377)
e[33mweb_1       |e[0m 	at com.haulmont.cuba.web.toolkit.ui.CubaButton.fireClick(CubaButton.java:54)
e[33mweb_1       |e[0m 	at com.vaadin.ui.Button$1.click(Button.java:54)
e[33mweb_1       |e[0m 	... 43 more
e[33mweb_1       |e[0m Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
e[33mweb_1       |e[0m 	at com.haulmont.cuba.gui.xml.DeclarativeAction.actionPerform(DeclarativeAction.java:94)
e[33mweb_1       |e[0m 	at com.haulmont.cuba.web.gui.components.WebButton.performAction(WebButton.java:45)
e[33mweb_1       |e[0m 	at com.haulmont.cuba.web.gui.components.WebButton.lambda$new$61446b05$1(WebButton.java:37)
e[33mweb_1       |e[0m 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
e[33mweb_1       |e[0m 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
e[33mweb_1       |e[0m 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
e[33mweb_1       |e[0m 	at java.lang.reflect.Method.invoke(Method.java:498)
e[33mweb_1       |e[0m 	at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:510)
e[33mweb_1       |e[0m 	... 49 more
e[33mweb_1       |e[0m Caused by: java.lang.reflect.InvocationTargetException
e[33mweb_1       |e[0m 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
e[33mweb_1       |e[0m 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
e[33mweb_1       |e[0m 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
e[33mweb_1       |e[0m 	at java.lang.reflect.Method.invoke(Method.java:498)
e[33mweb_1       |e[0m 	at com.haulmont.cuba.gui.xml.DeclarativeAction.actionPerform(DeclarativeAction.java:92)
e[33mweb_1       |e[0m 	... 56 more
e[33mweb_1       |e[0m Caused by: com.haulmont.reports.exception.FailedToConnectToOpenOfficeException: Unable to create Open office components. Report name [PageReport]
e[33mweb_1       |e[0m 	at com.haulmont.reports.ReportingBean.createReportDocument(ReportingBean.java:267)
e[33mweb_1       |e[0m 	at com.haulmont.reports.ReportingBean.createReport(ReportingBean.java:173)
e[33mweb_1       |e[0m 	at com.haulmont.reports.ReportServiceBean.createReport(ReportServiceBean.java:42)
e[33mweb_1       |e[0m 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
e[33mweb_1       |e[0m 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
e[33mweb_1       |e[0m 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
e[33mweb_1       |e[0m 	at java.lang.reflect.Method.invoke(Method.java:498)
e[33mweb_1       |e[0m 	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333)
e[33mweb_1       |e[0m 	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
e[33mweb_1       |e[0m 	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
e[33mweb_1       |e[0m 	at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:85)
e[33mweb_1       |e[0m 	at com.haulmont.cuba.core.sys.ServiceInterceptor.aroundInvoke(ServiceInterceptor.java:118)
e[33mweb_1       |e[0m 	at sun.reflect.GeneratedMethodAccessor216.invoke(Unknown Source)
e[33mweb_1       |e[0m 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
e[33mweb_1       |e[0m 	at java.lang.reflect.Method.invoke(Method.java:498)
e[33mweb_1       |e[0m 	at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:629)
e[33mweb_1       |e[0m 	at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:618)
e[33mweb_1       |e[0m 	at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:70)
e[33mweb_1       |e[0m 	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:168)
e[33mweb_1       |e[0m 	at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)
e[33mweb_1       |e[0m 	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
e[33mweb_1       |e[0m 	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)
e[33mweb_1       |e[0m 	at com.sun.proxy.$Proxy142.createReport(Unknown Source)
e[33mweb_1       |e[0m 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
e[33mweb_1       |e[0m 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
e[33mweb_1       |e[0m 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
e[33mweb_1       |e[0m 	at java.lang.reflect.Method.invoke(Method.java:498)
e[33mweb_1       |e[0m 	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333)
e[33mweb_1       |e[0m 	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207)
e[33mweb_1       |e[0m 	at com.sun.proxy.$Proxy183.createReport(Unknown Source)
e[33mweb_1       |e[0m 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
e[33mweb_1       |e[0m 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
e[33mweb_1       |e[0m 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
e[33mweb_1       |e[0m 	at java.lang.reflect.Method.invoke(Method.java:498)
e[33mweb_1       |e[0m 	at org.springframework.remoting.support.RemoteInvocation.invoke(RemoteInvocation.java:212)
e[33mweb_1       |e[0m 	at com.haulmont.cuba.core.sys.remoting.CubaRemoteInvocationExecutor.invoke(CubaRemoteInvocationExecutor.java:109)
e[33mweb_1       |e[0m 	at org.springframework.remoting.support.RemoteInvocationBasedExporter.invoke(RemoteInvocationBasedExporter.java:78)
e[33mweb_1       |e[0m 	at org.springframework.remoting.support.RemoteInvocationBasedExporter.invokeAndCreateResult(RemoteInvocationBasedExporter.java:114)
e[33mweb_1       |e[0m 	at com.haulmont.cuba.core.sys.remoting.HttpServiceExporter.handleRequest(HttpServiceExporter.java:77)
e[33mweb_1       |e[0m 	at org.springframework.web.servlet.mvc.HttpRequestHandlerAdapter.handle(HttpRequestHandlerAdapter.java:51)
e[33mweb_1       |e[0m 	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:963)
e[33mweb_1       |e[0m 	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:897)
e[33mweb_1       |e[0m 	at com.haulmont.cuba.core.sys.remoting.RemotingServlet.doService(RemotingServlet.java:149)
e[33mweb_1       |e[0m 	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)
e[33mweb_1       |e[0m 	at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:872)
e[33mweb_1       |e[0m 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:648)
e[33mweb_1       |e[0m 	at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)
e[33mweb_1       |e[0m 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
e[33mweb_1       |e[0m 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)
e[33mweb_1       |e[0m 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
e[33mweb_1       |e[0m 	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
e[33mweb_1       |e[0m 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
e[33mweb_1       |e[0m 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
e[33mweb_1       |e[0m 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
e[33mweb_1       |e[0m 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:94)
e[33mweb_1       |e[0m 	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504)
e[33mweb_1  

:evergreen_tree: The text has been truncated to the first 30000 characters.

Hi,

we use LibreOffice in Docker inside Travis CI, see our config here: https://github.com/cuba-platform/yarg/blob/master/.travis.yml

It seems that reporting.openoffice.path must end with /. Could you try to change the path ?

Hi Yuriy,

Thanks for the prompt answer. I could not really understand how to apply the construct in the .travis.yml to my own situation.

I ended up using this additional command to the Dockerfile:


# Add LibreOffice for reporting
RUN apt-get update && apt-get -y -q install libreoffice

This works well but it seems not the best solution as the LibreOffice package is rather big. But I’m unable to see another solution.

Thanks for the support anyway.

Thank you for sharing the command.

In case of docker if you want to reduce time of image building you can only build your own image with preinstalled openjdk8 and libreoffice and then reuse it with all your application builds.

Of course, that’s how to do it. I totally missed it while trying to get something working.

Come to think of it, it would be great to have a ready to go CUBA.platform docker definition with all the stuff required to deploy an application. I think I will make my setup in this direction and share it if appropriate. But it might be an idea for you as well to have something provided out-of-the-box.

I know Mario David did a great job on setting things up in Docker with the CUBA platform (https://www.road-to-cuba-and-beyond.com/put-a-island-into-a-box-how-to-dockerize-your-cuba-app/) but it might be even better when there is the image as I’m thinking of now.

Anyway, thanks again for your support and pointing to the right direction.

Obviously, this wasn’t too hard to do so here it is.

First created a CUBA image based on this Dockerfile:


### Dockerfile

# Base Image: official tomcat 8 image, with jre 8 underneath
FROM tomcat:8-jre8

# Add LibreOffice for reporting
RUN apt-get update && apt-get -y -q install libreoffice

# Add tomcat users file for manager app
ADD container-files/tomcat-users.xml /usr/local/tomcat/conf/

# Add context config file for the application
ADD container-files/context.xml /usr/local/tomcat/conf/

# copy logback.xml config in the container
ADD container-files/logback.xml /opt/cuba_home/

# copy index.jsp so that we get an automatic redirect
# ADD container-files/index.jsp /usr/local/tomcat/webapps/ROOT/index.jsp
# do not use this myself

# set CATALINA_OPTS env variable to point to logback config file and app home directory
ENV CATALINA_OPTS="-Dlogback.configurationFile=/opt/cuba_home/logback.xml -Dapp.home=/opt/cuba_home"

Build the image by:


$ docker build -t cuba .

Then the application itself (of which I’m running multiple instances):


### Dockerfile

# Base Image: the CUBA platform image that we assembled
FROM cuba

# Add generated app war files to the webapps directory
ADD war/app.war /usr/local/tomcat/webapps/app.war
ADD war/app-core.war /usr/local/tomcat/webapps/app-core.war

# set env variables to use from docker container
ENV POSTGRES_CONTAINER=postgres
ENV POSTGRES_USER=postgres
ENV POSTGRES_PW=postgres
ENV POSTGRES_PORT=5432
ENV POSTGRES_DB=db

# set CATALINA_OPTS env variable to add application specific defines
ENV CATALINA_OPTS "Dpostgres.container=postgres -Dpostgres.user=postgres -Dpostgres.pw=postgres -Dpostgres.db=db -Dpostgres.port=5432 -Dcuba.webHostName=server.com -Dcuba.webAppUrl=https://server.com/app-Dcuba.connectionUrlList=https://server.com/app-core"

# Add postgres driver
ADD https://jdbc.postgresql.org/download/postgresql-9.4.1212.jar /usr/local/tomcat/lib/postgresql.jar

And of course combing this with the postgress db image as stated by Mario David (see previous post).

I’ve put the postgres variables into the application part as it might change per app. As I’m using multiple application I’m doing some reverse-proxying using nginx therefore the CUBA app property overrides are added as well.

There is probably some room for improvement as I’ve just patched this together quickly but it may be of help to someone else anyway.

By the way, I have bumped into the same need recently, and I wander what’s the reason the team decided to use local OOServer always using 127.0.0.1 in the code? The size of an image runs up significantly and these ADD takes some time to execute each time a build is executed. Would it be better to provide ability to run Office (or may be even several ones) and connect to them remotely on demand? I’d like to now are there any issues since I am considering to try implement this?

Thanks in advance.

Regards,
Ilia.

Hi Ilia. I think that would be a great approach but I haven’t seen an opportunity to do it that way. The ADD takes some time indeed but in my setup, this is done only once and then all other applications reuse it. That still keeps the image size rather big thou.

I currently have a slightly different configuration running than stated above but the idea is still the same. And it works ok so I don’t think there are any issues to consider in this respect.

Yes, it has to do with the YARG implementation and integration glue code.