problem instantiating osgi bundle sightly helper java class | Community
Skip to main content
Level 3
Oct 16, 2015 2:29 AM UTC
Solved

problem instantiating osgi bundle sightly helper java class

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.
swathiv54399501Accepted solution
Level 3
Oct 16, 2015 2:29 AM UTC

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 3
Oct 16, 2015 2:29 AM UTC

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.

Translate
swathiv54399501AuthorAccepted solution
Level 3
Oct 16, 2015 2:29 AM UTC

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.

Translate