***Error 应用 Alfresco Rule 将 Word Doc 转换为 PDF

Posted

技术标签:

【中文标题】***Error 应用 Alfresco Rule 将 Word Doc 转换为 PDF【英文标题】:***Error While applying Alfresco Rule to convert Word Doc to PDF 【发布时间】:2012-10-04 10:06:38 【问题描述】:

我正在尝试针对以下目标:

使用 WebDav 或抛出 Alfresco(社区):当前版本 3.4.0 (d 3370) 架构 4113 管理界面,我正在尝试上传 Microsoft Office 2003/2007 或 OpenOffice /LibreOffice 文档到 Alfresco 存储库并使用与相关节点关联的规则,将文档转换为 PDF 格式。

Alfresco 实例在 WnXP 上运行,LibreOffice 在 CentOS 6.4

上作为无头实例运行

我按照此处引用的链接将 OpenOffice 支持添加到我的 Alfresco 实例,但实际上似乎不起作用。尝试启动规则时出现异常。

链接:

http://wiki.alfresco.com/wiki/Setting_up_OpenOffice_for_Alfresco

例外:

ERROR;04/10/2012 16:48:55;;;[Utils];Failed to create content due to error: 09040000 Exception in Transaction.
org.alfresco.error.AlfrescoRuntimeException: 09040000 Exception in Transaction.
at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:466)
at org.alfresco.web.bean.dialog.BaseDialogBean.finish(BaseDialogBean.java:124)
at org.alfresco.web.bean.dialog.DialogManager.finish(DialogManager.java:528)
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:61)
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.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.alfresco.web.app.servlet.AuthenticationFilter.doFilter(AuthenticationFilter.java:104)
at sun.reflect.GeneratedMethodAccessor416.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.alfresco.repo.management.subsystems.ChainingSubsystemProxyFactory$1.invoke(ChainingSubsystemProxyFactory.java:116)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
at $Proxy232.doFilter(Unknown Source)
at org.alfresco.repo.web.filter.beans.BeanProxyFilter.doFilter(BeanProxyFilter.java:82)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.alfresco.repo.web.filter.beans.NullFilter.doFilter(NullFilter.java:68)
at sun.reflect.GeneratedMethodAccessor416.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.alfresco.repo.management.subsystems.ChainingSubsystemProxyFactory$1.invoke(ChainingSubsystemProxyFactory.java:116)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)Caused by: java.lang.***Error
at org.springframework.beans.factory.support.AbstractBeanFactory.transformedBeanName(AbstractBeanFactory.java:951)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:229)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:265)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:189)
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1004)
at org.alfresco.repo.management.subsystems.SubsystemProxyFactory$1.invoke(SubsystemProxyFactory.java:69)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
at $Proxy98.isConnected(Unknown Source)

我的配置: tomcat/shared/classes/alfresco-global.properties

module.id=org.alfresco.remoteOpenOffice
module.version=0.1
module.title=Remote OpenOffice
module.repo.version.min=2.2
ooo.host=192.168.14.67
ooo.port=8100
ooo.enabled=true

tomcat/shared/classes/alfresco/extension/remote-openoffice-context.xml

<bean id="openOfficeConnection" class="net.sf.jooreports.openoffice.connection.SocketOpenOfficeConnection">
<constructor-arg type="java.lang.String" value="192.168.14.67"/>
<constructor-arg type="int" value="8100"/>
 </bean>
 <bean id="transformer.OpenOffice" class="org.alfresco.repo.content.transform.RemoteOpenOfficeContentTransformer" parent="baseContentTransformer" >
<property name="connection">
    <ref bean="openOfficeConnection" />
</property>
<property name="documentFormatsConfiguration">
    <value>classpath:alfresco/mimetype/openoffice-document-formats.xml</value>
</property>
 </bean>

并添加了 tomcat/shared/classes/alfresco/mimetype/openoffice-document-formats.xml

Alfresco 主机和 openOffice 主机之间没有防火墙

提前致谢

【问题讨论】:

完整的例外是什么?看起来你只发布了部分内容 这是唯一的例外,但它重复了很多次 以“at ...”开头的那一行很重要,它告诉我们异常是什么! 我刚刚完成了堆栈,因为碰巧未正确配置附加程序 应该还有一个或两个“Caused by...”条目,这将向我们展示转换失败的原因 - 跟踪的那一点只告诉我们它失败但不是原因失败 【参考方案1】:

***Error 通常是由无限(或至少过度)递归引起的。既然你提到了一个规则,那么你的规则的结果(例如修改或创建一个节点)是否有可能再次触发规则,导致无穷无尽的序列?

您使用的规则到底是什么?例如,它会触发任何 mimetype,还是仅触发 Word 文档?

该文件夹中只有一个规则还是多个?

【讨论】:

感谢您的关注,实际上,每当我添加 MSWord/2007 文档时,都会调用一个规则。在引发错误之前,该节点不包含任何文档。

以上是关于***Error 应用 Alfresco Rule 将 Word Doc 转换为 PDF的主要内容,如果未能解决你的问题,请参考以下文章

Alfresco Share - 搜索不适用于非管理员用户

在运行QT中出现 error: No rule to make target `c:/Documents', needed by `debug/Documents.o'

仅集成 Alfresco 的 DM(文档管理)

创建仅显示 Alfresco Share 文件夹结构的自定义页面

Alfresco 附加的 word 文档无法使用 ms office 在线编辑

Protel DXP自动布线时报错 Error : Pad U12-10 Appears to be unroutable. Violation against Rule - Clea