[HTTP][Sling Resource] The webpage at http://localhost:8080/cassandra/pnode1/cnode1/ has resulted in too many redirects

2013-08-20 Thread Dishara Wijewardana
Hi,
As per Ian's request I tried calling a resource URL ends with .json to get
a json rendered page.
There I just noticed that, the response I am getting was which I claimed
earlier a blank page, is not actually a blank page. Sorry for the
inconvenience.

In the browser there is a message as follows. So then I debug it again. I
put a debug pointer only inside CassandraProvider.getResource(), and
observed that it is getting hit continuously. I also noticed that if I hit
for http://localhost:8080/content/cassandra/pnode1/cnode1 , it continuously
calls CassandraProvider.getResource with following paths over and over
again.   Appreciate any input on this ? Why the request is getting looped ?
Because in the code I see no reason to call getResource in a loop.

- /content/cassandra/pnode1/cnode1
- /content/cassandra/pnode1
- /content/cassandra

This webpage has a redirect loop
The webpage at *http://localhost:8080/cassandra/pnode1/cnode1/* has
resulted in too many redirects. Clearing your cookies for this site or
allowing third-party cookies may fix the problem. If not, it is possibly a
server configuration issue and not a problem with your computer.

-- 
Thanks
/Dishara


[jira] [Updated] (SLING-2779) Support for default properties values of a resource

2013-08-20 Thread Gilles Knobloch (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-2779?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Gilles Knobloch updated SLING-2779:
---

Attachment: SLING-2779.patch

I finally had some time to rework this

* Applied most of the changes requested by [~cziegeler] and 
[~alexander.klimetschek]
* Except support for a path as property name, i.e. {{./my/nested/prop}} as this 
is JCR specific (discussed it with [~cziegeler]
* Added Unit tests

Not sure where this should be put in the Sling source code. For now, it's an 
own bundle located at {{bundles/defaults}} folder

> Support for default properties values of a resource
> ---
>
> Key: SLING-2779
> URL: https://issues.apache.org/jira/browse/SLING-2779
> Project: Sling
>  Issue Type: New Feature
>  Components: API
>Affects Versions: API 2.3.0
>Reporter: Gilles Knobloch
> Attachments: SLING-2779.patch
>
>
> I already noticed several times it would be useful to be able to specify a 
> default properties for a resource:
> * if the resource itself contains the property, it will override the default 
> one.
> * but if it doesn't, the default value is used.
> This could be done either via:
> * specifying a {{sling:defaults}} property on the resource, which contains 
> the path to the resource which properties will be used by default.
> * providing a default map of properties
> Attaching a patch for review.
> For testing purpose, I put it under {{org.apache.sling.defaults}}, but I 
> imagine it could go to {{org.apache.sling.api.resource}}.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Comment Edited] (SLING-2779) Support for default properties values of a resource

2013-08-20 Thread Gilles Knobloch (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-2779?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13745066#comment-13745066
 ] 

Gilles Knobloch edited comment on SLING-2779 at 8/20/13 3:41 PM:
-

I finally had some time to rework this

* Applied most of the changes requested by [~cziegeler] and 
[~alexander.klimetschek]
* Except support for a path as property name, i.e. {{./my/nested/prop}} as this 
is JCR specific (discussed it with [~cziegeler])
* Added Unit tests

Not sure where this should be put in the Sling source code. For now, it's an 
own bundle located at {{bundles/defaults}} folder

  was (Author: gknob):
I finally had some time to rework this

* Applied most of the changes requested by [~cziegeler] and 
[~alexander.klimetschek]
* Except support for a path as property name, i.e. {{./my/nested/prop}} as this 
is JCR specific (discussed it with [~cziegeler]
* Added Unit tests

Not sure where this should be put in the Sling source code. For now, it's an 
own bundle located at {{bundles/defaults}} folder
  
> Support for default properties values of a resource
> ---
>
> Key: SLING-2779
> URL: https://issues.apache.org/jira/browse/SLING-2779
> Project: Sling
>  Issue Type: New Feature
>  Components: API
>Affects Versions: API 2.3.0
>Reporter: Gilles Knobloch
> Attachments: SLING-2779.patch
>
>
> I already noticed several times it would be useful to be able to specify a 
> default properties for a resource:
> * if the resource itself contains the property, it will override the default 
> one.
> * but if it doesn't, the default value is used.
> This could be done either via:
> * specifying a {{sling:defaults}} property on the resource, which contains 
> the path to the resource which properties will be used by default.
> * providing a default map of properties
> Attaching a patch for review.
> For testing purpose, I put it under {{org.apache.sling.defaults}}, but I 
> imagine it could go to {{org.apache.sling.api.resource}}.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Comment Edited] (SLING-2779) Support for default properties values of a resource

2013-08-20 Thread Gilles Knobloch (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-2779?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13745066#comment-13745066
 ] 

Gilles Knobloch edited comment on SLING-2779 at 8/20/13 3:50 PM:
-

I finally had some time to rework this

* Applied most of the changes requested by [~cziegeler] and 
[~alexander.klimetschek]
* Except support for a path as property name, i.e. {{./my/nested/prop}} as this 
is JCR specific (discussed it with [~cziegeler])
* Added Unit tests

I also added support for:
* Merge (default) or override mode
** Merge: getting a key would return the current property map's value (if 
available), even if the corresponding default does not exist
** Override: getting a key would return null if the corresponding 
default does not exist
* Ability to delete one or more properties from defaults by providing a Set in 
the constructor

