AnsweredAssumed Answered

OpenOffice on RHEL 5

Question asked by samuel.penn on Aug 1, 2008
Latest reply on May 15, 2009 by chaibi
Hi all,

I'm trying to get OpenOffice integration working against Alfresco 2.2 on RHEL 5, and I'm running into some issues. It just seems to work on our Gentoo setup, so I don't know whether it's something to do with the RedHat open office package, or something else.

Firstly, having installed the headless version of openoffice, I still need to add a "-display :0" parameter to the openoffice startup. My script to start openoffice looks like this:


/usr/lib/openoffice.org/program/soffice "-accept=socket,host=0.0.0.0,port=8100;urp;StarOffice.ServiceManager" "-env:UserInstallation=file:///opt/alfresco/oouser" -nologo -headless -nofirststartwizard -display :0 &

If I don't include a display parameter, then it complains that DISPLAY isn't set. I've also set the custom-content-services-context.xml to talk to 127.0.0.1, otherwise Alfresco seems to try to resolve localhost to an IPv6 address, and fails to find OpenOffice at all.

Alfresco starts, and seems to pick up OpenOffice. If I try to transform a file from MS-Word to PDF, then it gives me an error as follows:


11:59:17,548 ERROR [org.alfresco.web.ui.common.Utils] Failed to run Actions due to error: Content co
nversion failed:
   reader: ContentAccessor[ contentUrl=store://2008/7/28/15/29/891dc837-5cb1-11dd-8b28-c119e2c1bf70.
bin, mimetype=application/msword, size=94208, encoding=UTF-8, locale=en_US]
   writer: ContentAccessor[ contentUrl=store://2008/8/1/11/59/e2bde68d-5fb8-11dd-b0fc-519e6bbd05cf.b
in, mimetype=application/pdf, size=0, encoding=UTF-8, locale=en_US]
   options: {}
org.alfresco.service.cmr.repository.ContentIOException: Content conversion failed:
   reader: ContentAccessor[ contentUrl=store://2008/7/28/15/29/891dc837-5cb1-11dd-8b28-c119e2c1bf70.
bin, mimetype=application/msword, size=94208, encoding=UTF-8, locale=en_US]
   writer: ContentAccessor[ contentUrl=store://2008/8/1/11/59/e2bde68d-5fb8-11dd-b0fc-519e6bbd05cf.b
in, mimetype=application/pdf, size=0, encoding=UTF-8, locale=en_US]
   options: {}
        at org.alfresco.repo.content.transform.AbstractContentTransformer.transform(AbstractContentT
ransformer.java:255)
        at org.alfresco.repo.content.transform.AbstractContentTransformer.transform(AbstractContentT
ransformer.java:210)
        at org.alfresco.repo.content.RoutingContentService.transform(RoutingContentService.java:468)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:281
)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMe
thodInvocation.java:187)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvo
cation.java:154)
        at net.sf.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor.invoke(Method
SecurityInterceptor.java:80)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvo
cation.java:176)
        at org.alfresco.repo.model.ml.MLContentInterceptor.invoke(MLContentInterceptor.java:131)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvo
cation.java:176)
        at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(E
xceptionTranslatorMethodInterceptor.java:49)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvo
cation.java:176)
        at org.alfresco.repo.audit.AuditComponentImpl.audit(AuditComponentImpl.java:245)
        at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:69)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvo
cation.java:176)
        at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInte
