• Cant conwert to .SWF

  • OpenKM has many interesting features, but requires some configuration process to show its full potential.
OpenKM has many interesting features, but requires some configuration process to show its full potential.
Forum rules: Please, before asking something see the documentation wiki or use the search feature of the forum. And remember we don't have a crystal ball or mental readers, so if you post about an issue tell us which OpenKM are you using and also the browser and operating system version. For more info read How to Report Bugs Effectively.
 #8597  by Swartor
 
Hi i search the forum and wiki and i cant find any isue for my problem.
I put the instance of OpenKM 5.0.1 on Ubuntu 10.10 i don`t need much i only wont to documents preview and im in half way to it. My OpenKM converts doc odt bmp (i check only this 3) to pdf (located in cache/pdf directory) but it cant convert them to SWF and i don't know what is wrong.
When i make the transformation on my own using command "pdf2swf file.pdf -o file.swf" everything is ok

here is the error from console
Code: Select all
15:58:26,626 ERROR [OKMDownloadServlet] /opt/jboss-4.2.3.GA/cache/swf/43adccad-d9c3-4d82-ab4c-c318db9c30ac.swf (No such file or directory)
java.io.FileNotFoundException: /opt/jboss-4.2.3.GA/cache/swf/43adccad-d9c3-4d82-ab4c-c318db9c30ac.swf (No such file or directory)
	at java.io.FileInputStream.open(Native Method)
	at java.io.FileInputStream.<init>(FileInputStream.java:137)
	at com.openkm.frontend.server.OKMDownloadServlet.service(OKMDownloadServlet.java:171)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
	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:230)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
	at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
	at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
	at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
	at java.lang.Thread.run(Thread.java:636)
15:58:58,630 WARN  [DocConverter] Abnormal program termination: {}2
15:58:58,631 WARN  [DocConverter] STDERR: /usr/bin/pdf2swf: 1: Syntax error: "(" unexpected

15:58:58,632 ERROR [OKMDownloadServlet] /opt/jboss-4.2.3.GA/cache/swf/43adccad-d9c3-4d82-ab4c-c318db9c30ac.swf (No such file or directory)
java.io.FileNotFoundException: /opt/jboss-4.2.3.GA/cache/swf/43adccad-d9c3-4d82-ab4c-c318db9c30ac.swf (No such file or directory)
	at java.io.FileInputStream.open(Native Method)
	at java.io.FileInputStream.<init>(FileInputStream.java:137)
	at com.openkm.frontend.server.OKMDownloadServlet.service(OKMDownloadServlet.java:171)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
	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:230)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
	at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
	at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
	at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
	at java.lang.Thread.run(Thread.java:636)
15:58:58,643 WARN  [DocConverter] Abnormal program termination: {}2
15:58:58,643 WARN  [DocConverter] STDERR: /usr/bin/pdf2swf: 1: Syntax error: "(" unexpected
and my config file
Code: Select all
#system.ocr=/usr/bin/tesseract
system.openoffice.server=http://localhost:8080/converter/convert
system.openoffice.path=/usr/lib/openoffice
system.openoffice.port=2222
system.openoffice.tasks=5
system.convert=/usr/bin/convert
system.img2pdf=/usr/bin/convert
system.pdf2swf=/usr/bin/pdf2swf
#system.antivir=/usr/bin/clamscan
hibernate.dialect=org.hibernate.dialect.HSQLDialect
hibernate.hbm2ddl=none
#application.url=http://localhost:8080/OpenKM/com.openkm.frontend.Main/index.jsp
Can you help me ....
 #8605  by jllort
 
remove
Code: Select all
system.img2pdf=/usr/bin/convert
it's deprecated

You can convert document to pdf no ? is generated in cache/pdf ( first be sure about it ).
Ensure you can execute from the user who's running jboss the /usr/bin/pdf2swf

If problem continues might upgrade log level.
 #8610  by Swartor
 
yes pdf`s ar generated in cash/pdf folder automaticly with no problem.
The test i run manualy with pdf2swf is run on my user, the jboss is running by the root. When i try to run jboss on user right i hav errors and its dont start.
How can i do "If problem continues might upgrade log level." is ther a switch that logs more deeply the bugs how can i change it.
 #8617  by jllort
 
Edit jboss-log4j.xml

And in categories section add:
Code: Select all
<category name="com.openkm.util.DocConverter">
      <priority value="DEBUG" />
   </category>
That will show full converter log, and possible here we'll can see what happens.
 #8620  by Swartor
 