Not sure where this should be put in the Sling source code. For now, it's an 
own bundle located at {{bundles/defaults}} folder

  was (Author: gknob):
I finally had some time to rework this

* Applied most of the changes requested by [~cziegeler] and 
[~alexander.klimetschek]
* Except support for a path as property name, i.e. {{./my/nested/prop}} as this 
is JCR specific (discussed it with [~cziegeler])
* Added Unit tests

Not sure where this should be put in the Sling source code. For now, it's an 
own bundle located at {{bundles/defaults}} folder
  
> Support for default properties values of a resource
> ---
>
> Key: SLING-2779
> URL: https://issues.apache.org/jira/browse/SLING-2779
> Project: Sling
>  Issue Type: New Feature
>  Components: API
>Affects Versions: API 2.3.0
>Reporter: Gilles Knobloch
> Attachments: SLING-2779.patch
>
>
> I already noticed several times it would be useful to be able to specify a 
> default properties for a resource:
> * if the resource itself contains the property, it will override the default 
> one.
> * but if it doesn't, the default value is used.
> This could be done either via:
> * specifying a {{sling:defaults}} property on the resource, which contains 
> the path to the resource which properties will be used by default.
> * providing a default map of properties
> Attaching a patch for review.
> For testing purpose, I put it under {{org.apache.sling.defaults}}, but I 
> imagine it could go to {{org.apache.sling.api.resource}}.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (SLING-2779) Support for default properties values of a resource

