(AEM 6.4 Maven archetype 13 project) error while including sling components

Avatar

Avatar
Validate 1
Level 2
Prabhat_Jain
Level 2

Likes

10 likes

Total Posts

23 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile

Avatar
Validate 1
Level 2
Prabhat_Jain
Level 2

Likes

10 likes

Total Posts

23 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile
Prabhat_Jain
Level 2

21-09-2018

Hi smacdonald2008,

I am getting following error while adding any sling model component.I am trying to add "hello world" here.May be it is very basic exception but I don't know why it is throwing .

1576056_pastedImage_0.png

Replies

Avatar

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,442 likes

Total Posts

3,318 posts

Correct reply

941 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,442 likes

Total Posts

3,318 posts

Correct reply

941 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile
Arun_Patidar
MVP

21-09-2018

Hi,

Can you check if your bundle is active or not? did you modify the POM for sling models package

<configuration>

                    <instructions>

                        <!-- Import any version of javax.inject, to allow running on multiple versions of AEM -->

                        <Import-Package>javax.inject;version=0.0.0,*</Import-Package>

                        <Sling-Model-Packages>

                            AEMMaven13.core

                        </Sling-Model-Packages>

                    </instructions>

                </configuration>

more info find at below:

Creating an Adobe Experience Manager 6.4 Project using Adobe Maven Archetype 13

Avatar

Avatar
Validate 1
Level 2
Prabhat_Jain
Level 2

Likes

10 likes

Total Posts

23 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile

Avatar
Validate 1
Level 2
Prabhat_Jain
Level 2

Likes

10 likes

Total Posts

23 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile
Prabhat_Jain
Level 2

21-09-2018

Hi Arun Patidar​,

It is default configuration path of "core" package whenever we create any new project.No need to add anything.

1576197_pastedImage_0.png

Avatar

Avatar
Validate 1
Level 2
Prabhat_Jain
Level 2

Likes

10 likes

Total Posts

23 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile

Avatar
Validate 1
Level 2
Prabhat_Jain
Level 2

Likes

10 likes

Total Posts

23 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile
Prabhat_Jain
Level 2

21-09-2018

It is still not working for me!

Avatar

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,442 likes

Total Posts

3,318 posts

Correct reply

941 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,442 likes

Total Posts

3,318 posts

Correct reply

941 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile
Arun_Patidar
MVP

21-09-2018

Hi,

POM looks fine but your package name is in capital, make your package in lower case and build again.

e.g. AEMMaven13 to aemmaven13

Avatar

Avatar
Validate 1
Level 2
Prabhat_Jain
Level 2

Likes

10 likes

Total Posts

23 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile

Avatar
Validate 1
Level 2
Prabhat_Jain
Level 2

Likes

10 likes

Total Posts

23 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile
Prabhat_Jain
Level 2

21-09-2018

Yes first I also think of the same but there are so many projects on helpx which is having same group id with capital letter.

Avatar

Avatar
Validate 1
Level 2
Prabhat_Jain
Level 2

Likes

10 likes

Total Posts

23 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile

Avatar
Validate 1
Level 2
Prabhat_Jain
Level 2

Likes

10 likes

Total Posts

23 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile
Prabhat_Jain
Level 2

21-09-2018

Avatar

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,442 likes

Total Posts

3,318 posts

Correct reply

941 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,442 likes

Total Posts

3,318 posts

Correct reply

941 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile
Arun_Patidar
MVP

21-09-2018

Hi,

Its ok to have Project and Bundle name in caps but the java package name should be in lowercase

for example in above example, package name is com.aem.community.core but artifact name is AEMMaven13.core

try to create new package or update java package in lower case and check.

Java.png

Creating an Adobe Experience Manager 6.4 Project using Adobe Maven Archetype 13

  • groupId - AEMMaven13
  • artifactId - AEMMaven13
  • version - 1.0-SNAPSHOT
  • package - com.aem.community

Avatar

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,409 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,409 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

21-09-2018

This stuff should all work out of the box with no modification. You only need to update the POM as described in the article. See this video.

Avatar

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,409 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,409 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

21-09-2018

IN all HELPX articles - packages are always lower case too. In addition - each one has been tested numerous times by various super users - like Ratna Kumar