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

problem instantiating osgi bundle sightly helper java class

  • October 16, 2015
  • 12 replies
  • 7748 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

New Participant
October 16, 2015

Hi Yogesh,

It worked fine in simple sling servlet context.But when I tried to implement in spring mvc it throwed SightlyException.I dont know where I am going wrong.

sling:resourceSuperType : wcm/foundation/components/page

And I never tried with JS use API.

swathiv54399501AuthorAccepted solution
New Participant
October 16, 2015

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.