YARG : com.sun.star.lib.uno.bridges.java_remote.java_remote_bridge@26cc3fd6 is disposed

Hi

After some days being up my app suddenly raised the exception in reference when launching a report (detailed trace below).

From my readings (here and here) I understand that connectors to Office API should be renewed from time to time, or at least when this exception happens.

It was on a dev machine who is up 24/7, so restarting the app did the job but I’m afraid that it could happen in production environment. Restarting the server in production environment is not that easy.

Is there something I can do to prevent that ?

java.lang.RuntimeException: com.haulmont.yarg.exception.ReportingException: An error occurred while running task in Open Office server
	at com.haulmont.reports.libintegration.CubaOfficeIntegration.runTaskWithTimeout(CubaOfficeIntegration.java:53)
	at com.haulmont.yarg.formatters.impl.xls.DocumentConverterImpl.convertOnes(DocumentConverterImpl.java:91)
	at com.haulmont.yarg.formatters.impl.xls.DocumentConverterImpl.convertWithRetry(DocumentConverterImpl.java:69)
	at com.haulmont.yarg.formatters.impl.xls.DocumentConverterImpl.convertToPdf(DocumentConverterImpl.java:48)
	at com.haulmont.yarg.formatters.impl.XlsxFormatter.saveAndClose(XlsxFormatter.java:142)
	at com.haulmont.yarg.formatters.impl.XlsxFormatter.renderDocument(XlsxFormatter.java:120)
	at com.haulmont.yarg.reporting.Reporting.generateReport(Reporting.java:133)
	at com.haulmont.yarg.reporting.Reporting.runReport(Reporting.java:100)
	at com.haulmont.yarg.reporting.Reporting.runReport(Reporting.java:83)
	at com.busy.app.core.reports.ExtReportingBean.createReportDocument(ExtReportingBean.java:56)
	at com.haulmont.reports.ReportingBean.createReportDocument(ReportingBean.java:284)
	at com.haulmont.reports.ReportingBean.createReport(ReportingBean.java:188)
	at com.haulmont.reports.ReportServiceBean.createReport(ReportServiceBean.java:35)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
	at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:85)
	at com.haulmont.cuba.core.sys.ServiceInterceptor.aroundInvoke(ServiceInterceptor.java:117)
	at sun.reflect.GeneratedMethodAccessor244.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:629)
	at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:618)
	at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:70)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:168)
	at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)
	at com.sun.proxy.$Proxy311.createReport(Unknown Source)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at com.haulmont.cuba.core.sys.remoting.LocalServiceInvokerImpl.invoke(LocalServiceInvokerImpl.java:94)
	at com.haulmont.cuba.web.sys.remoting.LocalServiceProxy$LocalServiceInvocationHandler.invoke(LocalServiceProxy.java:154)
	at com.sun.proxy.$Proxy60.createReport(Unknown Source)
	at com.haulmont.reports.gui.ReportGuiManager.getReportResult(ReportGuiManager.java:265)
	at com.busy.app.web.reports.ExtReportGuiManager$1.run(ExtReportGuiManager.java:63)
	at com.busy.app.web.reports.ExtReportGuiManager$1.run(ExtReportGuiManager.java:58)
	at com.haulmont.cuba.gui.backgroundwork.LocalizedTaskWrapper.run(LocalizedTaskWrapper.java:54)
	at com.haulmont.cuba.web.gui.executors.impl.WebBackgroundWorker$WebTaskExecutor.call(WebBackgroundWorker.java:205)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at com.haulmont.cuba.web.gui.executors.impl.WebBackgroundWorker$WebTaskExecutor.lambda$startExecution$1(WebBackgroundWorker.java:376)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
