Hi,
I have created a component using sightly. I've created component java class which extends WCMUse under the component. In this class, I'm using some other util class which is already deployed in AEM instance using maven commands. But whenever I'm rendering my component I'm getting the below error message -
org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: No use provider could resolve identifier: com.mycompany.util.Constants.
........................
Caused by: io.sightly.java.api.SightlyUseException: No use provider could resolve identifier: Constants
at io.sightly.java.engine.extension.use.UseExtension$1.call(UseExtension.java:87)
at io.sightly.java.runtime.common.SightlyRuntimeImpl.call(SightlyRuntimeImpl.java:51)
at apps.tc.components.modules.slideshow.SightlyJava_slideshow.render(SightlyJava_slideshow.java:32)
at io.sightly.java.api.BaseRenderUnit.render(BaseRenderUnit.java:39)
at io.sightly.java.engine.SightlyScriptEngine.evaluateScript(SightlyScriptEngine.java:106)
at io.sightly.java.engine.SightlyScriptEngine.eval(SightlyScriptEngine.java:91)
at org.apache.sling.scripting.core.impl.DefaultSlingScript.call(DefaultSlingScript.java:361)
at org.apache.sling.scripting.core.impl.DefaultSlingScript.eval(DefaultSlingScript.java:171)
at org.apache.sling.scripting.core.impl.DefaultSlingScript.service(DefaultSlingScript.java:463)
... 117 common frames omitted
Remaining components which are using this class, they are working properly. But the remaining components are rendered using JSTL. Please help me in this.
Thanks,
Arya.
Solved! Go to Solution.
Views
Replies
Total Likes
So far I have most of my Sightly development all via OSGi-bundles.
Can you try to move your classes to a bundle, and see if this solves the issue.
Then we know what might be the issue.
Views
Replies
Total Likes
It looks like you did something like:
<tag data-sly-use.var="Constants" ...> ... </tag>
The Use-API accepts only the following objects: classes implementing the io.sightly.java.api interface or extending the com.adobe.cq.sightly.WCMUse class, classes adaptable from Resource / SlingHttpServletRequest and JavaScript Use-API scripts.
Views
Replies
Total Likes
Can you give my your sightly-code? Your data-sly-use usage?
And if possible the code of your class..
Then I can have a look.
Views
Replies
Total Likes
So far I have most of my Sightly development all via OSGi-bundles.
Can you try to move your classes to a bundle, and see if this solves the issue.
Then we know what might be the issue.
Views
Replies
Total Likes
Feike Visser wrote...
Can you give my your sightly-code? Your data-sly-use usage?
And if possible the code of your class..
Then I can have a look.
Hi,
can u pls check ur messages and reply
t
o t
hat
message?.
Thanks
,
Ary
A
Views
Replies
Total Likes