Expand my Community achievements bar.

SOLVED

Integration Docx4j inside a LC ES4 Component

Avatar

Level 2

Hi I'm trying to integrate docx4j inside a custom component. The component works well but when I release the component on workbench docx4j doesn't work as I except. There is any resource somewhere for integrating docx4j in a Livecycle component?

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

The very first thing, in this case, to be checked should be that the dependency that you inject outside the workbench to make it work will those be available to the component when it runs on the server. @tommyc11112341 

 http://aem.matelli.org/livecycle-es4-custom-component-creation/

View solution in original post

5 Replies

Avatar

Correct answer by
Employee Advisor

The very first thing, in this case, to be checked should be that the dependency that you inject outside the workbench to make it work will those be available to the component when it runs on the server. @tommyc11112341 

 http://aem.matelli.org/livecycle-es4-custom-component-creation/

Avatar

Level 2
Hi Mayank Gandhi, thanks I resolved the issue. I change version of docx4j and I used the Reference Implementation rather then MOXy and the component work well as I expected. Thanks for your insight and link.

Avatar

Employee Advisor
@ tommyc11112341 Would you like to share the steps? we can get a kb created for the same which can help other as well.

Avatar

Level 2

Hi @Mayank_Gandhi I follow this steps:

 

1. Create the components in a standard way

2. Docx4j last version 8.1.6 and I use the ReferenceImpl

3. Inserted Docx4j in a dedicated folder in the project /lib/dependencies

4. Update the build script of Ant

5. Update the component.xml with all dependencies (in particular the creation of Jar file section)

 

The best way I find is using the ReferenceImpl of Docx4j. If you need more steps let me know.