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

SOLVED

AEM-6.5 Google Oauth Client Jetty

Tarun202
Level 2
Level 2

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
Vijayalakshmi_S
Correct answer by
Community Advisor
Community Advisor

Hi @Tarun202,

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
ashishg1547773
Employee
Employee

@Tarun202

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>

 

Tarun202
Level 2
Level 2

@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. 

Vijayalakshmi_S
Correct answer by
Community Advisor
Community Advisor

Hi @Tarun202,

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

Tarun202
Level 2
Level 2

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?

Vijayalakshmi_S
Community Advisor
Community Advisor

@Tarun202,

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

Tarun202
Level 2
Level 2

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.

Vijayalakshmi_S
Community Advisor
Community Advisor

@Tarun202,

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.