problem instantiating osgi bundle sightly helper java class | Community
Skip to main content
Level 3
October 16, 2015
Solved

problem instantiating osgi bundle sightly helper java class

  • October 16, 2015
  • 12 replies
  • 7808 views

Earlier I was able to instantiate sightly helper java class(extends wcmuse) of osgi bundle in SlingAllMethodsServlet context and even able to access all the getter methods in that class.But in our project we started working with spring mvc and now I am unable to instantiate the sightly helper class.I have even mentioned all the package info in pom.xml(import and export packages).

Error Message:

org.apache.sling.scripting.sightly.SightlyException: Identifier com.test.sightly.TestSightly cannot be correctly instantiated by the Use API
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 swathiv54399501

Issue resolved.I imported custom packages in pom.xml but forgot to import java use api related packages.Now I am able to instantiate the sightly helper class(OSGI bundle based) after importing com.adobe.cq.sightly package.

12 replies

Level 2
May 6, 2016

Hi Swati,

I am also getting the same error.
Have added custom packages in pom.xml, but still the error persists.
Kindly guide me in this.

Regards,
Maria Anto

mohammadm377380
Level 2
January 18, 2018

Hi,

To solve this, you can change the WCMUse to WCMUsePojo

import com.adobe.cq.sightly.WCMUse;

to

import com.adobe.cq.sightly.WCMUsePojo;

Cheers!