Use remote debugging and walk through the code ?

In this particular case, you have a node called
/jars/a23/a23734d6e9cdb1eef1aef5d242a0522dc300f0019.json of type
nt:unstructured. You are requesting
/jars/a23/a23734d6e9cdb1eef1aef5d242a0522dc300f0019.json/ and have
directory indexes turned off. This causes the StreamRenderServlet to
return a FORBIDDEN error.

Setting a breakpoint at the top of DefaultGetServlet.doGet() should
illustrate this for you.

Justin


On Fri, Jul 29, 2011 at 12:18 PM, Phil Rice
<[email protected]> wrote:
> I would appreciate help with advice on how to chase down a bug in the
> DefaultGetServlet.
>
> I make a GET to a page:
> html:localhost:8888//jars/a23/a23734d6e9cdb1eef1aef5d242a0522dc300f0019.json
> and get the following response
>
> <html>
> <head>
> <title>403 Forbidden</title>
> </head>
> <body>
> <h1>Forbidden (403)</h1>
> <p>The requested URL
> /jars/a23/a23734d6e9cdb1eef1aef5d242a0522dc300f0019.json/ resulted in
> an error in org.apache.sling.servlets.get.DefaultGetServlet.</p>
> <h3>Request Progress:</h3>
> <pre>
>       0 (2011-07-29 17:01:12) TIMER_START{Request Processing}
>       0 (2011-07-29 17:01:12) COMMENT timer_end format is {&lt;elapsed
> msec&gt;,&lt;timer name&gt;} &lt;optional message&gt;
>       0 (2011-07-29 17:01:12) LOG Method=GET,
> PathInfo=/jars/a23/a23734d6e9cdb1eef1aef5d242a0522dc300f0019.json/
>       0 (2011-07-29 17:01:12) TIMER_START{ResourceResolution}
>       0 (2011-07-29 17:01:12) TIMER_END{0,ResourceResolution}
> URI=/jars/a23/a23734d6e9cdb1eef1aef5d242a0522dc300f0019.json/ resolves
> to Resource=JcrNodeResource, type=nt:unstructured, superType=null,
> path=/jars/a23/a23734d6e9cdb1eef1aef5d242a0522dc300f0019.json
>       0 (2011-07-29 17:01:12) LOG Resource Path Info:
> SlingRequestPathInfo:
> path='/jars/a23/a23734d6e9cdb1eef1aef5d242a0522dc300f0019.json',
> selectorString='null', extension='null', suffix='/'
>       0 (2011-07-29 17:01:12) TIMER_START{ServletResolution}
>       0 (2011-07-29 17:01:12)
> TIMER_START{resolveServlet(JcrNodeResource, type=nt:unstructured,
> superType=null,
> path=/jars/a23/a23734d6e9cdb1eef1aef5d242a0522dc300f0019.json)}
>       0 (2011-07-29 17:01:12)
> TIMER_END{0,resolveServlet(JcrNodeResource, type=nt:unstructured,
> superType=null,
> path=/jars/a23/a23734d6e9cdb1eef1aef5d242a0522dc300f0019.json)} Using
> servlet org.apache.sling.servlets.get.DefaultGetServlet
>       0 (2011-07-29 17:01:12) TIMER_END{0,ServletResolution}
> URI=/jars/a23/a23734d6e9cdb1eef1aef5d242a0522dc300f0019.json/ handled
> by Servlet=org.apache.sling.servlets.get.DefaultGetServlet
>       0 (2011-07-29 17:01:12) LOG Applying Requestfilters
>       0 (2011-07-29 17:01:12) LOG Calling filter:
> org.apache.sling.engine.impl.debug.RequestProgressTrackerLogFilter
>       1 (2011-07-29 17:01:12)
> TIMER_START{org.apache.sling.servlets.get.DefaultGetServlet#0}
>       1 (2011-07-29 17:01:12) LOG Using
> org.apache.sling.servlets.get.impl.helpers.StreamRendererServlet to
> render for extension=null
>       1 (2011-07-29 17:01:12) TIMER_START{handleError:status=403}
>       1 (2011-07-29 17:01:12) TIMER_END{0,handleError:status=403}
> Using handler 
> org.apache.sling.servlets.resolver.internal.defaults.DefaultErrorHandlerServlet
>       2 (2011-07-29 17:01:12) TIMER_END{2,Request Processing} Dumping
> SlingRequestProgressTracker Entries
> </pre>
> <hr>
> <address>ApacheSling/2.2 (Java HotSpot(TM) 64-Bit Server VM 1.6.0_24;
> Windows 7 6.1 amd64)</address>
> </body>
> </html>
>
> When I investigate in the logs I find the following line:
> 29.07.2011 17:14:58.805 *INFO* [127.0.0.1 [1311956098799] GET
> /jars/a23/a23734d6e9cdb1eef1aef5d242a0522dc300f0019.json/ HTTP/1.1]
> logs/request.log 29/Jul/2011:17:14:58 +0100 [212] <- 403 text/html;
> charset=UTF-8 6ms
>
> So this tells me that there was an error but not what...
>
> I have had a number of errors like this, and fixed them, but it takes
> me a while. Are there are tips that you could advise on how to chase
> these errors down quicker?
>
> Thanks
>

Reply via email to