getting error whcih developing component

manikanthar1295

14-01-2019

Hi Team,

I have developed the component but  always i'm getting below error

Caused by: org.apache.sling.scripting.sightly.SightlyException: org.apache.sling.scripting.sightly.SightlyException: Compilation errors in org/apache/sling/scripting/sightly/apps/restHTL64/components/content/restComponent/restComponent_html.java:

Line 28, column 1284 : Only a type can be imported. com.community.rest.core.HeroRestComponent resolves to a package

Line 42, column 1916 : HeroRestComponent cannot be resolved to a type

at org.apache.sling.scripting.sightly.impl.engine.SightlyJavaCompilerService.compileSource(SightlyJavaCompilerService.java:183) [org.apache.sling.scripting.sightly:1.0.48.1_3_1]

at org.apache.sling.scripting.sightly.impl.engine.SightlyScriptEngine.internalCompile(SightlyScriptEngine.java:157) [org.apache.sling.scripting.sightly:1.0.48.1_3_1]

at org.apache.sling.scripting.sightly.impl.engine.SightlyScriptEngine.compile(SightlyScriptEngine.java:89) [org.apache.sling.scripting.sightly:1.0.48.1_3_1]

at org.apache.sling.scripting.core.impl.DefaultSlingScript.call(DefaultSlingScript.java:379) [org.apache.sling.scripting.core:2.0.54]

at org.apache.sling.scripting.core.impl.DefaultSlingScript.eval(DefaultSlingScript.java:184) [org.apache.sling.scripting.core:2.0.54]

at org.apache.sling.scripting.core.impl.DefaultSlingScript.service(DefaultSlingScript.java:491) [org.apache.sling.scripting.core:2.0.54]

... 244 common frames omitted

Caused by: org.apache.sling.scripting.sightly.SightlyException: Compilation errors in org/apache/sling/scripting/sightly/apps/restHTL64/components/content/restComponent/restComponent_html.java:

Line 28, column 1284 : Only a type can be imported. com.community.rest.core.HeroRestComponent resolves to a package

Line 42, column 1916 : HeroRestComponent cannot be resolved to a type

at org.apache.sling.scripting.sightly.impl.engine.SightlyJavaCompilerService.compileSource(SightlyJavaCompilerService.java:173) [org.apache.sling.scripting.sightly:1.0.48.1_3_1]

... 249 common frames omitte

What could be the issue.

Please suggest from where issue is coming.

Regards

Manikantha R

Accepted Solutions (1)

Accepted Solutions (1)

NegiCF

14-01-2019

May be You are not using the correct archetype version while creating the project.Use archetype version 13 or higher if using AEM 6.4 or AEM 6.3 SP2. In case using AEM 6.3 then try with version 12.Also check if core. wcm-component package installed through the archetype is correct or not.While facing this issue I feel one of the bundle would be in stopped state.

Answers (4)

Answers (4)

manikanthar1295

07-02-2019

Hi Negi,

i have used below command to create the Project.

mvn org.apache.maven.plugins:maven-archetype-plugin:2.4:generate -DarchetypeGroupId=com.adobe.granite.archetypes -DarchetypeArtifactId=aem-project-archetype -DarchetypeVersion=13 -DarchetypeCatalog=https://repo.adobe.com/nexus/content/groups/public/

I have checked the package manager and below  2 componenets are dependency.

Whether it will cretae any issue.

1686144_pastedImage_0.png