Custom content transformation : is there a limited size for string in bean values

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-08-2013 06:56 AM
Hello,
I tried to configure a new transformation type from PCL file to PDF using pcl6 lib. (under alfresco 3.4d / debian7)
When I try to convert a file from explorer, I have a error :
<blockquote>
Please correct the errors below then click Finish.
Failed to run Actions due to error: 09080003 Content conversion failed: reader: ContentAccessor[ contentUrl=store://2013/10/7/13/52/b47e6c5b-c3fd-4eec-a3aa-45d4a4ed56b0.bin, mimetype=text/pcl, size=2588, encoding=ibm437, locale=en_US] writer: ContentAccessor[ contentUrl=store://2013/10/8/12/22/01e4e2cc-9929-4858-acb8-dba147a8465a.bin, mimetype=application/pdf, size=0, encoding=ibm437, locale=en_US] options: org.alfresco.service.cmr.repository.TransformationOptions@ed1dfe
</blockquote>
In the temp files of alfresco, I have both the source and target files, except that the target one is 0 ko.
In fact the command seam to be troncated in the logs. And if I try to execute directly the right command in the shell I do not have the problem.
<strong>New content transformer in /extension : </strong>
I also created a new mime/type for PCL –> OK (I can see it in alfresco/service/mimetype/)
<strong>Here are my log : </strong>
Do you have any clue? Is my command string too long?
thanks
I tried to configure a new transformation type from PCL file to PDF using pcl6 lib. (under alfresco 3.4d / debian7)
When I try to convert a file from explorer, I have a error :
<blockquote>
Please correct the errors below then click Finish.
Failed to run Actions due to error: 09080003 Content conversion failed: reader: ContentAccessor[ contentUrl=store://2013/10/7/13/52/b47e6c5b-c3fd-4eec-a3aa-45d4a4ed56b0.bin, mimetype=text/pcl, size=2588, encoding=ibm437, locale=en_US] writer: ContentAccessor[ contentUrl=store://2013/10/8/12/22/01e4e2cc-9929-4858-acb8-dba147a8465a.bin, mimetype=application/pdf, size=0, encoding=ibm437, locale=en_US] options: org.alfresco.service.cmr.repository.TransformationOptions@ed1dfe
</blockquote>
In the temp files of alfresco, I have both the source and target files, except that the target one is 0 ko.
In fact the command seam to be troncated in the logs. And if I try to execute directly the right command in the shell I do not have the problem.
<strong>New content transformer in /extension : </strong>
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd"><beans> <!– Content Transformations –> <bean id="transformer.worker.pcl6" class="org.alfresco.repo.content.transform.RuntimeExecutableContentTransformerWorker"> <property name="checkCommand"> <bean class="org.alfresco.util.exec.RuntimeExec"> <property name="commandsAndArguments"> <map> <entry key=".*"> <list> <value>ls</value> <value>/usr/local/bin/pcl6</value> </list> </entry> </map> </property> </bean> </property> <property name="transformCommand"> <bean class="org.alfresco.util.exec.RuntimeExec"> <property name="commandsAndArguments"> <map> <entry key=".*"> <list> <value>pcl6 -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile=${target} ${source}</value> </list> </entry> </map> </property> <property name="waitForCompletion"> <value>true</value> </property> </bean> </property> <property name="explicitTransformations"> <list> <!– Transform PCL to PDF –> <bean class="org.alfresco.repo.content.transform.ExplictTransformationDetails"> <property name="sourceMimetype"> <value>text/pcl</value> </property> <property name="targetMimetype"> <value>application/pdf</value> </property> </bean> </list> </property> <property name="mimetypeService"> <ref bean="mimetypeService"/> </property> </bean> <bean id="transformer.pcl6" class="org.alfresco.repo.content.transform.ProxyContentTransformer" parent="baseContentTransformer"> <property name="worker"> <ref bean="transformer.worker.pcl6" /> </property> </bean></beans>
I also created a new mime/type for PCL –> OK (I can see it in alfresco/service/mimetype/)
<strong>Here are my log : </strong>
12:22:29,612 User:admin ERROR [ui.common.Utils] Failed to run Actions due to error: 09080003 Content conversion failed: reader: ContentAccessor[ contentUrl=store://2013/10/7/13/52/b47e6c5b-c3fd-4eec-a3aa-45d4a4ed56b0.bin, mimetype=text/pcl, size=2588, encoding=ibm437, locale=en_US] writer: ContentAccessor[ contentUrl=store://2013/10/8/12/22/01e4e2cc-9929-4858-acb8-dba147a8465a.bin, mimetype=application/pdf, size=0, encoding=ibm437, locale=en_US] options: org.alfresco.service.cmr.repository.TransformationOptions@ed1dfeorg.alfresco.service.cmr.repository.ContentIOException: 09080003 Content conversion failed: reader: ContentAccessor[ contentUrl=store://2013/10/7/13/52/b47e6c5b-c3fd-4eec-a3aa-45d4a4ed56b0.bin, mimetype=text/pcl, size=2588, encoding=ibm437, locale=en_US] writer: ContentAccessor[ contentUrl=store://2013/10/8/12/22/01e4e2cc-9929-4858-acb8-dba147a8465a.bin, mimetype=application/pdf, size=0, encoding=ibm437, locale=en_US] options: org.alfresco.service.cmr.repository.TransformationOptions@ed1dfe at org.alfresco.repo.content.transform.AbstractContentTransformer2.transform(AbstractContentTransformer2.java:177) at org.alfresco.repo.content.ContentServiceImpl.transform(ContentServiceImpl.java:555) 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:307) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) at net.sf.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:80) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.alfresco.repo.model.ml.MLContentInterceptor.invoke(MLContentInterceptor.java:125) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:44) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.alfresco.repo.audit.AuditMethodInterceptor.proceed(AuditMethodInterceptor.java:160) at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:137) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) at $Proxy42.transform(Unknown Source) at org.alfresco.repo.action.executer.TransformActionExecuter.doTransform(TransformActionExecuter.java:305) at org.alfresco.repo.action.executer.TransformActionExecuter.executeImpl(TransformActionExecuter.java:270) at org.alfresco.repo.action.executer.ActionExecuterAbstractBase.execute(ActionExecuterAbstractBase.java:133) at org.alfresco.repo.action.ActionServiceImpl.directActionExecution(ActionServiceImpl.java:749) at org.alfresco.repo.action.ActionServiceImpl.executeActionImpl(ActionServiceImpl.java:675) at org.alfresco.repo.action.ActionServiceImpl.executeAction(ActionServiceImpl.java:540) at org.alfresco.repo.action.ActionServiceImpl.executeAction(ActionServiceImpl.java:526) at org.alfresco.repo.action.ActionServiceImpl.executeAction(ActionServiceImpl.java:758) 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:307) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) at org.alfresco.repo.security.permissions.impl.AlwaysProceedMethodInterceptor.invoke(AlwaysProceedMethodInterceptor.java:34) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:44) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.alfresco.repo.audit.AuditMethodInterceptor.proceedWithAudit(AuditMethodInterceptor.java:217) at org.alfresco.repo.audit.AuditMethodInterceptor.proceed(AuditMethodInterceptor.java:184) at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:137) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) at $Proxy34.executeAction(Unknown Source) at org.alfresco.web.bean.actions.RunActionWizard.finishImpl(RunActionWizard.java:95) at org.alfresco.web.bean.dialog.BaseDialogBean$1.execute(BaseDialogBean.java:118) at org.alfresco.web.bean.dialog.BaseDialogBean$1.execute(BaseDialogBean.java:114) at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:381) at org.alfresco.web.bean.dialog.BaseDialogBean.finish(BaseDialogBean.java:124) at org.alfresco.web.bean.wizard.WizardManager.finish(WizardManager.java:593) 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.GeneratedMethodAccessor385.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 $Proxy196.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.GeneratedMethodAccessor385.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 $Proxy196.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.web.app.servlet.GlobalLocalizationFilter.doFilter(GlobalLocalizationFilter.java:58) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) at java.lang.Thread.run(Thread.java:619)Caused by: org.alfresco.service.cmr.repository.ContentIOException: 09080002 Transformation failed - status indicates an error: Execution result: os: Linux command: [pcl6 -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile=/opt/alfresco-3.4.d/tomcat/temp/Alfresco/RuntimeExecutableContentTransformerWorker_target_7527439725423708087.pdf /opt/alfresco-3.4.d/tomcat/temp/Alfresco/RuntimeExecutableContentTransformerWorker_source_9210153889535265169.pcl] succeeded: false exit code: 1 out: err: Cannot run program "pcl6 -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile=/opt/alfresco-3.4.d/tomcat/temp/Alfresco/RuntimeExecutableContentTransformerWorker_target_7527439725423708087.pdf /opt/alfresco-3.4.d/tomcat/temp/Alfresco/RuntimeExecutableContentTrans at org.alfresco.repo.content.transform.RuntimeExecutableContentTransformerWorker.transform(RuntimeExecutableContentTransformerWorker.java:272) at org.alfresco.repo.content.transform.ProxyContentTransformer.transformInternal(ProxyContentTransformer.java:68) at org.alfresco.repo.content.transform.AbstractContentTransformer2.transform(AbstractContentTransformer2.java:161) … 104 more
Do you have any clue? Is my command string too long?
thanks
Labels:
- Labels:
-
Archive
1 REPLY 1

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-08-2013 08:53 AM
OK I've got it !
the shell call was not the right one :
I modified
by
This corrected the problem
the shell call was not the right one :
I modified
<entry key=".*"> <list> <value>pcl6 -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile=${target} ${source}</value> </list> </entry>
by
<entry key="Linux"> <list> <value>sh</value> <value>-c</value> <value>/usr/local/bin/pcl6 -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile=${target} ${source}</value> </list> </entry>
This corrected the problem