Caused by: com.haulmont.yarg.exception.ReportingException: An error occurred while running task in Open Office server
	at com.haulmont.yarg.formatters.impl.xls.DocumentConverterImpl.lambda$convertOnes$0(DocumentConverterImpl.java:88)
	at com.haulmont.reports.libintegration.CubaOfficeIntegration.lambda$null$0(CubaOfficeIntegration.java:35)
	at com.haulmont.cuba.core.sys.AppContext.withSecurityContext(AppContext.java:179)
	at com.haulmont.reports.libintegration.CubaOfficeIntegration.lambda$runTaskWithTimeout$1(CubaOfficeIntegration.java:33)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	... 3 common frames omitted
Caused by: com.sun.star.lang.DisposedException: java_remote_bridge com.sun.star.lib.uno.bridges.java_remote.java_remote_bridge@26cc3fd6 is disposed
	at com.sun.star.lib.uno.bridges.java_remote.java_remote_bridge.checkDisposed(java_remote_bridge.java:715)
	at com.sun.star.lib.uno.bridges.java_remote.java_remote_bridge.sendRequest(java_remote_bridge.java:634)
	at com.sun.star.lib.uno.bridges.java_remote.ProxyFactory$Handler.request(ProxyFactory.java:154)
	at com.sun.star.lib.uno.bridges.java_remote.ProxyFactory$Handler.invoke(ProxyFactory.java:136)
	at com.sun.proxy.$Proxy458.getServiceManager(Unknown Source)
	at com.haulmont.yarg.formatters.impl.doc.connector.OfficeResourceProvider.createDesktop(OfficeResourceProvider.java:151)
	at com.haulmont.yarg.formatters.impl.doc.connector.OfficeResourceProvider.getXComponentLoader(OfficeResourceProvider.java:73)
	at com.haulmont.yarg.formatters.impl.doc.connector.OfficeResourceProvider.loadXComponent(OfficeResourceProvider.java:88)
	at com.haulmont.yarg.formatters.impl.xls.DocumentConverterImpl.lambda$convertOnes$0(DocumentConverterImpl.java:85)
	... 7 common frames omitted
13:51:05.996 ERROR [BackgroundTask-1-admin] c.h.c.gui.executors.BackgroundWorker - Exception occurred in background task
com.haulmont.cuba.core.global.RemoteException: java_remote_bridge com.sun.star.lib.uno.bridges.java_remote.java_remote_bridge@26cc3fd6 is disposed
	at com.haulmont.cuba.core.sys.ServiceInterceptor.aroundInvoke(ServiceInterceptor.java:129)
	at sun.reflect.GeneratedMethodAccessor244.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:629)
	at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:618)
	at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:70)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:168)
	at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)
	at com.sun.proxy.$Proxy311.createReport(Unknown Source)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at com.haulmont.cuba.core.sys.remoting.LocalServiceInvokerImpl.invoke(LocalServiceInvokerImpl.java:94)
	at com.haulmont.cuba.web.sys.remoting.LocalServiceProxy$LocalServiceInvocationHandler.invoke(LocalServiceProxy.java:154)
	at com.sun.proxy.$Proxy60.createReport(Unknown Source)
	at com.haulmont.reports.gui.ReportGuiManager.getReportResult(ReportGuiManager.java:265)
	at com.busy.app.web.reports.ExtReportGuiManager$1.run(ExtReportGuiManager.java:63)
	at com.busy.app.web.reports.ExtReportGuiManager$1.run(ExtReportGuiManager.java:58)
	at com.haulmont.cuba.gui.backgroundwork.LocalizedTaskWrapper.run(LocalizedTaskWrapper.java:54)
	at com.haulmont.cuba.web.gui.executors.impl.WebBackgroundWorker$WebTaskExecutor.call(WebBackgroundWorker.java:205)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at com.haulmont.cuba.web.gui.executors.impl.WebBackgroundWorker$WebTaskExecutor.lambda$startExecution$1(WebBackgroundWorker.java:376)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)

I have the same error occurring in production server as well.

Appreciate if anyone can help to resolve.

1 Like

Hello,
Try increasing the timeout as indicated here.

Regards,
Nikita