since ‎08-04-2019
‎21-01-2021
sowmyas47494557
Level 1
Re: Getting an error while creating a custom component using sling model in AEM
Avatar

sowmyas47494557

sowmyas47494557
- Adobe Experience Manager
Is there any significance on the package name? Whenever I create a Project with package name as com.adobe.aem, it resolves to this error irrespective of the Archetype. I tried to create projects with archetype 13 and 15 under another package name and it works fine.

Views

2.0K

Likes

0

Replies

0
Re: Getting an error while creating a custom component using sling model in AEM
Avatar

sowmyas47494557

sowmyas47494557
- Adobe Experience Manager
I have never used this dependency before (org.apache.sling.models.impl). But I did try it by adding these dependencies mentioned, however I still get the error.But I tried to create another Project with archetype 13 and the sling model worked fine.

Views

2.0K

Likes

0

Replies

0
Re: Getting an error while creating a custom component using sling model in AEM
Avatar

sowmyas47494557

sowmyas47494557
- Adobe Experience Manager
I was able to get this touchmulti component working. I tried to create a copy of the helloworld component and was able to get that also working. What was the issue with my original Project? Is it because of the archetype? I see this uses archetype 13 whereas mine was 15.

Views

5.6K

Likes

0

Replies

3
Re: Getting an error while creating a custom component using sling model in AEM
Avatar

sowmyas47494557

sowmyas47494557
- Adobe Experience Manager
The bundle is active.

Views

5.6K

Likes

0

Replies

0
Re: Getting an error while creating a custom component using sling model in AEM
Avatar

sowmyas47494557

sowmyas47494557
- Adobe Experience Manager
Archetype 15 was used. I changed uber-jar version to 6.4 and added commons-lang3 and geronimo-atinject_1.0_spec dependencies into the POM file

Views

5.6K

Likes

0

Replies

2
Re: Getting an error while creating a custom component using sling model in AEM
Avatar

sowmyas47494557

sowmyas47494557
- Adobe Experience Manager
I tried this, but I'm getting the same error. The hello world component which is in the package works fine. When I create a copy of that and create another Model, I get this error.

Views

5.6K

Likes

0

Replies

0
Getting an error while creating a custom component using sling model in AEM
Avatar

sowmyas47494557

sowmyas47494557
- Adobe Experience Manager
Getting the below error while creating a custom component in AEM 6.4 using sling model.Error Message:org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: org.apache.sling.scripting.sightly.SightlyException: Compilation errors in org/apache/sling/scripting/sightly/apps/slingexample/components/content/slingcomponent/slingcomponent_html.java: Line 28, column 1288 : Only a type can be imported. com.adobe.aem.core.models.SlingModel resolves to a package Line 41, column 1795 : SlingMode org.apache.sling maven-sling-plugin -->...

Views

6.3K

Likes

0

Replies

12