com.day.cq.wcm.core.impl.components.ComponentCacheImpl Requested Path xxxxx.servlet is not in available search paths

Avatar

Avatar
Validate 1
Level 2
umamaheswariy65
Level 2

Likes

11 likes

Total Posts

38 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
umamaheswariy65
Level 2

Likes

11 likes

Total Posts

38 posts

Correct reply

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

13-03-2018

Servlet everything looks good but not able to access the servlet after this warning it throwing the exception

org.apache.sling.engine.impl.SlingRequestProcessorImpl service: Uncaught Throwable

javax.servlet.ServletException: Not a Sling HTTP request/response

Any ideas why this is happening.

Thanks In Advance.

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Springboard
Level 7
KiranVedantam1992
Level 7

Likes

198 likes

Total Posts

214 posts

Correct reply

61 solutions
Top badges earned
Springboard
Give Back 5
Ignite 1
Affirm 50
Validate 1
View profile

Avatar
Springboard
Level 7
KiranVedantam1992
Level 7

Likes

198 likes

Total Posts

214 posts

Correct reply

61 solutions
Top badges earned
Springboard
Give Back 5
Ignite 1
Affirm 50
Validate 1
View profile
KiranVedantam1992
Level 7

25-10-2020

Just check the sling servlet method that you declared in component annotation and the method that is utilized in the class body. I declared METHOD_GET in component annotation and using doPost in the class by which I was getting the above error. Once it is corrected, the servlet started responding.

Answers (8)

Answers (8)

Avatar

Avatar
Validate 1
Level 2
kranthiv7238223
Level 2

Likes

5 likes

Total Posts

12 posts

Correct reply

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

Avatar
Validate 1
Level 2
kranthiv7238223
Level 2

Likes

5 likes

Total Posts

12 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
Applaud 5
View profile
kranthiv7238223
Level 2

12-07-2019

me too facing same isue, any help is much appriciated. Thank you.

Avatar

Avatar
Boost 1
Level 1
prabodhvk
Level 1

Like

1 like

Total Posts

1 post

Correct reply

0 solutions
Top badges earned
Boost 1
View profile

Avatar
Boost 1
Level 1
prabodhvk
Level 1

Like

1 like

Total Posts

1 post

Correct reply

0 solutions
Top badges earned
Boost 1
View profile
prabodhvk
Level 1

22-02-2019

Were you able to find a solution for this?

Avatar

Avatar
Boost 3
Level 1
mind119497
Level 1

Likes

3 likes

Total Posts

5 posts

Correct reply

0 solutions
Top badges earned
Boost 3
Boost 1
View profile

Avatar
Boost 3
Level 1
mind119497
Level 1

Likes

3 likes

Total Posts

5 posts

Correct reply

0 solutions
Top badges earned
Boost 3
Boost 1
View profile
mind119497
Level 1

13-03-2018

That is my concern as well.

Why it is not allowing one and in another.

May be it is substituted but still can be able to access not only this one .. couple other servlets are there and using the same.

Need to figure it out what needs to be updated.

Thanks

Avatar

Avatar
Validate 1
Level 4
Rima_Mittal
Level 4

Likes

30 likes

Total Posts

82 posts

Correct reply

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

Avatar
Validate 1
Level 4
Rima_Mittal
Level 4

Likes

30 likes

Total Posts

82 posts

Correct reply

17 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 25
Boost 10
View profile
Rima_Mittal
Level 4

13-03-2018

If you are using AEM 6.3, then felix annotations have to be substituted by OSGI annotations.

@SlingServlet is not allowed anymore, I am not sure how can you access the servlet from one of the bundles.

See SlingServlet Annotation here at the link Official OSGi Declarative Services Annotations in AEM - Adobe Experience Manager | AEM/CQ | Apache S...

Avatar

Avatar
Boost 3
Level 1
mind119497
Level 1

Likes

3 likes

Total Posts

5 posts

Correct reply

0 solutions
Top badges earned
Boost 3
Boost 1
View profile

Avatar
Boost 3
Level 1
mind119497
Level 1

Likes

3 likes

Total Posts

5 posts

Correct reply

0 solutions
Top badges earned
Boost 3
Boost 1
View profile
mind119497
Level 1

13-03-2018

Hi ,

using AEM 6.3 and /services path configured in servlet resolved and OSGI component is Active. I am able to access the servlet from the bundle1 with the same code.  From bundle2 not able to access.

Thanks

Uma

Avatar

Avatar
Validate 1
Level 4
Rima_Mittal
Level 4

Likes

30 likes

Total Posts

82 posts

Correct reply

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

Avatar
Validate 1
Level 4
Rima_Mittal
Level 4

Likes

30 likes

Total Posts

82 posts

Correct reply

17 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 25
Boost 10
View profile
Rima_Mittal
Level 4

13-03-2018

Hi,

1. Which version of AEM are you on?

2. Is /services/ added in execution paths(servletresolver.paths) in Apache Sling Servlet/Script resolver?

3. Do you see your servlet in an active state in OSGI components console?

Avatar

Avatar
Boost 3
Level 1
mind119497
Level 1

Likes

3 likes

Total Posts

5 posts

Correct reply

0 solutions
Top badges earned
Boost 3
Boost 1
View profile

Avatar
Boost 3
Level 1
mind119497
Level 1

Likes

3 likes

Total Posts

5 posts

Correct reply

0 solutions
Top badges earned
Boost 3
Boost 1
View profile
mind119497
Level 1

13-03-2018

Thanks for the reply.

Here is the code for the servlet

@SlingServlet(paths = { "/services/all-sample" }, methods = { "GET", "POST" })
public class xxxxxxxx extends SlingAllMethodsServlet {
private static final long serialVersionUID = 1L;
private static final Logger logger = LoggerFactory.getLogger(xxxxxxxxx.class);

@Override
protected final void doGet(SlingHttpServletRequest request, SlingHttpServletResponse response)
   throws ServletException, IOException {
  logger.info("Able to hit in");

}

@Override
protected final void doPost(SlingHttpServletRequest request, SlingHttpServletResponse response)
   throws ServletException, IOException {
}

}

Have 2 bundles both activate state in console.

The same code able to access from the another bundle but trying to add servlets in the 2nd bundle. From the 2nd bundle not able to access the servlets.

Thanks

Uma

Avatar

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

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

13-03-2018

Looks like you may not have registered it properly. Are you registering it by resource. Can you show the code you are using to reg the servlet.