Expand my Community achievements bar.

Submissions are now open for the 2026 Adobe Experience Maker Awards.
SOLVED

DynamoDB integration with AEM 6.5

Avatar

Level 2

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!

1 Accepted Solution

Avatar

Correct answer by
Level 10

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.

View solution in original post

6 Replies

Avatar

Correct answer by
Level 10

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.

Avatar

Level 2

Thanks for the response @giuseppebag , 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

Avatar

Level 10

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.

 

servicemix jar resolve firing DynamoDBClient, one issue with servicemix aws version is, in my use case I only need DynamoDB SDK only, but this jar had all different package which is not required for my project, & jar size coming up to be more than 500MB, not sure if adobe can provide a solution to generate OSGI Jar SDKs for external dependencies.

Avatar

Level 10

Apache provides Servicemix bundles, not Adobe. You can try this approach, but it becomes challenging when there are many dependencies and there are no guarantees of success.

Avatar

Administrator

@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