DynamoDB integration with AEM 6.5 | Community
Skip to main content
Level 2
March 21, 2025
Solved

DynamoDB integration with AEM 6.5

  • March 21, 2025
  • 2 replies
  • 728 views

Hi Adobe Community,

 

Trying to integrate aws dynamoDB to update records in dynamoDB. we are using awsSDK 2.x version to integrate it, converted aws jar to OSGI jar & resolve the dependencies, but still it throws nullpointer exception on the DynamoDBClient object when called in the OSGI service class. Want to check if anyone had did dynamoDB integration before & help with the steps or help on resolve on instantiation of DynamoDBClient in the service (@reference is not working directly). Thanks in advance!

Best answer by giuseppebaglio

hi @sai_krishna_1404, I don't have experience with DynamoDBClient but I can recommend this:

<!-- https://mvnrepository.com/artifact/org.apache.servicemix.bundles/org.apache.servicemix.bundles.aws-java-sdk2 --> <dependency> <groupId>org.apache.servicemix.bundles</groupId> <artifactId>org.apache.servicemix.bundles.aws-java-sdk2</artifactId> <version>2.29.6_1</version> </dependency>

 It's provided by Apache Servicemix-bundles which offers OSGI-fied versions of many famous packages as you can see here.

2 replies

giuseppebaglio
giuseppebaglioAccepted solution
Level 10
March 21, 2025

hi @sai_krishna_1404, I don't have experience with DynamoDBClient but I can recommend this:

<!-- https://mvnrepository.com/artifact/org.apache.servicemix.bundles/org.apache.servicemix.bundles.aws-java-sdk2 --> <dependency> <groupId>org.apache.servicemix.bundles</groupId> <artifactId>org.apache.servicemix.bundles.aws-java-sdk2</artifactId> <version>2.29.6_1</version> </dependency>

 It's provided by Apache Servicemix-bundles which offers OSGI-fied versions of many famous packages as you can see here.

Level 2
March 24, 2025

Thanks for the response @giuseppebaglio , tried adding this dependency but this doesn't seems to be downloading the OSGI supported version, when I tried to install this version, it is throwing it doesn't have Symbolic bundle name

giuseppebaglio
Level 10
March 24, 2025

Please ensure the jar is embedded into the installation package via

filevault-package-maven-plugin

You can use as a reference this code

<plugin> <groupId>org.apache.jackrabbit</groupId> <artifactId>filevault-package-maven-plugin</artifactId> <extensions>true</extensions> <inherited>false</inherited> <configuration> <showImportPackageReport>false</showImportPackageReport> <properties> <cloudManagerTarget>none</cloudManagerTarget> </properties> </configuration> <executions> <execution> <id>default-generate-metadata</id> <configuration> <embeddedTarget>/apps/core/wcm/install</embeddedTarget> <embeddeds> <embedded> <groupId>${project.groupId}</groupId> <artifactId>core.wcm.components.core</artifactId> <filter>true</filter> <isAllVersionsFilter>true</isAllVersionsFilter> </embedded> <embedded> <groupId>${project.groupId}</groupId> <artifactId>core.wcm.components.extensions.amp</artifactId> <filter>true</filter> <isAllVersionsFilter>true</isAllVersionsFilter> </embedded> </embeddeds> <subPackages> <subPackage> <groupId>${project.groupId}</groupId> <artifactId>core.wcm.components.content</artifactId> <classifier>~cloud</classifier> <filter>true</filter> <isAllVersionsFilter>true</isAllVersionsFilter> </subPackage> <subPackage> <groupId>${project.groupId}</groupId> <artifactId>core.wcm.components.config</artifactId> <filter>true</filter> <isAllVersionsFilter>true</isAllVersionsFilter> </subPackage> <subPackage> <groupId>${project.groupId}</groupId> <artifactId>core.wcm.components.extensions.amp.content</artifactId> <classifier>~cloud</classifier> <filter>true</filter> <isAllVersionsFilter>true</isAllVersionsFilter> </subPackage> </subPackages> <packageType>container</packageType> </configuration> </execution> </executions> </plugin>

from here. You can also check how the AEM archetype does it by creating a new temporary project which will leverage this all/pom.xml file.

 
kautuk_sahni
Community Manager
Community Manager
April 1, 2025

@sai_krishna_1404 Did you find the suggestion helpful? Please let us know if you need more information. If a response worked, kindly mark it as correct for posterity; alternatively, if you found a solution yourself, we’d appreciate it if you could share it with the community. Thank you!

Kautuk Sahni