Expand my Community achievements bar.

SOLVED

AEM bundle not starting

Avatar

Level 3

Hi,

my AEM bundle is not starting on local due to "org.apache.sling.servlets.annotations -- Cannot be resolved".
I can't find any bundle exporting "org.apache.sling.servlets.annotations". The package is needed for using SlingServletFilter.

I wonder what I might miss because it was already running like 2 months ago and I haven't done any changes. I even installed the latest AEM SDK but still the same error.
Can you help please, how that missing bundle/package could be added?

Thanks,
Peter

Screenshot 2024-03-04 at 17.59.43.png

Screenshot 2024-03-04 at 17.57.50.png

1 Accepted Solution

Avatar

Correct answer by
Level 3

Thanks @arunpatidar , i finally found the root cause, it seems.

bnd-maven-plugin gave this warning:
[INFO] --- bnd-maven-plugin:6.4.0:bnd-process (bnd-process) @ wknd-spa-react.core ---
[WARNING] /.../core/pom.xml [0:0]: No translation found for macro: componentGroupName

After i have set the componentGroupName property (seems like both empty value or adobe works), my deployed bundle is starting without missing package. I don't see what i had different in the past, because it used to work. 
Anyway, thanks for the help.

Regards,
Peter

View solution in original post

8 Replies

Avatar

Community Advisor

@pnagy 

Use AEM Dependency Manager and get the version and then place that dependency into the projects POM in the dependency section.  http://localhost:4502/system/console/depfinder

Avatar

Community Advisor

@pnagy Try to set the below dependency in your main pom.xml with version and build/deploy and see if it fixes.

<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.servlets.annotations</artifactId>
<version>1.2.6</version>
<scope>provided</scope>
</dependency>

 

Avatar

Level 3

I do have the dependency added in the project with provided scope, but it's not provided on AEM:
Screenshot 2024-03-05 at 10.58.27.png

Avatar

Community Advisor

Hi @pnagy 
I am using import org.apache.sling.servlets.annotations.SlingServletResourceTypes; in AEMaaCS Sdk without an error

https://github.com/arunpatidar02/aemaacs-aemlab/blob/master/core/src/main/java/com/community/aemlab/... 



Arun Patidar

Avatar

Correct answer by
Level 3

Thanks @arunpatidar , i finally found the root cause, it seems.

bnd-maven-plugin gave this warning:
[INFO] --- bnd-maven-plugin:6.4.0:bnd-process (bnd-process) @ wknd-spa-react.core ---
[WARNING] /.../core/pom.xml [0:0]: No translation found for macro: componentGroupName

After i have set the componentGroupName property (seems like both empty value or adobe works), my deployed bundle is starting without missing package. I don't see what i had different in the past, because it used to work. 
Anyway, thanks for the help.

Regards,
Peter