Skip to main content
Var
Level 4
Mar 12, 2017 12:26 AM UTC
Solved

Failed to execute goal (generate-scr-scrdescriptor) on project Unable to load compiled class

Hi There,

am using the below plugins to build my project. and one of my servlet is getting the below error. have any one faced the same issue before.?

<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.2</version> </plugin> <plugin> <groupId>org.apache.felix</groupId> <artifactId>maven-scr-plugin</artifactId> <version>1.20.0</version> <executions> <execution> <id>generate-scr-scrdescriptor</id> <goals> <goal>scr</goal> </goals> <configuration> <!-- Private service properties for all services. --> <properties> <service.vendor>Adobe</service.vendor> </properties> </configuration> </execution> </executions> <configuration> <outputDirectory>${project.build.directory}/classes</outputDirectory> </configuration> <dependencies> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-simple</artifactId> <version>1.5.11</version> </dependency> </dependencies> </plugin>

 

[ERROR] Failed to execute goal org.apache.felix:maven-scr-plugin:1.20.0:scr (generate-scr-scrdescriptor) on project osgiexample.core: E:\MY-Work\TESTProj\osgiexample\core\src\main\java\osgiexample\core\servlets\MyDataProviderServlet.java : Unable to load compiled class: osgiexample.core.servlets.MyDataProviderServlet -> [Help 1]

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Feike_Visser1
Feike_Visser1Accepted solution
Adobe Employee
Mar 14, 2017 7:28 AM UTC

You can remove @Component and @Service from MyDataProviderServlet, not needed when you have @SlingServlet.

After doing that it builds on my machine.

12 replies

smacdonald2008
Level 10
Mar 14, 2017 2:58 PM UTC

Exactly - found that issue with the email code. 

Translate
Var
VarAuthor
Level 4
Mar 14, 2017 3:13 PM UTC

Feike Visser wrote...

You can remove @Component and @Service from MyDataProviderServlet, not needed when you have @SlingServlet.

After doing that it builds on my machine.

 

Thanks Feike & Scott for the great help. it compiles successfully after the removal of @Component and @Service. Appreciate Adobe Community work for the quick and active communication by Scott via email also. 

~VAr

Translate