rceptor.java:107)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvo
cation.java:176)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:210)
        at $Proxy27.transform(Unknown Source)
        at org.alfresco.repo.action.executer.TransformActionExecuter.doTransform(TransformActionExec
uter.java:309)
        at org.alfresco.repo.action.executer.TransformActionExecuter.executeImpl(TransformActionExec
uter.java:284)
        at org.alfresco.repo.action.executer.ActionExecuterAbstractBase.execute(ActionExecuterAbstra
ctBase.java:120)
        at org.alfresco.repo.action.ActionServiceImpl.directActionExecution(ActionServiceImpl.java:5
37)
        at org.alfresco.repo.action.ActionServiceImpl.executeActionImpl(ActionServiceImpl.java:472)
        at org.alfresco.repo.action.ActionServiceImpl.executeAction(ActionServiceImpl.java:399)
        at org.alfresco.repo.action.ActionServiceImpl.executeAction(ActionServiceImpl.java:387)
        at org.alfresco.repo.action.ActionServiceImpl.executeAction(ActionServiceImpl.java:545)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:281
)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMe
thodInvocation.java:187)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvo
cation.java:154)
        at org.alfresco.repo.security.permissions.impl.AlwaysProceedMethodInterceptor.invoke(AlwaysP
roceedMethodInterceptor.java:40)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvo
cation.java:176)
        at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(E
xceptionTranslatorMethodInterceptor.java:49)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvo
cation.java:176)
        at org.alfresco.repo.audit.AuditComponentImpl.audit(AuditComponentImpl.java:245)
        at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:69)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvo
cation.java:176)
        at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInte
rceptor.java:107)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvo
cation.java:176)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:210)
        at $Proxy18.executeAction(Unknown Source)
        at org.alfresco.web.bean.actions.RunActionWizard.finishImpl(RunActionWizard.java:101)
        at org.alfresco.web.bean.dialog.BaseDialogBean$1.execute(BaseDialogBean.java:122)
        at org.alfresco.web.bean.dialog.BaseDialogBean$1.execute(BaseDialogBean.java:119)
        at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransacti
onHelper.java:241)
        at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransacti
onHelper.java:171)
        at org.alfresco.web.bean.dialog.BaseDialogBean.finish(BaseDialogBean.java:128)
        at org.alfresco.web.bean.wizard.WizardManager.finish(WizardManager.java:540)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:132)
        at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:6
1)
        at javax.faces.component.UICommand.broadcast(UICommand.java:109)
        at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:97)
        at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:171)
        at org.apache.myfaces.lifecycle.InvokeApplicationExecutor.execute(InvokeApplicationExecutor.
java:32)
        at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:95)
        at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:70)
        at javax.faces.webapp.FacesServlet.service(FacesServlet.java:139)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.j
ava:269)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)

        at org.alfresco.web.app.servlet.AuthenticationFilter.doFilter(AuthenticationFilter.java:81)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.j
ava:215)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)

        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)
        at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Htt
p11BaseProtocol.java:665)
        at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
        at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.ja
va:81)
        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
        at java.lang.Thread.run(Thread.java:619)



Caused by: org.alfresco.service.cmr.repository.ContentIOException: OpenOffice server conversion failed:
   reader: ContentAccessor[ contentUrl=store://2008/7/28/15/29/891dc837-5cb1-11dd-8b28-c119e2c1bf70.bin, mimetype=application/msword, size=94208, encoding=UTF-8, locale=en_US]
   writer: ContentAccessor[ contentUrl=store://2008/8/1/11/59/e2bde68d-5fb8-11dd-b0fc-519e6bbd05cf.bin, mimetype=application/pdf, size=0, encoding=UTF-8, locale=en_US]
   from file: /opt/alfresco/tomcat/temp/Alfresco/OpenOfficeContentTransformer-source-56669.doc
   to file: /opt/alfresco/tomcat/temp/Alfresco/OpenOfficeContentTransformer-target-56670.pdf
        at org.alfresco.repo.content.transform.OpenOfficeContentTransformer.transformInternal(OpenOfficeContentTransformer.java:225)
        at org.alfresco.repo.content.transform.AbstractContentTransformer.transform(AbstractContentTransformer.java:246)
        … 85 more
Caused by: net.sf.jooreports.openoffice.connection.OpenOfficeException: conversion failed; com.sun.star.lang.IllegalArgumentException: URL seems to be an unsupported one.

I've inserted some blank lines just before the last part of the log where it seems to have useful information. Looking in the tomcat temp directory, the doc file referenced above exists, and there is an empty pdf file. I'm guessing that the important error is "URL seems to be an unsupported one". Alfresco and OpenOffice are both running as root.

Any help greatly appreciated, thanks.

Sam.

Outcomes