2013-08-20 Thread Gilles Knobloch (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-2779?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Gilles Knobloch updated SLING-2779:
---

Attachment: (was: DefaultsValueMap.java)

> Support for default properties values of a resource
> ---
>
> Key: SLING-2779
> URL: https://issues.apache.org/jira/browse/SLING-2779
> Project: Sling
>  Issue Type: New Feature
>  Components: API
>Affects Versions: API 2.3.0
>Reporter: Gilles Knobloch
>
> I already noticed several times it would be useful to be able to specify a 
> default properties for a resource:
> * if the resource itself contains the property, it will override the default 
> one.
> * but if it doesn't, the default value is used.
> This could be done either via:
> * specifying a {{sling:defaults}} property on the resource, which contains 
> the path to the resource which properties will be used by default.
> * providing a default map of properties
> Attaching a patch for review.
> For testing purpose, I put it under {{org.apache.sling.defaults}}, but I 
> imagine it could go to {{org.apache.sling.api.resource}}.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (SLING-2779) Support for default properties values of a resource

2013-08-20 Thread Gilles Knobloch (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-2779?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Gilles Knobloch updated SLING-2779:
---

Attachment: (was: DefaultsValueMap.java)

> Support for default properties values of a resource
> ---
>
> Key: SLING-2779
> URL: https://issues.apache.org/jira/browse/SLING-2779
> Project: Sling
>  Issue Type: New Feature
>  Components: API
>Affects Versions: API 2.3.0
>Reporter: Gilles Knobloch
>
> I already noticed several times it would be useful to be able to specify a 
> default properties for a resource:
> * if the resource itself contains the property, it will override the default 
> one.
> * but if it doesn't, the default value is used.
> This could be done either via:
> * specifying a {{sling:defaults}} property on the resource, which contains 
> the path to the resource which properties will be used by default.
> * providing a default map of properties
> Attaching a patch for review.
> For testing purpose, I put it under {{org.apache.sling.defaults}}, but I 
> imagine it could go to {{org.apache.sling.api.resource}}.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (SLING-3025) Navigating to /system/console/servletresolver causes error 500

2013-08-20 Thread Dan Platon (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-3025?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13745057#comment-13745057
 ] 

Dan Platon commented on SLING-3025:
---

I applied the patch and everything works fine now.

Thank you.

> Navigating to /system/console/servletresolver causes error 500
> --
>
> Key: SLING-3025
> URL: https://issues.apache.org/jira/browse/SLING-3025
> Project: Sling
>  Issue Type: Bug
>  Components: Console, Engine
>Reporter: Dan Platon
> Attachments: SLING-3025.patch
>
>
> Navigating to /system/console/servletresolver causes error 500. 
> This happens on the current revision (Revision: 1515749, according to svn 
> info).
> Stack trace:
> java.lang.NullPointerException
>   at 
> org.apache.sling.servlets.resolver.internal.DecomposedURL.(DecomposedURL.java:38)
>   at 
> org.apache.sling.servlets.resolver.internal.SlingServletResolver$ServletResolverWebConsolePlugin.service(SlingServletResolver.java:1173)
>   at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
>   at 
> org.apache.felix.webconsole.internal.WebConsolePluginAdapter.renderContent(WebConsolePluginAdapter.java:123)
>   at 
> org.apache.felix.webconsole.AbstractWebConsolePlugin.doGet(AbstractWebConsolePlugin.java:174)
>   at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
>   at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
>   at 
> org.apache.felix.webconsole.internal.WebConsolePluginAdapter.service(WebConsolePluginAdapter.java:211)
>   at 
> org.apache.felix.webconsole.internal.servlet.OsgiManager.service(OsgiManager.java:526)
>   at 
> org.apache.felix.webconsole.internal.servlet.OsgiManager.service(OsgiManager.java:450)
>   at 
> org.apache.felix.http.base.internal.handler.ServletHandler.doHandle(ServletHandler.java:96)
>   at 
> org.apache.felix.http.base.internal.handler.ServletHandler.handle(ServletHandler.java:79)
>   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.sling.engine.impl.log.RequestLoggerFilter.doFilter(RequestLoggerFilter.java:75)
>   at 
> org.apache.felix.http.base.internal.handler.FilterHandler.doHandle(FilterHandler.java:88)
>   at 
> org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:76)
>   at 
> org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.doFilter(InvocationFilterChain.java:47)
>   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:67)
>   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:542)
>   at 
> org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:926)
>   at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549)
>   at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
>   at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
>   at 
> org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)
>   at 
> org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (SLING-3025) Navigating to /system/console/servletresolver causes error 500

2013-08-20 Thread Francesco Mari (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-3025?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Francesco Mari updated SLING-3025:
--

Attachment: SLING-3025.patch

This patch should solve the problem. Last change to the web plugin didn't 
handle the case in which the {{url}} request parameter was not specified.

> Navigating to /system/console/servletresolver causes error 500
> --
>
> Key: SLING-3025
> URL: https://issues.apache.org/jira/browse/SLING-3025
> Project: Sling
>  Issue Type: Bug
>  Components: Console, Engine
>Reporter: Dan Platon
> Attachments: SLING-3025.patch
>
>
> Navigating to /system/console/servletresolver causes error 500. 
> This happens on the current revision (Revision: 1515749, according to svn 
> info).
> Stack trace:
> java.lang.NullPointerException
>   at 
> org.apache.sling.servlets.resolver.internal.DecomposedURL.(DecomposedURL.java:38)
>   at 
> org.apache.sling.servlets.resolver.internal.SlingServletResolver$ServletResolverWebConsolePlugin.service(SlingServletResolver.java:1173)
>   at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
>   at 
> org.apache.felix.webconsole.internal.WebConsolePluginAdapter.renderContent(WebConsolePluginAdapter.java:123)
>   at 
> org.apache.felix.webconsole.AbstractWebConsolePlugin.doGet(AbstractWebConsolePlugin.java:174)
>   at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
>   at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
>   at 
> org.apache.felix.webconsole.internal.WebConsolePluginAdapter.service(WebConsolePluginAdapter.java:211)
>   at 
> org.apache.felix.webconsole.internal.servlet.OsgiManager.service(OsgiManager.java:526)
>   at 
> org.apache.felix.webconsole.internal.servlet.OsgiManager.service(OsgiManager.java:450)
>   at 
> org.apache.felix.http.base.internal.handler.ServletHandler.doHandle(ServletHandler.java:96)
>   at 
> org.apache.felix.http.base.internal.handler.ServletHandler.handle(ServletHandler.java:79)
>   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.sling.engine.impl.log.RequestLoggerFilter.doFilter(RequestLoggerFilter.java:75)
>   at 
> org.apache.felix.http.base.internal.handler.FilterHandler.doHandle(FilterHandler.java:88)
>   at 
> org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:76)
>   at 
> org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.doFilter(InvocationFilterChain.java:47)
>   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:67)
>   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:542)
>   at 
> org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:926)
>   at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549)
>   at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
>   at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
>   at 
> org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)
>   at 
> org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


