You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Róbert Csákány (Created JIRA)" <ji...@apache.org> on 2011/12/26 23:22:30 UTC

[jira] [Created] (SLING-2343) query.json Internal Server Error (500)

query.json Internal Server Error (500)
--------------------------------------

                 Key: SLING-2343
                 URL: https://issues.apache.org/jira/browse/SLING-2343
             Project: Sling
          Issue Type: Bug
          Components: Servlets
    Affects Versions: Servlets Get 2.1.2
         Environment: JDK 1.6
            Reporter: Róbert Csákány


I've created a node type:

<ajanlom = 'http://ajanlom.hu/ajanlom/1.0'>
<nt  = 'http://www.jcp.org/jcr/nt/1.0'>
<sling = 'http://sling.apache.org/jcr/sling/1.0'>

[ajanlom:ownerOrganization] > nt:unstructured

There is several thousand nodes typed ajanlom:ownerOrganization. When I iterate over the QueryManager results with same query it works fine.

When I type the following URL:

http://localhost:8080/content.query.json?queryType=xpath&statement=/jcr:root/partner//element(*,ajanlom:ownerOrganization)

I get the following exception:

[{
Internal Server Error (500)

The requested URL /content.query.json resulted in an error in org.apache.sling.servlets.get.impl.JsonQueryServlet.

Exception:

java.lang.NullPointerException
	at org.apache.sling.servlets.get.impl.JsonQueryServlet.dumpResult(JsonQueryServlet.java:193)
	at org.apache.sling.servlets.get.impl.JsonQueryServlet.doGet(JsonQueryServlet.java:106)
	at org.apache.sling.api.servlets.SlingSafeMethodsServlet.mayService(SlingSafeMethodsServlet.java:268)
	at org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.java:344)
	at org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.java:375)
	at org.apache.sling.engine.impl.request.RequestData.service(RequestData.java:491)
	at org.apache.sling.engine.impl.SlingRequestProcessorImpl.processComponent(SlingRequestProcessorImpl.java:273)
	at org.apache.sling.engine.impl.filter.RequestSlingFilterChain.render(RequestSlingFilterChain.java:49)
	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:64)
	at org.apache.sling.engine.impl.debug.RequestProgressTrackerLogFilter.doFilter(RequestProgressTrackerLogFilter.java:59)
	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:60)
	at org.apache.sling.i18n.impl.I18NFilter.doFilter(I18NFilter.java:86)
	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:60)
	at org.apache.sling.engine.impl.SlingRequestProcessorImpl.processRequest(SlingRequestProcessorImpl.java:163)
	at org.apache.sling.engine.impl.SlingMainServlet.service(SlingMainServlet.java:187)
	at org.apache.felix.http.base.internal.handler.ServletHandler.doHandle(ServletHandler.java:91)
	at org.apache.felix.http.base.internal.handler.ServletHandler.handle(ServletHandler.java:77)
	at org.apache.felix.http.base.internal.dispatch.ServletPipeline.handle(ServletPipeline.java:42)
	at org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.doFilter(InvocationFilterChain.java:49)
	at org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter(HttpFilterChain.java:33)
	at org.apache.felix.http.base.internal.dispatch.FilterPipeline.dispatch(FilterPipeline.java:48)
	at org.apache.felix.http.base.internal.dispatch.Dispatcher.dispatch(Dispatcher.java:39)
	at org.apache.felix.http.base.internal.DispatcherServlet.service(DispatcherServlet.java:55)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
	at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:390)
	at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
	at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
	at org.mortbay.jetty.Server.handle(Server.java:326)
	at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:536)
	at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:915)
	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:539)
	at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:405)
	at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
	at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
