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

AEM-6.5 Google Oauth Client Jetty

Avatar

Community Advisor

Hi All,
I am trying to include dependency of com.google.oauth-client in my maven pom file. But when I deploy the bundle on felix console, get error message like below.

Tarun202_0-1627369098402.png

I tried to embed the dependency also in my pom but no luck. Any one who can help me on this.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @TarunKumar,

Please find my comments in this thread for similar issue.  (Dependency not resolving in the context of OSGi/ Apache Felix console)

https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/problem-integrating-google...

 

View solution in original post

9 Replies

Avatar

Employee

@TarunKumar

please include this dependency. to work in maven

<!-- https://mvnrepository.com/artifact/com.google.oauth-client/google-oauth-client-jetty -->
<dependency>
<groupId>com.google.oauth-client</groupId>
<artifactId>google-oauth-client-jetty</artifactId>
<version>1.31.5</version>
</dependency>

 

Avatar

Community Advisor

@ashishg1547773

I have included the dependency in the same way as you have suggested. But problem is that my dependency is not getting resolved at apache felix console. 

Avatar

Correct answer by
Community Advisor

Hi @TarunKumar,

Please find my comments in this thread for similar issue.  (Dependency not resolving in the context of OSGi/ Apache Felix console)

https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/problem-integrating-google...

 

Avatar

Community Advisor

Hi Vijayalakshmi_S,

I tried your suggested solution and  have made changes something like below in my pom file:-

Tarun202_0-1627405313521.png

However, now I get some different error message in felix console which is :-

Tarun202_1-1627405368087.png

Please let me know if I am missing anything?

Avatar

Community Advisor

@TarunKumar,

Can you share the artifactId of com.google.oauth-client(Dependency as used in pom.xml) that you are using and AEM version.

Avatar

Community Advisor

Hi Vijayalakshmi_S, 


Please find the complete dependency that I am using as below:

<dependency>
<groupId>com.google.oauth-client</groupId>
<artifactId>google-oauth-client-jetty</artifactId>
<version>1.31.5</version>
</dependency>

Also AEM version that I am using is 6.5.8.

Avatar

Community Advisor

@TarunKumar,

Not sure if any of the transitive dependencies of google-oauth-client-jetty is in need of com.sun.net.httpserver, Can you try adding the same in Import-Package entry with resolution:=optional

Also, In the Export-Package entry, remove the version information and cross check if you have mentioned all the Java Package names (related to the dependency) that you are using in the actual code/functionality.

 

If you still face any issues, share the code snippet that is making use of google-oauth-client-jetty. I will reproduce it in my local and update.