PDF Generator on Ubuntu

How to install LiveCycle / AEM Forms on Ubuntu with PDF Generator and Libreoffice

In /opt/lces3/server/lc_mysql/conf/jboss-log4j.xml enable finest logging:

   <category name="com.adobe.native2pdf">
      <priority value="FINEST"/>
   </category>

Then following error were observed:

2017-08-11 20:31:13,192 DEBUG [com.adobe.native2pdf.bmc.OpenOffice2PDFConverterServer] (RequestProcessor-2) ALC-PDG-001-000-NoClassDefFoundError: com/sun/star/text/XTextDocument

com.sun.star.text.XTextDocument class were missing.
So installed libreoffice-java-common package:

# apt-get install libreoffice-java-common

Didn't work again:

21:05:54,337 DEBUG [com.adobe.native2pdf.bmc.OpenOffice2PDFSvc] Service Temp Directory is /opt/lces3/tmp/adobejb_server1/OpenOffice2PDFSvc
21:05:54,364 INFO  [com.adobe.service.ProcessResource] ALC-BMC-001-505: Service OpenOffice2PDFSvc: Starting native process with command line "/opt/jdk1.6.0_45-x86/bin/java" -Xmx64m -cp "/opt/lces3/server/lc_mysql/svcnative/OpenOffice2PDFSvc/bin/adobe-bslj.jar:/opt/lces3/server/lc_mysql/svcnative/OpenOffice2PDFSvc/bin/comfyj-2.4.jar:/opt/lces3/server/lc_mysql/svcnative/OpenOffice2PDFSvc/bin/adobe-pdfg-common-jaxb.jar:/opt/lces3/server/lc_mysql/svcnative/OpenOffice2PDFSvc/bin/jniwrap-3.6.1.jar:/opt/lces3/server/lc_mysql/svcnative/OpenOffice2PDFSvc/bin/winpack-3.6.jar:/opt/lces3/server/lc_mysql/svcnative/OpenOffice2PDFSvc/bin/adobe-utilities.jar:/opt/lces3/server/lc_mysql/svcnative/OpenOffice2PDFSvc/bin/adobe-pdfg-idl-bmc.jar:/opt/lces3/server/lc_mysql/svcnative/OpenOffice2PDFSvc/bin/adobe-generatepdf-client.jar:/opt/lces3/server/lc_mysql/svcnative/OpenOffice2PDFSvc/bin/adobe-csa.jar:/opt/lces3/server/lc_mysql/svcnative/OpenOffice2PDFSvc/bin/adobe-pdfg-common.jar:/opt/lces3/server/lc_mysql/svcnative/OpenOffice2PDFSvc/bin/adobe-pdfg-commonbmc.jar:/opt/lces3/server/lc_mysql/svcnative/OpenOffice2PDFSvc/bin/adobe-pdfg-idl-bmc-websphere.jar:/opt/lces3/server/lc_mysql/svcnative/OpenOffice2PDFSvc/bin/OpenOffice2PDFConverterServer.jar:/opt/lces3/server/lc_mysql/svcnative/ServicesNatives2/jars/adobe-bslj.jar:/usr/lib/libreoffice/program/classes/ridl.jar:/usr/lib/libreoffice/program/classes/jurt.jar:/usr/lib/libreoffice/program/classes/juh.jar:/usr/lib/libreoffice/program/classes/unoil.jar:/usr/lib/libreoffice/program/:/opt/lces3/server/lc_mysql/svcnative/ServicesNatives2/jars/adobe-bslj.jar:/opt/lces3/server/lc_mysql/svcnative/ServicesNatives2/jars/jacorb/jacorb.jar:/opt/lces3/server/lc_mysql/svcnative/ServicesNatives2/jars/jacorb/avalon-framework-4.1.5.jar:/opt/lces3/server/lc_mysql/svcnative/ServicesNatives2/jars/jacorb/concurrent-1.3.2.jar:/opt/lces3/server/lc_mysql/svcnative/ServicesNatives2/jars/jacorb/logkit-1.2.jar:/opt/lces3/server/lc_mysql/svcnative/ServicesNatives2/jars/jacorb/antlr-2.7.2.jar" com.adobe.native2pdf.bmc.OpenOffice2PDFConverterServer "" -IOR IOR:000000000000002249444C3A636F6D2F61646F62652F736572766963652F4D616E616765723A312E300000000000000200000000000000F8000102000000000A3132372E302E302E31000DC800000018333238343039303031312F42522D312F0100000000000000000000050000000000000008000000004A41430000000001000000200000000005010001000000010001000100010109000000020501000100010100000000210000006C000000000000000100000000000000240000001C0000007E00000000000000010000000A3132372E302E312E31000DC900400000000000080606678102010101000000170401000806066781020101010000000764656661756C7400000000000000000000000000000000000000002000000004000000000000001F0000000400000003000000010000002000000000000000020000002000000004000000000000001F0000000400000003   -AppServer jboss
21:05:55,639 INFO  [STDOUT] [configuration loaded from classpath resource jar:file:/opt/lces3/server/lc_mysql/svcnative/OpenOffice2PDFSvc/bin/adobe-pdfg-commonbmc.jar!/jacorb.properties]
21:05:56,754 DEBUG [com.adobe.native2pdf.bmc.ConverterAgentImpl] ALC-PDG-001-000-
Inside ConverterAgentImpl.convertToPdfUsingOpenOffice for job=asm.txt083e55-41081d-47a141-bbbe4e-9d06c8-91fd7e
before calling revealImplClassName for job=asm.txt083e55-41081d-47a141-bbbe4e-9d06c8-91fd7e
appImplementationClass=com.adobe.native2pdf.bmc.OpenOffice2PDFConverter for job=asm.txt083e55-41081d-47a141-bbbe4e-9d06c8-91fd7e
created worker object.before calling invokeExecute for job=asm.txt083e55-41081d-47a141-bbbe4e-9d06c8-91fd7e
21:05:56,756 DEBUG [com.adobe.native2pdf.bmc.OpenOffice2PDFConverter] ALC-PDG-001-000-
Inside OpenOffice2PDFConverter.execute for job=asm.txt083e55-41081d-47a141-bbbe4e-9d06c8-91fd7e
after m_converterMap.get(OpenOffice) for job=asm.txt083e55-41081d-47a141-bbbe4e-9d06c8-91fd7e
before method.invoke() for job=asm.txt083e55-41081d-47a141-bbbe4e-9d06c8-91fd7e
21:05:56,920 ERROR [STDERR] Aug 11, 2017 9:05:56 PM com.adobe.native2pdf.bmc.DocumentConverter logMessage
INFO: jara : Bootstrap open office
21:05:56,920 ERROR [STDERR] Aug 11, 2017 9:05:56 PM com.adobe.native2pdf.bmc.DocumentConverter logMessage
INFO: jara : waiting for timeout log message
21:05:57,048 ERROR [STDERR] Aug 11, 2017 9:05:57 PM com.adobe.native2pdf.bmc.DocumentConverter logMessage
INFO: jara : Killing openoffice process pid altogether
21:05:57,048 INFO  [STDOUT] /bin/bash
21:05:57,049 INFO  [STDOUT] /bin/bash,ps -U jara -f | grep -i soffice | awk '{print $2}'
21:05:57,443 INFO  [STDOUT] Length is : 2
21:05:57,443 INFO  [STDOUT] Killing : 28351
21:05:57,465 INFO  [STDOUT] Killing : 28353
21:05:57,468 ERROR [STDERR] Aug 11, 2017 9:05:57 PM com.adobe.native2pdf.bmc.DocumentConverter logMessage
INFO: jara : Cleaned up OpenOffice
21:05:57,470 ERROR [STDERR] Aug 11, 2017 9:05:57 PM com.adobe.native2pdf.bmc.DocumentConverter logErr
SEVERE: jara : /usr/lib/libreoffice/program/libjpipe.so: /usr/lib/libreoffice/program/libjpipe.so: wrong ELF class: ELFCLASS64 (Possible cause: architecture word width mismatch)/usr/lib/libreoffice/program/libjpipe.so: /usr/lib/libreoffice/program/libjpipe.so: wrong ELF class: ELFCLASS64 (Possible cause: architecture word width mismatch)
Aug 11, 2017 9:05:57 PM com.adobe.native2pdf.bmc.DocumentConverter logMessage
INFO: jara : /usr/li
21:05:57,470 ERROR [STDERR] b/libreoffice/program/libjpipe.so: /usr/lib/libreoffice/program/libjpipe.so: wrong ELF class: ELFCLASS64 (Possible cause: architecture word width mismatch)
Aug 11, 2017 9:05:57 PM com.adobe.native2pdf.bmc.DocumentConverter logMessage
INFO: jara : Initiating OpenOffice BMC Reset
Aug 11, 2017 9:05:57 PM com.adobe.native2pdf.bmc.DocumentConverter logMessage
INFO: jara : Killing openoffice process pid altogether
21:05:57,470 INFO  [STDOUT] /bin/bash
/bin/bash,ps -U jara -f | grep -i soffice | awk '{print $2}'
21:05:57,498 INFO  [STDOUT] Length is : 2
21:05:57,498 INFO  [STDOUT] Killing : 28361
21:05:57,499 INFO  [STDOUT] Killing : 28363
21:05:57,500 ERROR [STDERR] Aug 11, 2017 9:05:57 PM com.adobe.native2pdf.bmc.DocumentConverter logMessage
INFO: jara : Cleaned up OpenOffice
21:05:57,502 ERROR [STDERR] Aug 11, 2017 9:05:57 PM com.adobe.native2pdf.bmc.DocumentConverter logMessage
INFO: jara : null
Aug 11, 2017 9:05:57 PM com.adobe.native2pdf.bmc.DocumentConverter logMessage
INFO: jara : Bootstrap open office
21:05:57,502 INFO  [com.adobe.native2pdf.bmc.OpenOffice2PDFConverter] ALC-PDG-001-000-Since an Error Occurred, the OpenOfficebmc JVM is killed. Current job id asm.txt083e55-41081d-47a141-bbbe4e-9d06c8-91fd7e
21:05:57,824 WARN  [com.adobe.service.ProcessResource] ALC-BMC-001-024: Service OpenOffice2PDFSvc: Process ProcessResource@4e7b16a6(name=java,pid=0) terminated abnormally with error code {3}
21:05:57,824 WARN  [jacorb.giop.conn] Abnormal connection termination. Lost 1 outstanding replie(s)!
21:06:02,842 ERROR [com.adobe.service.ProcessResource] ALC-BMC-001-001: Unexpected exception while rolling back transaction
org.omg.CORBA.TRANSIENT: Retries exceeded, couldn't reconnect to 127.0.0.1:35262  vmcid: 0x0  minor code: 0  completed: No

Well, obviously 32bit java is not the happy choice. So used 64bit and worked.

Here is final setup environment:

export JAVA_HOME=/opt/jdk1.6.0_45
export JAVA_HOME_32=/opt/jdk1.6.0_45
export OpenOffice_PATH=/usr/lib/libreoffice
Není-li uvedeno jinak, obsah této stránky je pod licencí Creative Commons Attribution-ShareAlike 3.0 License