Expand my Community achievements bar.

SOLVED

can we use pdfbox api with AEM6

Avatar

Level 1

I am not getting the correct answer, Created an separate pdfbox osgi bundle and deployed successfully. It has active status. And project bundle is also deployed having active status.

but it gives error

java.lang.NoClassDefFoundError: Could not initialize class org.apache.pdfbox.pdmodel.PDDocument
1 Accepted Solution

Avatar

Correct answer by
Level 1

Yes, finally I got solutions but PDF box updated api like 2.0.14 or 1.8.16 are not resolved with AEM 6.

AEM works with very lower versions of PDFBOX only. Might be this the limitation while you are working in AEM, so keep these things in mind.

View solution in original post

5 Replies

Avatar

Level 10

Use pdfbox bundle's symbolic name in <Require-Bundle>... </Require-Bundle> in your pom.xml under maven- bundle-plugin

Avatar

Level 1

I am not getting the correct answer, Created an separate pdfbox osgi bundle and deployed successfully. It has active status. And project bundle is also deployed having active status.

but it gives error

java.lang.NoClassDefFoundError: Could not initialize class org.apache.pdfbox.pdmodel.PDDocument

not getting the solution, can you please help me to out of this.Screenshot 2019-04-26 at 12.42.35 PM.pngScreenshot 2019-04-26 at 12.45.12 PM.png

Avatar

Level 1

Thanks, but I already read the same use case. but  I am getting the problem with AEM6, after creating the jar bundle and deployed that on instance with active status, my project bundle also in active status but not able to find the PDFBox API classes.

Avatar

Correct answer by
Level 1

Yes, finally I got solutions but PDF box updated api like 2.0.14 or 1.8.16 are not resolved with AEM 6.

AEM works with very lower versions of PDFBOX only. Might be this the limitation while you are working in AEM, so keep these things in mind.