Ok i do what you told me and here is the fragment from log file that i think will be helpful to analyze whats happening
Code: Select all
2011-02-05 17:37:41,115 DEBUG [org.jboss.security.plugins.JaasSecurityManager.OpenKM] CallbackHandler: org.jboss.security.auth.callback.SecurityAssociationHandler@16fa38
2011-02-05 17:37:41,120 DEBUG [org.jboss.security.plugins.JaasSecurityManagerService] Created securityMgr=org.jboss.security.plugins.JaasSecurityManager@7cbd26
2011-02-05 17:37:41,122 DEBUG [org.jboss.security.plugins.JaasSecurityManager.OpenKM] CachePolicy set to: org.jboss.util.TimedCachePolicy@166320b
2011-02-05 17:37:41,122 DEBUG [org.jboss.security.plugins.JaasSecurityManagerService] setCachePolicy, c=org.jboss.util.TimedCachePolicy@166320b
2011-02-05 17:37:41,122 DEBUG [org.jboss.security.plugins.JaasSecurityManagerService] Added OpenKM, org.jboss.security.plugins.SecurityDomainContext@5fa11b to map
2011-02-05 17:37:51,907 DEBUG [com.openkm.util.DocConverter] ** Convert from PDF to SWF **
2011-02-05 17:37:51,907 DEBUG [com.openkm.util.DocConverter] Command: [/usr/bin/pdf2swf, -T 9, /tmp/okm3244730830740903204.tmp, -o, /home/karol/Pobrane/jboss-4.2.3.GA/cache/swf/93b9d72b-d364-4d98-b4ee-6fb29930652c.swf]
2011-02-05 17:37:52,098 WARN  [com.openkm.util.DocConverter] Abnormal program termination: {}2
2011-02-05 17:37:52,099 WARN  [com.openkm.util.DocConverter] STDERR: /usr/bin/pdf2swf: 1: Syntax error: "(" unexpected

2011-02-05 17:37:52,099 DEBUG [com.openkm.util.DocConverter] Elapse pdf2swf time: 00:00:00.192
2011-02-05 17:37:52,099 ERROR [com.openkm.frontend.server.OKMDownloadServlet] /home/karol/Pobrane/jboss-4.2.3.GA/cache/swf/93b9d72b-d364-4d98-b4ee-6fb29930652c.swf (No such file or directory)
java.io.FileNotFoundException: /home/karol/Pobrane/jboss-4.2.3.GA/cache/swf/93b9d72b-d364-4d98-b4ee-6fb29930652c.swf (No such file or directory)
	at java.io.FileInputStream.open(Native Method)
	at java.io.FileInputStream.<init>(FileInputStream.java:137)
	at com.openkm.frontend.server.OKMDownloadServlet.service(OKMDownloadServlet.java:171)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
	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:230)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
	at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
	at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
	at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
	at java.lang.Thread.run(Thread.java:636)
I don't know where to serch i think only why the command with pdf2swf try to convert the pdf file that is in tmp folder not in cash/pdf ? when i check there, there was no file with this name ? is this an answer or the problem is something bigger.

I do one more test and try to view img in the browser and here is the log from the conversion. I only add that the pdf file just show in cash.pdf catalog but stil problem is with the swf files.
Code: Select all
2011-02-05 17:55:18,379 DEBUG [com.openkm.util.DocConverter] ** Convert from image/jpeg to PDF **
2011-02-05 17:55:20,068 DEBUG [com.openkm.util.DocConverter] Elapse img2pdf time: 00:00:01.679
2011-02-05 17:55:20,072 DEBUG [com.openkm.util.DocConverter] ** Convert from PDF to SWF **
2011-02-05 17:55:20,072 DEBUG [com.openkm.util.DocConverter] Command: [/usr/bin/pdf2swf, -T 9, /tmp/okm1733782456460317408.tmp, -o, /home/karol/Pobrane/jboss-4.2.3.GA/cache/swf/173bc681-b479-4663-a1ef-2843c16d9968.swf]
2011-02-05 17:55:20,168 WARN  [com.openkm.util.DocConverter] Abnormal program termination: {}2
2011-02-05 17:55:20,170 WARN  [com.openkm.util.DocConverter] STDERR: /usr/bin/pdf2swf: 1: Syntax error: "(" unexpected

2011-02-05 17:55:20,170 DEBUG [com.openkm.util.DocConverter] Elapse pdf2swf time: 00:00:00.098
2011-02-05 17:55:20,171 ERROR [com.openkm.frontend.server.OKMDownloadServlet] /home/karol/Pobrane/jboss-4.2.3.GA/cache/swf/173bc681-b479-4663-a1ef-2843c16d9968.swf (No such file or directory)
java.io.FileNotFoundException: /home/karol/Pobrane/jboss-4.2.3.GA/cache/swf/173bc681-b479-4663-a1ef-2843c16d9968.swf (No such file or directory)
	at java.io.FileInputStream.open(Native Method)
	at java.io.FileInputStream.<init>(FileInputStream.java:137)
	at com.openkm.frontend.server.OKMDownloadServlet.service(OKMDownloadServlet.java:171)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
	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:230)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
	at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
	at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
	at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
	at java.lang.Thread.run(Thread.java:636)
 #8621  by Zippie53
 
