Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

java.lang.NoClassDefFoundError: com/adobe/aemfd/docmanager/source/DocumentSourceHandler

Avatar

Level 2

Hello

For PDF generating we are using com.adobe.aemfd.docmanager.Document, which works fine.

But using this in unit tests we receive this error:

java.lang.NoClassDefFoundError: com/adobe/aemfd/docmanager/source/DocumentSourceHandler

We are using this dependency:

<dependency>
  <groupId>com.adobe.aemfd</groupId>
  <artifactId>aemfd-client-sdk</artifactId>
  <version>6.3.0</version>
  <scope>provided</scope>
</dependency>

How can we solve this error so we can run our tests?

Kind regards

Christofhe De Bock

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

Hi Puneet and Christofhe,

As smacdonald2008 mentioned please give details on how the Unit tests were set up and also please share the client sdk version being used at your end. It would have version something like 4.1.xx if you are using AEM Forms 6.3.

Thanks,

Mayank

View solution in original post

7 Replies

Avatar

Level 10

How are you setting  up the Unit tests? Are you using the OOTB Unit Tests that are part of the Maven Archetype project?

Avatar

Correct answer by
Employee Advisor

Hi Puneet and Christofhe,

As smacdonald2008 mentioned please give details on how the Unit tests were set up and also please share the client sdk version being used at your end. It would have version something like 4.1.xx if you are using AEM Forms 6.3.

Thanks,

Mayank

Avatar

Level 2

<dependency>
<groupId>com.adobe.aemfd</groupId>
<artifactId>aemfd-client-sdk</artifactId>
<version>4.1.50</version>
</dependency>

 

I am using above dependency, Still facing same problem when convert base 64 doc to com.adobe.aemfd.docmanager.Document

 

Here my Code: 

 

Document document = new Document(java.util.Base64.getDecoder().decode(baseDoc));

Avatar

Level 1

Hi Chris,

  We are facing same issue. Have you found the solution? If Yes, please share

Avatar

Level 2

Hi Everyone,

     You need to add Adobe AEMDS Core Document Manager Support (adobe-aemds-core-docmanager) bundle in classpath or you can add it dependency. This bundle is present in AEM. It will resolve DocumentSourceHandler class

1818981_pastedImage_0.png

Avatar

Level 2

<dependency>
<groupId>adobe-aemds-core-docmanager</groupId>
<artifactId>aemfd-client-sdk</artifactId>
<version>4.1.50</version>
</dependency>

 

I am using above dependency, but still facing same issue