Re: [jira] [Created] (SLING-3025) Navigating to /system/console/servletresolver causes error 500

2013-08-20 Thread Francesco Mari
I attached a very simple patch, please somebody review it.

2013/8/20 Dan Platon (JIRA) :
> Dan Platon created SLING-3025:
> -
>
>  Summary: Navigating to /system/console/servletresolver causes 
> error 500
>  Key: SLING-3025
>  URL: https://issues.apache.org/jira/browse/SLING-3025
>  Project: Sling
>   Issue Type: Bug
>   Components: Console, Engine
> Reporter: Dan Platon
>
>
> Navigating to /system/console/servletresolver causes error 500.
> This happens on the current revision (Revision: 1515749, according to svn 
> info).
>
> Stack trace:
>
> java.lang.NullPointerException
> at 
> org.apache.sling.servlets.resolver.internal.DecomposedURL.(DecomposedURL.java:38)
> at 
> org.apache.sling.servlets.resolver.internal.SlingServletResolver$ServletResolverWebConsolePlugin.service(SlingServletResolver.java:1173)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
> at 
> org.apache.felix.webconsole.internal.WebConsolePluginAdapter.renderContent(WebConsolePluginAdapter.java:123)
> at 
> org.apache.felix.webconsole.AbstractWebConsolePlugin.doGet(AbstractWebConsolePlugin.java:174)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
> at 
> org.apache.felix.webconsole.internal.WebConsolePluginAdapter.service(WebConsolePluginAdapter.java:211)
> at 
> org.apache.felix.webconsole.internal.servlet.OsgiManager.service(OsgiManager.java:526)
> at 
> org.apache.felix.webconsole.internal.servlet.OsgiManager.service(OsgiManager.java:450)
> at 
> org.apache.felix.http.base.internal.handler.ServletHandler.doHandle(ServletHandler.java:96)
> at 
> org.apache.felix.http.base.internal.handler.ServletHandler.handle(ServletHandler.java:79)
> 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.sling.engine.impl.log.RequestLoggerFilter.doFilter(RequestLoggerFilter.java:75)
> at 
> org.apache.felix.http.base.internal.handler.FilterHandler.doHandle(FilterHandler.java:88)
> at 
> org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:76)
> at 
> org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.doFilter(InvocationFilterChain.java:47)
> 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:67)
> 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:542)
> at 
> org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:926)
> at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549)
> at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
> at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
> at 
> org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)
> at 
> org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
>
>
>
>
>
> --
> This message is automatically generated by JIRA.
> If you think it was sent incorrectly, please contact your JIRA administrators
> For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Created] (SLING-3025) Navigating to /system/console/servletresolver causes error 500

2013-08-20 Thread Dan Platon (JIRA)
Dan Platon created SLING-3025:
-

 Summary: Navigating to /system/console/servletresolver causes 
error 500
 Key: SLING-3025
 URL: https://issues.apache.org/jira/browse/SLING-3025
 Project: Sling
  Issue Type: Bug
  Components: Console, Engine
Reporter: Dan Platon


Navigating to /system/console/servletresolver causes error 500. 
This happens on the current revision (Revision: 1515749, according to svn info).

Stack trace:

