Getting Exception When Accessing Sightly Helper Class | Community
Skip to main content
GK-007
Level 9
March 10, 2016
Solved

Getting Exception When Accessing Sightly Helper Class

  • March 10, 2016
  • 13 replies
  • 5061 views

Hi All,

I have created helper class and written some of the utilities as part of it.Now when i am trying to access this inside my sightly component HTML ,getting below exception.

com.xxxx.dcom.sightly.helpers.components.HomePageBannerComponent POJO.
io.sightly.java.compiler.CompilerException: java.lang.ClassNotFoundException: com.xxxx.dcom.sightly.helpers.components.HomePageBannerComponent
    at io.sightly.java.compiler.SightlyCompileServiceImpl.loadObject(SightlyCompileServiceImpl.java:137)
    at io.sightly.java.compiler.SightlyCompileServiceImpl.getInstance(SightlyCompileServiceImpl.java:80)
    at io.sightly.java.engine.extension.use.PojoUseProvider.provide(PojoUseProvider.java:65)
    at io.sightly.java.engine.extension.use.UseExtension$1.call(UseExtension.java:82)
    at io.sightly.java.runtime.common.SightlyRuntimeImpl.call(SightlyRuntimeImpl.java:51)
    at apps.dcom.dm.components.content.contentsection.homepagebanner.SightlyJava_homepagebanner.render(SightlyJava_homepagebanner.java:50)
    at io.sightly.java.api.BaseRenderUnit.render(BaseRenderUnit.java:39)
    at io.sightly.java.engine.SightlyScriptEngine.evaluateScript(SightlyScriptEngine.java:109)
    at io.sightly.java.engine.SightlyScriptEngine.eval(SightlyScriptEngine.java:93)
    at org.apache.sling.scripting.core.impl.DefaultSlingScript.call(DefaultSlingScript.java:361)
    at org.apache.sling.scripting.core.impl.DefaultSlingScript.eval(DefaultSlingScript.java:171)

Thanks,

Kishore

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 smacdonald2008

Can you follow this  article and see if that works: 

https://helpx.adobe.com/experience-manager/using/creating-sightly-component.html

This will tell us if your issue is your environment. If this works - we can rule out an environment issue. 

13 replies

Tuhin_Ghosh
Level 8
March 11, 2016

By the exception message it looks like the template engine is not able to access the mentioned class file. Could you please check once that you class is present in the OSGI and the bundle is also active. Not exactly sure though.

Regards

Tuhin

edubey
Level 10
March 11, 2016

Share the code for your WCM class in java

GK-007
GK-007Author
Level 9
March 11, 2016

Looks like it's a environmental issue.Checking it.