Hi All,
I am currently working on upgrading aem 6.2 to aem 6.4.
The following are used by our custom components
cq-social-blog
cq-social-commons
cq-social-storage
The bundle that imports the above ends in error:
org.apache.sling.jcr.resource -- Cannot be resolved
I have gone through the following posts:
AEM 6.4 beta, Apache Sling JCR Resource Resolver not present
AEM 6.0 upgrade to AEM 6.2 - com.adobe.cq.social.cq-social-blog Removed AEM 6.0 upgrade to AEM 6.2 - com.adobe.cq.social.cq-social-blog Removed
Strategy for upgrading project that uses some classes from com.adobe.cq.social.blog
After going through the above posts and also digging through the decompiled classes under the following:
cq-social-blog
cq-social-commons
cq-social-storage
I found that the following class which is deprecated in AEM 6.4 Uber Jar
org.apache.sling.jcr.resource.JcrResourceResolverFactory
is being used in the following. This is causing the error:
cq-social-storage
com/adobe/cq/social/cq-social-storage/1.0.11/cq-social-storage-1.0.11.jar!/com/adobe/cq/social/storage/index/impl/IndexService.class
cq-social-blog
com/adobe/cq/social/cq-social-blog/1.2.7/cq-social-blog-1.2.7.jar!/com/adobe/cq/social/blog/trackback/TrackbackServlet.class
com/adobe/cq/social/cq-social-blog/1.2.7/cq-social-blog-1.2.7.jar!/com/adobe/cq/social/blog/search/process/BlogSearchPingProcess.class
com/adobe/cq/social/cq-social-blog/1.2.7/cq-social-blog-1.2.7.jar!/com/adobe/cq/social/blog/antispam/process/CheckSpamProcess.class
cq-social-commons
com/adobe/cq/social/cq-social-commons/1.2.32/cq-social-commons-1.2.32.jar!/com/adobe/cq/social/commons/AbstractCreateCommentServlet.class
com/adobe/cq/social/cq-social-commons/1.2.32/cq-social-commons-1.2.32.jar!/com/adobe/cq/social/commons/impl/AysncReverseReplicatorImpl.class
com/adobe/cq/social/cq-social-commons/1.2.32/cq-social-commons-1.2.32.jar!/com/adobe/cq/social/commons/impl/CommentJcrPathBuilder.class
com/adobe/cq/social/cq-social-commons/1.2.32/cq-social-commons-1.2.32.jar!/com/adobe/cq/social/commons/impl/UserStateToggleManagerImpl.class
As per the official documentation in sling:
JcrResourceResolverFactory (Apache Sling (Builder) 6 API)
The
JcrResourceResolverFactory
is deprecated and the new class according ResourceResolverFactory (Apache Sling (Builder) 6 API)
ResourceResolverFactory
should be used.
Are there new versions of the following released for AEM 6.4
cq-social-blog
cq-social-commons
cq-social-storage
Please let me know is there a solution for this.
Regards,
Mano
Solved! Go to Solution.
Views
Replies
Total Likes
Deprecation means just that: deprecation. It does not mean that code is missing. It is still there and working. It's unlikely that this deprecation causes the issue you are seeing.
For me it rather seems that you own custom code imports the Java package "org.apache.sling.jcr.resource", which has been removed. But there are replacements available so your custom code can be adjusted easily.
HTH,
Jörg
Views
Replies
Total Likes
Deprecation means just that: deprecation. It does not mean that code is missing. It is still there and working. It's unlikely that this deprecation causes the issue you are seeing.
For me it rather seems that you own custom code imports the Java package "org.apache.sling.jcr.resource", which has been removed. But there are replacements available so your custom code can be adjusted easily.
HTH,
Jörg
Views
Replies
Total Likes
Thank you very much, The class JcrResourceResolverFactory is not deprecated it is removed in the 6.4 Uber Jar
Uber Jar 6.4
Below is the Uber Jar of 6.2 (Here the class is present but deprecated)
We are upgrading from 6.2 to 6.4.
There is no reference to removed classes in Custom Code
We have decided to do away with the cq-social modules for the upgrade.
Thanks and Regards,
Mano
Views
Replies
Total Likes
Hi,
but in other this would mean, that these cq-social modules in question are not runnable on AEM 6.4, and this would affect a non-upgraded version as well.
Just reviewing my AEM 6.4 SP3, I found no cq-social-storage module, cq-social-commons has the version number 1.9.76 and cq-social-blog is also gone. I guess that you should verify the upgrade logs if anything has gone wrong. Does your application run on an vanilla (non-upgraded AEM 6.4) version?
Jörg
Views
Replies
Total Likes
Hi Joerg,
Thank you for your response. We have decided to delete all cq-social, as it doesn't work in AEM 6.4.
PS: By the way to restate again, there were no deprecation, the java classes were reorganised.
Regards,
Mano
Views
Replies
Total Likes