Request Progress:

      0 (2011-12-26 23:09:33) TIMER_START{Request Processing}
      0 (2011-12-26 23:09:33) COMMENT timer_end format is {<elapsed msec>,<timer name>} <optional message>
      0 (2011-12-26 23:09:33) LOG Method=GET, PathInfo=/content.query.json
      1 (2011-12-26 23:09:33) TIMER_START{ResourceResolution}
      9 (2011-12-26 23:09:33) TIMER_END{8,ResourceResolution} URI=/content.query.json resolves to Resource=NonExistingResource, path=/content.query.json
      9 (2011-12-26 23:09:33) LOG Resource Path Info: SlingRequestPathInfo: path='/content.query.json', selectorString='query', extension='json', suffix='null'
      9 (2011-12-26 23:09:33) TIMER_START{ServletResolution}
      9 (2011-12-26 23:09:33) TIMER_START{resolveServlet(NonExistingResource, path=/content.query.json)}
      9 (2011-12-26 23:09:33) TIMER_END{0,resolveServlet(NonExistingResource, path=/content.query.json)} Using servlet org.apache.sling.servlets.get.impl.JsonQueryServlet
      9 (2011-12-26 23:09:33) TIMER_END{0,ServletResolution} URI=/content.query.json handled by Servlet=org.apache.sling.servlets.get.impl.JsonQueryServlet
      9 (2011-12-26 23:09:33) LOG Applying Requestfilters
      9 (2011-12-26 23:09:33) LOG Calling filter: org.apache.sling.i18n.impl.I18NFilter
      9 (2011-12-26 23:09:33) LOG Calling filter: org.apache.sling.engine.impl.debug.RequestProgressTrackerLogFilter
      9 (2011-12-26 23:09:33) TIMER_START{org.apache.sling.servlets.get.impl.JsonQueryServlet#0}
     25 (2011-12-26 23:09:34) TIMER_END{16,org.apache.sling.servlets.get.impl.JsonQueryServlet#0}
     26 (2011-12-26 23:09:34) TIMER_START{handleError:throwable=java.lang.NullPointerException}
     27 (2011-12-26 23:09:34) TIMER_END{1,handleError:throwable=java.lang.NullPointerException} Using handler org.apache.sling.servlets.resolver.internal.defaults.DefaultErrorHandlerServlet
     28 (2011-12-26 23:09:34) TIMER_END{28,Request Processing} Dumping SlingRequestProgressTracker Entries
ApacheSling/2.2 (Java HotSpot(TM) 64-Bit Server VM 1.6.0_29; Mac OS X 10.6.8 x86_64)

Another types work fine.



--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Resolved] (SLING-2343) query.json Internal Server Error (500)

Posted by "Róbert Csákány (Resolved JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-2343?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Róbert Csákány resolved SLING-2343.
-----------------------------------

    Resolution: Not A Problem

I've found the problem. It was a corruption in Jackrabbit's lucene index that causes item not foud by UUID. I've deleted the lucene indexes and everything become ok when Sling restarted and Jackrabbit reindexed nodes.
                
> query.json Internal Server Error (500)
> --------------------------------------
>
>                 Key: SLING-2343
>                 URL: https://issues.apache.org/jira/browse/SLING-2343
>             Project: Sling
>          Issue Type: Bug
>          Components: Servlets
>    Affects Versions: Servlets Get 2.1.2
>         Environment: JDK 1.6
>            Reporter: Róbert Csákány
>
> I've created a node type:
> <ajanlom = 'http://ajanlom.hu/ajanlom/1.0'>
> <nt  = 'http://www.jcp.org/jcr/nt/1.0'>
> <sling = 'http://sling.apache.org/jcr/sling/1.0'>
> [ajanlom:ownerOrganization] > nt:unstructured
> There is several thousand nodes typed ajanlom:ownerOrganization. When I iterate over the QueryManager results with same query it works fine.
> When I type the following URL:
> http://localhost:8080/content.query.json?queryType=xpath&statement=/jcr:root/partner//element(*,ajanlom:ownerOrganization)
> I get the following exception:
> [{
> Internal Server Error (500)
> The requested URL /content.query.json resulted in an error in org.apache.sling.servlets.get.impl.JsonQueryServlet.
> Exception:
> java.lang.NullPointerException
> 	at org.apache.sling.servlets.get.impl.JsonQueryServlet.dumpResult(JsonQueryServlet.java:193)
> 	at org.apache.sling.servlets.get.impl.JsonQueryServlet.doGet(JsonQueryServlet.java:106)
> 	at org.apache.sling.api.servlets.SlingSafeMethodsServlet.mayService(SlingSafeMethodsServlet.java:268)
> 	at org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.java:344)
> 	at org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.java:375)
> 	at org.apache.sling.engine.impl.request.RequestData.service(RequestData.java:491)
> 	at org.apache.sling.engine.impl.SlingRequestProcessorImpl.processComponent(SlingRequestProcessorImpl.java:273)
> 	at org.apache.sling.engine.impl.filter.RequestSlingFilterChain.render(RequestSlingFilterChain.java:49)
> 	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:64)
> 	at org.apache.sling.engine.impl.debug.RequestProgressTrackerLogFilter.doFilter(RequestProgressTrackerLogFilter.java:59)
> 	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:60)
> 	at org.apache.sling.i18n.impl.I18NFilter.doFilter(I18NFilter.java:86)
> 	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:60)
> 	at org.apache.sling.engine.impl.SlingRequestProcessorImpl.processRequest(SlingRequestProcessorImpl.java:163)
> 	at org.apache.sling.engine.impl.SlingMainServlet.service(SlingMainServlet.java:187)
> 	at org.apache.felix.http.base.internal.handler.ServletHandler.doHandle(ServletHandler.java:91)
> 	at org.apache.felix.http.base.internal.handler.ServletHandler.handle(ServletHandler.java:77)
> 	at org.apache.felix.http.base.internal.dispatch.ServletPipeline.handle(ServletPipeline.java:42)
> 	at org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.doFilter(InvocationFilterChain.java:49)
> 	at org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter(HttpFilterChain.java:33)
> 	at org.apache.felix.http.base.internal.dispatch.FilterPipeline.dispatch(FilterPipeline.java:48)
> 	at org.apache.felix.http.base.internal.dispatch.Dispatcher.dispatch(Dispatcher.java:39)
> 	at org.apache.felix.http.base.internal.DispatcherServlet.service(DispatcherServlet.java:55)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
> 	at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
> 	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:390)
> 	at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
> 	at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
> 	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
> 	at org.mortbay.jetty.Server.handle(Server.java:326)
> 	at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:536)
> 	at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:915)
> 	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:539)
> 	at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
> 	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:405)
> 	at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
> 	at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
> Request Progress:
>       0 (2011-12-26 23:09:33) TIMER_START{Request Processing}
>       0 (2011-12-26 23:09:33) COMMENT timer_end format is {<elapsed msec>,<timer name>} <optional message>
>       0 (2011-12-26 23:09:33) LOG Method=GET, PathInfo=/content.query.json
>       1 (2011-12-26 23:09:33) TIMER_START{ResourceResolution}
>       9 (2011-12-26 23:09:33) TIMER_END{8,ResourceResolution} URI=/content.query.json resolves to Resource=NonExistingResource, path=/content.query.json
>       9 (2011-12-26 23:09:33) LOG Resource Path Info: SlingRequestPathInfo: path='/content.query.json', selectorString='query', extension='json', suffix='null'
>       9 (2011-12-26 23:09:33) TIMER_START{ServletResolution}
>       9 (2011-12-26 23:09:33) TIMER_START{resolveServlet(NonExistingResource, path=/content.query.json)}
>       9 (2011-12-26 23:09:33) TIMER_END{0,resolveServlet(NonExistingResource, path=/content.query.json)} Using servlet org.apache.sling.servlets.get.impl.JsonQueryServlet
>       9 (2011-12-26 23:09:33) TIMER_END{0,ServletResolution} URI=/content.query.json handled by Servlet=org.apache.sling.servlets.get.impl.JsonQueryServlet
>       9 (2011-12-26 23:09:33) LOG Applying Requestfilters
>       9 (2011-12-26 23:09:33) LOG Calling filter: org.apache.sling.i18n.impl.I18NFilter
>       9 (2011-12-26 23:09:33) LOG Calling filter: org.apache.sling.engine.impl.debug.RequestProgressTrackerLogFilter
>       9 (2011-12-26 23:09:33) TIMER_START{org.apache.sling.servlets.get.impl.JsonQueryServlet#0}
>      25 (2011-12-26 23:09:34) TIMER_END{16,org.apache.sling.servlets.get.impl.JsonQueryServlet#0}
>      26 (2011-12-26 23:09:34) TIMER_START{handleError:throwable=java.lang.NullPointerException}
>      27 (2011-12-26 23:09:34) TIMER_END{1,handleError:throwable=java.lang.NullPointerException} Using handler org.apache.sling.servlets.resolver.internal.defaults.DefaultErrorHandlerServlet
>      28 (2011-12-26 23:09:34) TIMER_END{28,Request Processing} Dumping SlingRequestProgressTracker Entries
> ApacheSling/2.2 (Java HotSpot(TM) 64-Bit Server VM 1.6.0_29; Mac OS X 10.6.8 x86_64)
> Another types work fine.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira