Skip to main content
Level 3
October 16, 2015
解決済み

Issue with importing JcrTagImpl class in OSGI

  • October 16, 2015
  • 5 の返信
  • 1180 ビュー

I need to import JcrTagImpl class which is located in CQ Day Communique 5 Tagging jar file(com.day.cq.cq-tagging)

Then I tried to add the above jar in my pom.xml's dependency as below then I can import the whole package as com.day.cq.tagging.*;

<code><dependency> <groupId>com.day.cq</groupId> <artifactId>cq-tagging</artifactId> <version>5.7.18</version> <scope>provided</scope> </dependency></code>

UPDATE:
I need to call getTagID method which is located in com.day.cq.tagging.JcrTagImpl class. AEM uses com.day.cq.tagging.TagCommandServlet to display the TagID in tagging console. TagCommandServlet is importing JcrTagImpl class and calling getTagID method.

I have my own servlet and I wanted to call getTagID. I could not call directly getTagID of JcrTagImpl implementation since it is not exposed. Can it done by any annotation?Can you please guide me how to call getTagId method.

このトピックへの返信は締め切られました。
ベストアンサー Feike_Visser1

Normally .impl packages are not exported, so you can't use those inside AEM.

5 の返信

smacdonald2008
Level 10
October 16, 2015

We will do a community article on this use case so you will know exactly how to work with this API. 

Level 3
October 16, 2015

Hi Bsloki,  I have tried as you have mentioned but still i am getting the same error in eclipse. Is there anything I need to verify?

Feike_Visser1
Adobe Employee
Adobe Employee
October 16, 2015

Normally .impl packages are not exported, so you can't use those inside AEM.

Lokesh_Shivalingaiah
Level 10
October 16, 2015

Hi Sachin,

cq-tagging is already present in AEM. You dont have to export package for the same. Give the below dependency (5.7.20 is the version in AEM 6) and remove <export-package>.

<dependency>

    <groupId>com.day.cq</groupId>

    <artifactId>cq-tagging</artifactId>

    <version>5.7.20</version>

    <scope>provided</scope>

</dependency>

Adobe Employee
October 16, 2015

Is jcrtagutilimpl not visible when running in AEM? or is it not visible in eclipse?