Issue with importing JcrTagImpl class in OSGI | Community
Skip to main content
Level 3
October 16, 2015
Solved

Issue with importing JcrTagImpl class in OSGI

  • October 16, 2015
  • 5 replies
  • 1152 views

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.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Feike_Visser1

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

5 replies

Adobe Employee
October 16, 2015

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

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>

Feike_Visser1
Adobe Employee
Feike_Visser1Adobe EmployeeAccepted solution
Adobe Employee
October 16, 2015

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

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?

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.