Expand my Community achievements bar.

How to export Jackson annotations without AEM communities bundles importing our version?

Avatar

Level 4

We run AEM 6.1 SP2-CFP4.

How can we export the Jackson annotations in one of our bundles without the AEM communities bundles importing our version of Jackson core and Jackson databind?

As you can see in following screengrab from the OSGi console, the com.adobe.cq.social.cq-social-scf-api bundle is exporting a part of com.fasterxml.jackson.core and com.fasterxml.jackson.databind. Any package below that is not reachable.

But if we export a higher version of com.fasterxml.jackson.core.*, com.fasterxml.jackson.databind.* and com.fasterxml.jackson.annotation.* in our own bundle, the following bundles start importing our version of Jackson:

  • com.adobe.cq.social.cq-social-activitystreams (385)
  • com.adobe.cq.social.cq-social-blog (386)
  • com.adobe.cq.social.cq-social-calendar (387)
  • com.adobe.cq.social.cq-social-commons (389)
  • com.adobe.cq.social.cq-social-console (392)
  • com.adobe.cq.social.cq-social-filelibrary (395)
  • com.adobe.cq.social.cq-social-forum (396)
  • com.adobe.cq.social.cq-social-graph-api (407)
  • com.adobe.cq.social.cq-social-graph-impl (408)
  • com.adobe.cq.social.cq-social-group (397)
  • com.adobe.cq.social.cq-social-handlebars (390)
  • com.adobe.cq.social.cq-social-journal (398)
  • com.adobe.cq.social.cq-social-messaging (399)
  • com.adobe.cq.social.cq-social-moderation (400)
  • com.adobe.cq.social.cq-social-qna (401)
  • com.adobe.cq.social.cq-social-review (402)
  • com.adobe.cq.social.cq-social-scf-impl (404)
  • com.adobe.cq.social.cq-social-tally (412)
  • com.adobe.cq.social.cq-social-translation (413)
  • com.day.cq.dam.cq-dam-commons (332)

Exporting only Jackson annotations and importing Jackson core and databind from AEM itself won't help, even on the same version (different classloader and missing packages).

The reason we don't want AEM to import our version of Jackson is that we might break the AEM communities code and also because deploys take a lot longer due to the heavy OSGi bundle reloading every time we deploy our package.

Any solution to this?

1 Reply

Avatar

Level 10

Here is the reply from the Communities Eng Team: 

There isn’t an easy way to do this on 6.1 GM – the jackson classes exported from the jackson bundles are on the system class path, so Communities picks it up as does anything else in AEM that uses Jackson. Speaking only from the Communities perspective, the customer can update to the latest 1.8 featurepack where we’ve done jackson compatibility testing, and then install whatever version of jackson they want without (too much) worry of breaking Communities. I can’t speak to other parts of AEM, though. And if they try to do this without updating to Communities FP6 and if they update to a recent Jackson, then both Communities and some DAM bundles won’t start.

 

Short answer: update to Communities FP6 then use whatever Jackson you like