java.lang.NullPointerException
at 
org.apache.sling.servlets.resolver.internal.DecomposedURL.(DecomposedURL.java:38)
at 
org.apache.sling.servlets.resolver.internal.SlingServletResolver$ServletResolverWebConsolePlugin.service(SlingServletResolver.java:1173)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at 
org.apache.felix.webconsole.internal.WebConsolePluginAdapter.renderContent(WebConsolePluginAdapter.java:123)
at 
org.apache.felix.webconsole.AbstractWebConsolePlugin.doGet(AbstractWebConsolePlugin.java:174)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at 
org.apache.felix.webconsole.internal.WebConsolePluginAdapter.service(WebConsolePluginAdapter.java:211)
at 
org.apache.felix.webconsole.internal.servlet.OsgiManager.service(OsgiManager.java:526)
at 
org.apache.felix.webconsole.internal.servlet.OsgiManager.service(OsgiManager.java:450)
at 
org.apache.felix.http.base.internal.handler.ServletHandler.doHandle(ServletHandler.java:96)
at 
org.apache.felix.http.base.internal.handler.ServletHandler.handle(ServletHandler.java:79)
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.sling.engine.impl.log.RequestLoggerFilter.doFilter(RequestLoggerFilter.java:75)
at 
org.apache.felix.http.base.internal.handler.FilterHandler.doHandle(FilterHandler.java:88)
at 
org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:76)
at 
org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.doFilter(InvocationFilterChain.java:47)
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:67)
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:542)
at 
org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:926)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at 
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)
at 
org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)





--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


Jenkins build became unstable: sling-trunk-1.6 #1836

2013-08-20 Thread Apache Jenkins Server
See 



Jenkins build became unstable: sling-trunk-1.6 » Apache Sling Event Support #1836

2013-08-20 Thread Apache Jenkins Server
See 




Jenkins build became unstable: sling-trunk-1.6 » Apache Sling Sample Integration Tests #1836

2013-08-20 Thread Apache Jenkins Server
See 




Jenkins build is back to stable : sling-trunk-1.7 #211

2013-08-20 Thread Apache Jenkins Server
See 



Jenkins build is back to stable : sling-trunk-1.7 » Apache Sling Launchpad Testing #211

2013-08-20 Thread Apache Jenkins Server
See 




Jenkins build is back to stable : sling-trunk-1.6 #1835

2013-08-20 Thread Apache Jenkins Server
See 



Jenkins build is back to stable : sling-trunk-1.6 » Apache Sling Event Support #1835

2013-08-20 Thread Apache Jenkins Server
See 




Jenkins build became unstable: sling-trunk-1.7 » Apache Sling Launchpad Testing #210

2013-08-20 Thread Apache Jenkins Server
See 




Jenkins build became unstable: sling-trunk-1.7 #210

2013-08-20 Thread Apache Jenkins Server
See 



Jenkins build became unstable: sling-trunk-1.6 » Apache Sling Event Support #1834

2013-08-20 Thread Apache Jenkins Server
See 




Jenkins build is still unstable: sling-trunk-1.6 #1834

2013-08-20 Thread Apache Jenkins Server
See 



Jenkins build is back to stable : sling-trunk-1.6 » Apache Sling Resource-Based Discovery Service #1834

2013-08-20 Thread Apache Jenkins Server
See 




Jenkins build is back to stable : sling-trunk-1.7 #209

2013-08-20 Thread Apache Jenkins Server
See 



Jenkins build is back to stable : sling-trunk-1.7 » Apache Sling Launchpad Base #209

2013-08-20 Thread Apache Jenkins Server
See 




Re: 500 Error when obtaining a resource

2013-08-20 Thread Ian Boston
Hi,

Try adding a .json to the end of the url.
That should cause the json renderer to show you the properties.

If you have any hierarchical content in Cassandra you can also test
that by specifying the number of levels to show.
Add .2.json

That will cause the listChildren methods to be called.
There is more information on the Sling tutorial [1]. Try following the
tutorial again to remind yourself how JCR behaves.

Your ResourceProvider should get a row from Cassandra on request, it
should not get all the rows from Cassandra, so you should never have
all 1M records in memory.

Ian


1 
http://sling.apache.org/documentation/getting-started/discover-sling-in-15-minutes.html


