mvn clean install -P <Profile Name>, maven command.
Error description is as shown below -
Most of the time this error occur because of the use of these two annotations -
1). Remove @Component annotation while creating Sling Servlet.
2.1). We are not able to activate this Sling Servlet immediately, It is totally dependent on Felix implementation when it will activate this Sling Servlet. i.e. it may or may not be in active state after deploying the package.
2.2). We are not able to use immediate, enabled metatype & other properties provided by @Component
preferred way to use these annotations is -