Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.
SOLVED

AWS Java SDK cannot be resolved

Avatar

Community Advisor

Hello I am trying to integrate AWS SDK in my project. But the problem is after the deploy the bundle cannot be resolved.

In the project pom.xml

<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk</artifactId>
<version>1.12.392</version>
</dependency>

In the core pom.xml

<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk</artifactId>
</dependency>

In the all pom.xml 

<embedded>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk</artifactId>
<target>/apps/my-project-vendor-packages/application/install</target>
</embedded>

<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk</artifactId>
<type>jar</type>
</dependency>

 After successfully deploying with this setup I got this error,

Sady_Rifat_2-1674736435706.png

To resolve I found similar kinds of problems in communities. But none of them helped me or I missed something.
Reference: https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/aws-package-cannot-be-reso...

Method 2:

I also tried to deploy the "aws-java-sdk-1.12.392.jar" directly by OSGI. And then I get this error.

 

Sady_Rifat_0-1674736317903.png

 

 

What should I do? How can I resolve this problem?

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

@Sady_Rifat 

Try creating new module similar to core and include dependencies in it.

Here we need to create an OSGi bundle out of third party non-osgi dependency using maven-bundle-plugin

Below article mentions all the steps for it

https://myaemlearnings.blogspot.com/2021/08/embedding-third-party-dependencyosgi.html

View solution in original post

4 Replies

Avatar

Employee Advisor

Hi @Sady_Rifat ,

 

Have you tried the OSGi version of it?

https://mvnrepository.com/artifact/com.amazonaws/aws-java-sdk-osgi/1.12.392 

 

<!-- https://mvnrepository.com/artifact/com.amazonaws/aws-java-sdk-osgi -->
<dependency>
    <groupId>com.amazonaws</groupId>
    <artifactId>aws-java-sdk-osgi</artifactId>
    <version>1.12.392</version>
</dependency>

 

On the OSGi console error, I think you are trying to install Jar rather than a bundle.

Hope this helps!

 

Regards,

Nitesh

 

Avatar

Community Advisor

Hello Nitesh,
Tried with aws-java-sdk-osgi

Sady_Rifat_0-1674741096460.png

 

In AWS SDK For Java for OSGi I got the following error,

Sady_Rifat_1-1674741156298.png

 

 

Avatar

Correct answer by
Community Advisor

@Sady_Rifat 

Try creating new module similar to core and include dependencies in it.

Here we need to create an OSGi bundle out of third party non-osgi dependency using maven-bundle-plugin

Below article mentions all the steps for it

https://myaemlearnings.blogspot.com/2021/08/embedding-third-party-dependencyosgi.html