No use provider could resolve identifier
Hi,
I'm trying to use custom functions that I wrote in core project in utility folder.
i'm getting the following error when i refer the class in a component.
org.apache.sling.scripting.sightly.impl.engine.extension.use.UseRuntimeExtension No use provider could resolve identifier org.xxx.xxx.core.utility.HelperFunctions
My method looks like this:
----------------------------------------------------------------------------------------------------------------------------------------------------------------
package org.xxx.xxx.core.utility;
import com.adobe.cq.sightly.WCMUse;
public class HelperFunctions extends WCMUse{
private String lowerCaseTitle;
private String lowerCaseDescription;
@Override
public void activate() throws Exception {
lowerCaseTitle = "Hi World title";
lowerCaseDescription = "Hello World Description";
}
public String getLowerCaseTitle() {
return lowerCaseTitle;
}
public String getLowerCaseDescription() {
return lowerCaseDescription;
}
}
---------------------------------------------------------------------------------------------------------------------------------------------------------------
I'm referring in my component like this:
<div data-sly-use.myhelp="org.xxx.xxx.core.utility.HelperFunctions">
<p>
${myhelp.lowerCaseTitle}
</p>
<p>
${myhelp.lowerCaseDescription}
</p>
</div>
----------------------------------------------------------------------------------------------------------------------------------------------------------------
When i move this helper function to the component location where im using, my function is working. but when i use it from core project, im getting the above error.
Thanks for the help in advance!