thanks, that helped me a lot!
regards,
chantal
 #8622  by Swartor
 
can you tell me Zippie53 that you find the solution for this problem and can you tell me what i hav to do to make swf file to generate propertly
 #8628  by jllort
 
Seems there's some error calling the pdf2swf
Code: Select all
/usr/bin/pdf2swf, -T 9
What you've put in your OpenKM.cfg the /usr/bin/pdf2swf or some bean shell script ? seems there's some character "," that's wrong

In version 5.0.1 the -T 9 parameter is setting by default by openkm and there's no need to configure the bean shell script ( althought in wiki it's documented might only be used for older versions )
 #8634  by Swartor
 
I don`t have any shell scripts running only clean installation of OpenKM and swftools.
My OpenKM.cfg looks just like i post on first time i don`t change anything in it
Code: Select all
#system.ocr=/usr/bin/tesseract
system.openoffice.server=http://localhost:8080/converter/convert
system.openoffice.path=/usr/lib/openoffice
system.openoffice.port=2222
system.openoffice.tasks=5
system.convert=/usr/bin/convert
system.img2pdf=/usr/bin/convert
system.pdf2swf=/usr/bin/pdf2swf
#system.antivir=/usr/bin/clamscan
hibernate.dialect=org.hibernate.dialect.HSQLDialect
hibernate.hbm2ddl=none
#application.url=http://localhost:8080/OpenKM/com.openkm.frontend.Main/index.jsp
 #8636  by Swartor
 
Ok i have notice something maybe it will be helpful i move the whole installation from /opt to /home/karol/pobrane folder all work the same as worked before but not this i wont to talk about when i wrote in console (im in the /home/karol/jboss-4.2.3.GA/bin folder):
Code: Select all
pdf2swf -T9 /home/karol/jboss-4.2.3.GA/cache/pdf/93b9d72b-d364-4d98-b4ee-6fb29930652c.pdf -o  /home/karol/jboss-4.2.3.GA/cache/swf/93b9d72b-d364-4d98-b4ee-6fb29930652c.swf 
the whole process is correct and the swf file is created but when i wrote
Code: Select all
/usr/bin/pdf2swf -T9 /home/karol/jboss-4.2.3.GA/cache/pdf/93b9d72b-d364-4d98-b4ee-6fb29930652c.pdf -o  /home/karol/jboss-4.2.3.GA/cache/swf/93b9d72b-d364-4d98-b4ee-6fb29930652c.swf
i get error : "bash: /usr/bin/pdf2swf: nie można uruchomić pliku binarnego"
in English it will be i think "bash: /usr/bin/pdf2swf: can`t run binary file"

and other tests

command: pdf2swf
output: Usage: pdf2swf [-options] ...... (all ok)

command: /usr/bin/pdf2swf
output: "bash: /usr/bin/pdf2swf: can`t run binary file"

command: /home/karol/jboss-4.2.3.GA/bin/pdf2swf
output: "bash: /usr/bin/pdf2swf: can`t run binary file"

command: sh pdf2swf
output: pdf2swf: 1: Syntax error: "(" unexpected

command: sh /usr/bin/pdf2swf
output: pdf2swf: 1: Syntax error: "(" unexpected

command: sh /home/karol/jboss-4.2.3.GA/bin/pdf2swf
output: pdf2swf: 1: Syntax error: "(" unexpected
 #8661  by jllort
 
Which was the solution, some other user could take advantage on it.
 #8665  by Swartor
 
the problem was very silly but i search in wrong direction location of file pdf2swf was different. When i install swftools i think that the file pdh2swf that was in /jboss-4.2.3.GA/bin/ catalog i hav to copy to the catalog /usr/bin/ and that was the biggest mistake i make. The installation of swftools put all files and the pdf2swf in /usr/local/bin and that folder i have to show in Openkm.cfg. I figure it out when i install all files in new server and read the installation log.
 #8670  by jllort
 
the pdf2swf on bin folder under jboss can create some confusion, because it's for 32 bits and not runs propertly for all systems, really we might delete it.

About Us

OpenKM is part of the management software. A management software is a program that facilitates the accomplishment of administrative tasks. OpenKM is a document management system that allows you to manage business content and workflow in a more efficient way. Document managers guarantee data protection by establishing information security for business content.