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

[AWS SDK] java.lang.NoClassDefFoundError: Could not initialize class com.amazonaws.ClientConfiguration

Avatar

Level 1

Hi everyone, good afternoon.

 

We have a custom bundle that wires up the whole AWS SDK OSGI package and export it, so the other part of application can take advantage of the AWS SDK as well. This is working properly, we have an AEM preprocessor that pushes some data to AWS CloudSearch.

 

I'm trying to take advantage of that bundle that is already installed and running on upper environments, but I'm struggling with it and it seems that AEM is not finding the correct resolution for some classes, it gives me the NoClassDefFoundError error:

 

java.lang.NoClassDefFoundError: Could not initialize class com.amazonaws.ClientConfiguration
	at com.amazonaws.ClientConfigurationFactory.getDefaultConfig(ClientConfigurationFactory.java:46) [com.xxx.aws.cloudsearch.xxx-cloudsearch-bundle:3.0.1]
	at com.amazonaws.ClientConfigurationFactory.getConfig(ClientConfigurationFactory.java:36) [com.xxx.aws.cloudsearch.xxx-cloudsearch-bundle:3.0.1]
	at com.amazonaws.services.cloudfront.AmazonCloudFrontClient.<init>(AmazonCloudFrontClient.java:140) [com.xxx.aws.cloudsearch.xxx-cloudsearch-bundle:3.0.1]

 

 

My pom.xml looks like the follwing image, I also added an image of how the dependency was resolved properly by AEM (/system/console/bundles)

Anyone have an idea? Thank you.

2020-04-28-16-19-42.png2020-04-28-16-23-22.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0 Replies