Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Adobe Summit 2023 [19th to 23rd March, Las Vegas and Virtual] | Complete AEM Session & Lab list

Unable to create com.adobe.aemfd.docmanager.Document Object


Level 2

Hi, I am trying to create to convert base64 encoded pdf document to com.adobe.aemfd.docmanager.Document object by using below line of code. But it throwing error. Any suggestion please.


Document document = new Document(Base64.decodeBase64(base64));




Exception in thread "main" java.lang.NoClassDefFoundError: com/adobe/aemfd/docmanager/source/DocumentSourceHandler
at com.aemproject.core.workflows.ConvertBase64ToDocument.main(
Caused by: java.lang.ClassNotFoundException: com.adobe.aemfd.docmanager.source.DocumentSourceHandler
at java.lang.ClassLoader.loadClass(
at sun.misc.Launcher$AppClassLoader.loadClass(
at java.lang.ClassLoader.loadClass(
... 1 more


I don't know how to resolve this problem.



0 Replies



@GirishBedekar he is decoding it in the call.


But I wonder which Base64 class that is. The Oracle JDK class is defined here

Are you sure that a byte array is passed? Sure that the base64 variable decodes to a proper PDF?

Did you try to have the decoding separate like

byte [] thePdfDocument = Base64.decodeBase64(base64);

Document document = new Document(thePdfDocument);





Level 2

I am using Java Util package. Yes, Byte array passing to as a parameter. 

I am getting same error message when using below code as you recommended. Thanks


String baseDoc = "......";

Base64.Decoder decoder = Base64.getDecoder();

// Decoding string String dStr = new String(decoder.decode(baseDoc));

Document document = new Document(dStr.getBytes());



I see you posted also in another thread.


I tested this with AEM Forms 6.5.7 using 


and it did work.


What version of AEM Forms are you using?


Level 2
No, I am getting same error earlier and now using recommended dependency. I have tried with both version 6.3.0 and 4.1.50