Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

getting error which whicle developing the componenet

Avatar

Avatar
Affirm 1
Level 3
manikanthar1295
Level 3

Likes

7 likes

Total Posts

83 posts

Correct Reply

1 solution
Top badges earned
Affirm 1
Validate 25
Give Back 10
Give Back 5
Give Back 3
View profile

Avatar
Affirm 1
Level 3
manikanthar1295
Level 3

Likes

7 likes

Total Posts

83 posts

Correct Reply

1 solution
Top badges earned
Affirm 1
Validate 25
Give Back 10
Give Back 5
Give Back 3
View profile
manikanthar1295
Level 3

06-02-2019

Hi Team,

Always getting  below error whicle developing the componenet.

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/restCo mponent_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(S ightlyJavaCompilerService.java:183) [org.apache.sling.scripting.sightly:1.0.48.1_3_1]

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

at org.apache.sling.scripting.sightly.impl.engine.SightlyScriptEngine.compile(SightlyScriptE ngine.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:4 91) [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/restCo mponent_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(S ightlyJavaCompilerService.java:173) [org.apache.sling.scripting.sightly:1.0.48.1_3_1]

... 249 common frames omitte

Need to know why this exception is getting for all the components

This excepting is getting for me when i add the HTL code.

<style>

 

 

h2 {

    display: inline;

}

img{

    float:left;

}

 

 

</style>

<h2>Current Issue</h2>

<div

    data-sly-use.multiItems="aem.community.mf.core.models.Multifield">

    <div data-sly-list.head="${multiItems.products.listChildren}">

        <div style="height:250px;"><img src=${head.pathbr} height=200 width=270 style="padding:4px"/><h2>${head.product}</h2>

                             <p>${head.desc}</p>

                             </div>

                             <hr>

   </div>

</div>

Please help by this error i'm  not able to develop components

Regards

Manikantha R

.

Replies

Avatar

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,408 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,408 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile
smacdonald2008
Level 10

06-02-2019

Follow this article to learn how to successfully build a component that uses HTL and a Java class.

Creating an Adobe Experience Manager 6.4 HTL component that uses the WCMUsePojo API

Do each step in this article and you will see it working.

Avatar

Avatar
Establish
MVP
Gaurav-Behl
MVP

Likes

248 likes

Total Posts

1,147 posts

Correct Reply

283 solutions
Top badges earned
Establish
Give back 300
Give Back 50
Give Back 5
Give Back 3
View profile

Avatar
Establish
MVP
Gaurav-Behl
MVP

Likes

248 likes

Total Posts

1,147 posts

Correct Reply

283 solutions
Top badges earned
Establish
Give back 300
Give Back 50
Give Back 5
Give Back 3
View profile
Gaurav-Behl
MVP

06-02-2019

It seems to be same issue that happened couple of days back for same code and the root cause was wrong maven archetype

getting error whcih developing component

Please validate that correct versions are used.

Avatar

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,408 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,408 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile
smacdonald2008
Level 10

06-02-2019

Also - in the above Article - there is a package that you can install. You can see the working component there.

Avatar

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,408 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,408 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile
smacdonald2008
Level 10

06-02-2019

I just tested the package on 64 and it works perfectly. Please go through that article and you will see how a component written in HTL works.

HTLFeb.png

Avatar

Avatar
Affirm 1
Level 3
manikanthar1295
Level 3

Likes

7 likes

Total Posts

83 posts

Correct Reply

1 solution
Top badges earned
Affirm 1
Validate 25
Give Back 10
Give Back 5
Give Back 3
View profile

Avatar
Affirm 1
Level 3
manikanthar1295
Level 3

Likes

7 likes

Total Posts

83 posts

Correct Reply

1 solution
Top badges earned
Affirm 1
Validate 25
Give Back 10
Give Back 5
Give Back 3
View profile
manikanthar1295
Level 3

07-02-2019

Hi 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/

Mvn version is below

1686250_pastedImage_0.png

I have checked the package manager and i have found two package are having dependency.

1686251_pastedImage_1.png

Whether this will create any issue that error.

Regards

Manikantha R

Avatar

Avatar
Establish
MVP
Gaurav-Behl
MVP

Likes

248 likes

Total Posts

1,147 posts

Correct Reply

283 solutions
Top badges earned
Establish
Give back 300
Give Back 50
Give Back 5
Give Back 3
View profile

Avatar
Establish
MVP
Gaurav-Behl
MVP

Likes

248 likes

Total Posts

1,147 posts

Correct Reply

283 solutions
Top badges earned
Establish
Give back 300
Give Back 50
Give Back 5
Give Back 3
View profile
Gaurav-Behl
MVP

07-02-2019

It would be better to install these packages to avoid any runtime issues. You may also try with a lower mvn version. Not sure if that could be an issue.

You may share your code package for testing.

Avatar

Avatar
Affirm 1
Level 3
manikanthar1295
Level 3

Likes

7 likes

Total Posts

83 posts

Correct Reply

1 solution
Top badges earned
Affirm 1
Validate 25
Give Back 10
Give Back 5
Give Back 3
View profile

Avatar
Affirm 1
Level 3
manikanthar1295
Level 3

Likes

7 likes

Total Posts

83 posts

Correct Reply

1 solution
Top badges earned
Affirm 1
Validate 25
Give Back 10
Give Back 5
Give Back 3
View profile
manikanthar1295
Level 3

08-02-2019

Hi gaurav,

How to upload the package in this forum,

i'm not getting the option for that.

Please let me know how i can share the package.

Regards

Manikantha R