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.

Could not build the social-ugcbase1.1.34 bundle as it is depending on social-communities-api 1.1.34 version bundle

Avatar

Level 3

~Hi All,

      I am trying to build our migration project through Maven. I added dependencies required.

When  i tried to build and install i got an error saying

[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project usgboral-bundle: Could not resolve dependencies for project melbourne-it:usgboral-bundle:bundle:3.0-USG-BORAL-SNAPSHOT: Failed to collect dependencies at com.adobe.cq.social:cq-s
ocial-ugcbase:jar:1.1.34: Failed to read artifact descriptor for com.adobe.cq.social:cq-social-ugcbase:jar:1.1.34: Could not find artifact com.adobe.cq.social:socialcommunities-parent:pom:1.1.34 in adobe (http://repo.ado
be.com/nexus/content/groups/public/) -> [Help 1]
[ERROR]

I thought of downloading the jars manually.But the required com.adobe.cq.social:socialcommunities-parent:pom:1.1.34  version does not exist.  Attaching the screenshot of the same.

 

The social-ugcbase-1.1.34 jar is dependent on social-communities-api-1.3.4 jar.

Please help me on this!!

Thanks,

13 Replies

Avatar

Level 9

You might have to try with other social-communities-api-1.3.4 jar. version. May be that jar could resolve all the dependencies.

And, you could also verify whether your maven repository has these jars or not.

Jitendra

Avatar

Level 3

but in the repository we have only two versions of social ugcbase (cq-social-ugcbase-1.1.34:jar/cq-social-ugcbase-1.1.38:jar) jars and it is depending only on social-communities-api-1.3.4 jar.Could you please help me on this

Avatar

Employee Advisor

 Since you are building your project for AEM 6.1 instance you should add AEM Uber Jar dependency in your pom file and remove all individual AEM API dependencies[2]. 

Remove cq-social-ugcbase:jar dependency and add the following - 

<dependency>
    <groupId>com.adobe.aem</groupId>
    <artifactId>uber-jar</artifactId>
    <version>6.1.0</version>
    <scope>provided</scope>
    <classifier>obfuscated-apis</classifier>
</dependency>

 

 

[1] https://docs.adobe.com/docs/en/aem/6-1/develop/communities/code-guide/maven.html

[2] https://docs.adobe.com/docs/en/aem/6-1/develop/dev-tools/ht-projects-maven.html

Avatar

Level 3

But I need to use SocialUtils and SocialResourceUtils classes and it is available social-ugcbase. Is there anyother way for that?

Avatar

Employee Advisor

Both these classes are available in AEM uber jar. With 6.1, Adobe added Uber Jar which now has all the AEM APIs so you just need to add one dependency in your POM rather than adding individual API dependency. 

Avatar

Level 3

In 5.6.1 in our code we are using CollabUtil and it is deprecated in 6.0 and instead of CollabUtil API we are using the SocialUtils and SocialResourceUtils for this we included the social-ucgbase dependency in pom.

If we add uber.jar then it is not required to include the social-ugcbase dependency and will it resolve and can use SocialUtils and SocialResourceUtils with that uber dependency?

Avatar

Employee Advisor

If you are building the project for 6.1 version then yes you need to remove social-ugcbase dependency and add Uber Jar to the POM file. And you should make sure that you are not including any other dependencies in your POM just like social-ugcbase as for for them as well you should be using Uber jar.  

Avatar

Level 3

but when iam trying to build after removing all the dependencies related to social communities and social-ugcbase .jars then it is failing due to below errors

 

[INFO] -------------------------------------------------------------
[ERROR] /D:/USGB/USGBDevelopment/development/usgboral/bundle/src/main/java/com/melbourneit/usgboral/cq/services/UserProfileService.java:[25,37] package org.apache.commons.fileupload does not exist
[ERROR] /D:/USGB/USGBDevelopment/development/usgboral/bundle/src/main/java/com/melbourneit/usgboral/cq/services/UserProfileService.java:[936,188] cannot find symbol
  symbol:   class FileUploadException
  location: class com.melbourneit.usgboral.cq.services.UserProfileService
[ERROR] /D:/USGB/USGBDevelopment/development/usgboral/bundle/src/main/java/com/melbourneit/usgboral/cq/servlets/WTBImportServlet.java:[3,45] package org.apache.commons.fileupload.servlet does not exist
[ERROR] /D:/USGB/USGBDevelopment/development/usgboral/bundle/src/main/java/com/melbourneit/usgboral/cq/servlets/WTBXmlImportServlet.java:[3,45] package org.apache.commons.fileupload.servlet does not exist
[ERROR] /D:/USGB/USGBDevelopment/development/usgboral/bundle/src/main/java/com/melbourneit/usgboral/cq/servlets/AvatarUploadServlet.java:[7,37] package org.apache.commons.fileupload does not exist
[ERROR] /D:/USGB/USGBDevelopment/development/usgboral/bundle/src/main/java/com/melbourneit/usgboral/cq/servlets/AvatarUploadServlet.java:[8,45] package org.apache.commons.fileupload.servlet does not exist
[ERROR] /D:/USGB/USGBDevelopment/development/usgboral/bundle/src/main/java/com/melbourneit/usgboral/cq/services/SearchService.java:[846,48] cannot find symbol
  symbol:   method getTopicCount()
  location: variable forum of type com.adobe.cq.social.forum.api.Forum
[ERROR] /D:/USGB/USGBDevelopment/development/usgboral/bundle/src/main/java/com/melbourneit/usgboral/cq/services/SearchService.java:[848,69] cannot find symbol
  symbol:   method getTopicCount()
  location: variable forum of type com.adobe.cq.social.forum.api.Forum
[ERROR] /D:/USGB/USGBDevelopment/development/usgboral/bundle/src/main/java/com/melbourneit/usgboral/cq/services/SearchService.java:[854,63] cannot find symbol
  symbol:   method isApproved()
  location: variable latestTopic of type com.adobe.cq.social.forum.api.Post
[ERROR] /D:/USGB/USGBDevelopment/development/usgboral/bundle/src/main/java/com/melbourneit/usgboral/cq/services/SearchService.java:[862,69] cannot find symbol
  symbol:   method getSubject()
  location: variable latestTopic of type com.adobe.cq.social.forum.api.Post
[ERROR] /D:/USGB/USGBDevelopment/development/usgboral/bundle/src/main/java/com/melbourneit/usgboral/cq/services/SearchService.java:[863,70] cannot find symbol
  symbol:   method getCreatedBy()
  location: variable latestTopic of type com.adobe.cq.social.forum.api.Post
[ERROR] /D:/USGB/USGBDevelopment/development/usgboral/bundle/src/main/java/com/melbourneit/usgboral/cq/services/SearchService.java:[864,71] cannot find symbol
  symbol:   method getRepliesCount()
  location: variable latestTopic of type com.adobe.cq.social.forum.api.Post
[ERROR] /D:/USGB/USGBDevelopment/development/usgboral/bundle/src/main/java/com/melbourneit/usgboral/cq/services/SearchService.java:[865,68] cannot find symbol
  symbol:   method getUrl()
  location: variable latestTopic of type com.adobe.cq.social.forum.api.Post
[ERROR] /D:/USGB/USGBDevelopment/development/usgboral/bundle/src/main/java/com/melbourneit/usgboral/cq/services/SearchService.java:[866,123] cannot find symbol
  symbol:   method getCreatedBy()
  location: variable latestTopic of type com.adobe.cq.social.forum.api.Post
[ERROR] /D:/USGB/USGBDevelopment/development/usgboral/bundle/src/main/java/com/melbourneit/usgboral/cq/services/SearchService.java:[867,68] no suitable method found for getAvatar(com.adobe.granite.security.user.UserPrope
rties)
    method com.adobe.cq.social.commons.CollabUtil.getAvatar(com.adobe.granite.security.user.UserProperties,java.lang.String,java.lang.String) is not applicable
      (actual and formal argument lists differ in length)
    method com.adobe.cq.social.commons.CollabUtil.getAvatar(com.adobe.granite.security.user.UserProperties,java.lang.String,java.lang.String,com.adobe.cq.social.commons.CollabUtil.AVATAR_SIZE) is not applicable
      (actual and formal argument lists differ in length)
[ERROR] /D:/USGB/USGBDevelopment/development/usgboral/bundle/src/main/java/com/melbourneit/usgboral/cq/services/SearchService.java:[868,68] cannot find symbol
  symbol:   method getCreated()
  location: variable latestTopic of type com.adobe.cq.social.forum.api.Post
[ERROR] /D:/USGB/USGBDevelopment/development/usgboral/bundle/src/main/java/com/melbourneit/usgboral/cq/services/SearchService.java:[958,54] cannot find symbol
  symbol:   method isApproved()
  location: variable topic of type com.adobe.cq.social.forum.api.Post
[ERROR] /D:/USGB/USGBDevelopment/development/usgboral/bundle/src/main/java/com/melbourneit/usgboral/cq/services/SearchService.java:[959,56] cannot find symbol
  symbol:   method getCreatedBy()
  location: variable topic of type com.adobe.cq.social.forum.api.Post
[ERROR] /D:/USGB/USGBDevelopment/development/usgboral/bundle/src/main/java/com/melbourneit/usgboral/cq/services/SearchService.java:[960,57] cannot find symbol
  symbol:   method getCreated()
  location: variable topic of type com.adobe.cq.social.forum.api.Post
[ERROR] /D:/USGB/USGBDevelopment/development/usgboral/bundle/src/main/java/com/melbourneit/usgboral/cq/services/SearchService.java:[969,53] cannot find symbol
  symbol:   method getMessage()
  location: variable topic of type com.adobe.cq.social.forum.api.Post
[ERROR] /D:/USGB/USGBDevelopment/development/usgboral/bundle/src/main/java/com/melbourneit/usgboral/cq/services/SearchService.java:[970,53] cannot find symbol
  symbol:   method getSubject()
  location: variable topic of type com.adobe.cq.social.forum.api.Post
[ERROR] /D:/USGB/USGBDevelopment/development/usgboral/bundle/src/main/java/com/melbourneit/usgboral/cq/services/SearchService.java:[971,58] cannot find symbol
  symbol:   method getRepliesCount()
  location: variable topic of type com.adobe.cq.social.forum.api.Post
[ERROR] /D:/USGB/USGBDevelopment/development/usgboral/bundle/src/main/java/com/melbourneit/usgboral/cq/services/SearchService.java:[972,49] cannot find symbol
  symbol:   method getUrl()
  location: variable topic of type com.adobe.cq.social.forum.api.Post
[ERROR] /D:/USGB/USGBDevelopment/development/usgboral/bundle/src/main/java/com/melbourneit/usgboral/cq/components/core/IdeaCenterDetail.java:[47,50] cannot find symbol
  symbol:   method isApproved()
  location: variable ideaPost of type com.adobe.cq.social.forum.api.Post
[ERROR] /D:/USGB/USGBDevelopment/development/usgboral/bundle/src/main/java/com/melbourneit/usgboral/cq/components/core/IdeaCenterDetail.java:[48,52] cannot find symbol
  symbol:   method getCreatedBy()
  location: variable ideaPost of type com.adobe.cq.social.forum.api.Post
[ERROR] /D:/USGB/USGBDevelopment/development/usgboral/bundle/src/main/java/com/melbourneit/usgboral/cq/components/core/IdeaCenterDetail.java:[49,53] cannot find symbol
  symbol:   method getCreated()
  location: variable ideaPost of type com.adobe.cq.social.forum.api.Post
[ERROR] /D:/USGB/USGBDevelopment/development/usgboral/bundle/src/main/java/com/melbourneit/usgboral/cq/components/core/IdeaCenterDetail.java:[58,41] cannot find symbol
  symbol:   method getMessage()
  location: variable ideaPost of type com.adobe.cq.social.forum.api.Post

 

Avatar

Employee Advisor

You need to refactor your communities code as in 6.1 many of the communities java api packages were reorganized. Did you follow the documentation for upgrading the communities - https://docs.adobe.com/docs/en/aem/6-1/deploy/communities/upgrade.html

Also, the links I shared with you earlier please go through this again - 

[1] https://docs.adobe.com/docs/en/aem/6-1/develop/communities/code-guide/maven.html

You need to add the dependencies like below - 

    
<dependency>
    <groupId>com.adobe.cq.social</groupId>
    <artifactId>cq-socialcommunities-api</artifactId>
    <version>1.7.197</version>
    <scope>provided</scope>
</dependency>
<dependency>
    <groupId>com.adobe.aem</groupId>
    <artifactId>uber-jar</artifactId>
    <version>6.1.0</version>
    <scope>provided</scope>
    <classifier>obfuscated-apis</classifier>
</dependency>
 

You should use the right version of cq-socialcommunities-api as installed in your AEM instance. Please follow the steps mentioned in the documentation.

From the above exception it seems that you also need to add apache-commons dependency to your project. 

<dependency>
    <groupId>commons-fileupload</groupId>
    <artifactId>commons-fileupload</artifactId>
    <version>1.3.1</version>
 <scope>provided</scope>
</dependency>

Avatar

Level 9

kunal23 wrote...

You need to refactor your communities code as in 6.1 many of the communities java api packages were reorganized. Did you follow the documentation for upgrading the communities - https://docs.adobe.com/docs/en/aem/6-1/deploy/communities/upgrade.html

Also, the links I shared with you earlier please go through this again - 

[1] https://docs.adobe.com/docs/en/aem/6-1/develop/communities/code-guide/maven.html

...

... what they said ...

Only the Communities API jar should be included.  

Inclusion of individual Communities jars is not supported.

For some info regarding the refactoring, see SocialUtils Refactoring.

- JK

Avatar

Level 3

Hi Kalyan,

Have you got any fix for this? We are trying to use 'com.adobe.cq.social.commons.client.api.ClientUtilities' in our code and this looks for ugcbase jar, however, whenever I add this jar and take the build, it gives me the same error which you mentioned. Any fix or solution for this?

Any pointers will be helpful.

Thanks

~Jay

Avatar

Level 4

If you are still facing this issue I would recommend you to include the following dependencies in your pom.

            <dependency>

                <groupId>com.adobe.cq.social</groupId>

                <artifactId>cq-social-commons</artifactId>

                <version>1.5.103</version>

            </dependency>

          <dependency>

                <groupId>com.adobe.cq.social</groupId>

                <artifactId>cq-socialcommunities-api</artifactId>

                <version>1.10.111</version>

                <scope>provided</scope>

           </dependency>

Also please make sure you have settings.xm in place i.e. .m2/ with correct adobe public repository configured there which should be like below :

       <profile>
                <id>adobe-public</id> 
                <activation> 
                    <activeByDefault>true</activeByDefault> 
                </activation> 
                <repositories> 
                  <repository> 
                    <id>adobe</id> 
                    <name>Nexus Proxy Repository</name> 
                    <url>http://repo.adobe.com/nexus/content/groups/public/</url> 
                    <layout>default</layout> 
                  </repository> 
                </repositories> 
                <pluginRepositories> 
                  <pluginRepository> 
                    <id>adobe</id> 
                    <name>Nexus Proxy Repository</name> 
                    <url>http://repo.adobe.com/nexus/content/groups/public/</url> 
                    <layout>default</layout> 
                  </pluginRepository> 
                </pluginRepositories> 
            </profile>

 

Thanks,

Samir

Avatar

Employee

This is not correct - do not use individual communities jars in your dependency list since they are not available in public repos.  JK Kendall's advice is correct - use only the cq-socialcommunities-api jar that corresponds to the communities-pkg installed in AEM, and place it just before the AEM uber jar in the dependency list in the pom. Then post your full build log here if you're still having problems.