Expand my Community achievements bar.

GCP PUB/SUB Dependency Issue

Avatar

Level 6

Hi,

 

We are trying to integrate Google Cloud Pub/Sub feature (https://cloud.google.com/pubsub/docs/publisher#java) in AEM 6.5.11.

We added dependency in Parent and Core respectively as below:

 

<!-- https://mvnrepository.com/artifact/com.google.cloud/google-cloud-pubsub -->
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-pubsub</artifactId>
<version>1.122.2</version>
</dependency>

 

<!-- https://mvnrepository.com/artifact/com.google.cloud/google-cloud-pubsub -->
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-pubsub</artifactId>
</dependency> 

 

After adding dependency, Build is succesful but bundle is not active.

It gives many errors in inported sections:

arvind_1-1671299577637.png

 

NOTE: In Core POM.xml, Added entry as below in Export-package section:

arvind_2-1671299687472.png

 

Related import in JAVA:

arvind_3-1671299797645.png

 

 

Thanks in advance.

 

Regards,

KTNR

 

 

 

 

2 Replies

Avatar

Community Advisor

Hi @arvind,

 

You can go to system console and manually install the Google cloud jars to resolve the dependency issue.

Avatar

Level 6

@Avinash_Gupta_  Thanks for your kind reply.

 However, I already tried some stuff following below 2 articles and bundles are active now.

https://aemsimplifiedbynikhil.wordpress.com/2020/08/23/resolve-dependencies-by-converting-jar-to-bun...

https://www.linkedin.com/pulse/how-add-third-party-bundle-you-aem-package-veena-vikraman/

But Now, it gives below error: java.lang.NoClassDefFoundError: com/google/pubsub/v1/TopicName 

 

do you have any idea how to resolve it?

 

@Avinash_Gupta_ @arunpatidar