On 20 August 2013 04:22, Dishara Wijewardana  wrote:
> Hi Ian,
> Thank you very much for the explanation.
> I did the changes and commited it. If you see on CassandraResource and
> CassandraResourceProvider,  you will see I have done similar to Planet
> Resource.  And when I do a http://localhost:8080/cassandra/pnode1/cnode1/ I
> am not seeing any errors in BE and either nothing get seen on the browser.
>  It's a  blank page with no errors.
>
> So apparently it seems work. And when I evaluated followings they worked
> fine :-). I currently only added "path" property only for the map.
>
>   ValueMap vm =
> resourceResolver.get("/content/cassandra/testitem").adapTo(ValueMap.class);
> Assert.assertNotNull(vm.get("path"));
> Assert.assertTrue(((String)vm.get("path")).length()>0);
>
>
> So how should we test 1M record test on top of this  (because I am getting
> a blank response on the browser) ?. Even in that case I think I have to
> populate the Map with 1M records for instance. (Correct me if I am wrong).
> But if it is the case, this will consume quite a lot of memory to keep a 1M
> size hash map.
> Please advice how to proceed.
>
> Thanks
>
>
> On Mon, Aug 19, 2013 at 1:40 PM, Ian Boston  wrote:
>
>> Hi,
>> Initially, just to verify that you can get the
>> CassandraResourceProvider to work, just take the code from the
>> PlanetProvider and send back a Map with 1 value (eg path).
>>
>> Once you have that working and can perform a get on the resource, then
>> you need to populate that map with the values associated with the
>> columns in the Cassandra row that represents the Cassandra resource.
>> To give the data in Cassandra some reality you can get you data
>> population code to add the following columns to every cassandra row.
>>
>> path : the path of the resource
>> created : a long representing the time (System.currentTimeMillis())
>> when the resource was created.
>>
>> when you have done that the following test code should be pass.
>>
>> ValueMap vm =
>> resourceResolver.get("/content/cassandra/testitem").adapTo(ValueMap.class);
>> Assert.assertNotNull(vm.get("path"));
>> Assert.assertTrue(((String)vm.get("path")).length()>0);
>> Assert.assertNotNull(vm.get("created"));
>> Assert.assertTrue(((Long)vm.get("path")) < System.currentTimeMillis());
>>
>> Best Regards
>> Ian
>>
>>
>> On 18 August 2013 22:35, Dishara Wijewardana 
>> wrote:
>> > Hi Ian ,
>> > Thanks for the clarification.
>> >
>> > Each PlanetResource value map has two predefined properties (keys) in its
>> > Map. "name" and "distance".  I looked in to the code of
>> > PlanetResource/Provider end to end.
>> > I am trying the understand the rationale behind this so that I can
>> > incooperate this to CassandraResource.
>> >
>> > - To obtain a PlanetResource, the implementation always returns a
>> > PlanetResource on the availability of the Map it maintains "PLANETS".
>> (can
>> > see in getResource/listResource)
>> > - The content of the planet map ONLY has a Pre-Defined number of
>> > key/values. (some planet names and its distances). Because PLANETS map
>> only
>> > populated from the static code block from the provider.
>> > - After server starts the ONLY keys "PLANETS" map have is i.e
>> >  /planets/mercury/
>> > /planets/earth/ and etc. Also for some test there is also
>> > /planets/earth/moon.  And its corresponding PlanetValueMap.
>> >
>> >
>> > - As per current code in planet resource;  if I do a
>> > PlanetResouceProvide#getResource(/planets/myplanet/moon1) this returns
>> > NULL. It returns something only when we pass those pre defined paths. i.e
>> >   /planets/mercury/.
>> >
>> > In CassandraResourceProvider I do not refer any map, but rather directly
>> > deals with the Cassandra DB, after decoding the path to column family
>> key.
>> > Is this PlanetResource provider behavior correct ? If so how my Cassandra
>> > Provider/Resource should map to this? Should I define pre defined column
>> > families like this.
>> >
>> > Thanks
>> >
>> >
>> >
>> >
>> > On Sun, Aug 18, 2013 at 1:43 PM, Ian Boston  wrote:
>> >
>> >> Hi,
>> >> The annotations in PlanetResource add OSGi properties and code that
>> >> registers the class as adatable from a PlanetResource to a ValueMap.
>> >> You need to do the same for CassandraResource. The contents of