[jira] [Created] (SLING-3490) Updated embeded Logback version to 1.1.2

2014-04-04 Thread Chetan Mehrotra (JIRA)
Chetan Mehrotra created SLING-3490:
--

 Summary: Updated embeded Logback version to 1.1.2
 Key: SLING-3490
 URL: https://issues.apache.org/jira/browse/SLING-3490
 Project: Sling
  Issue Type: Task
  Components: Commons
Reporter: Chetan Mehrotra
Assignee: Chetan Mehrotra
Priority: Minor


A new release of Logback ver 1.1.2 is available [1]. One improvement of 
interest would be [LOGBACK-268|http://jira.qos.ch/browse/LOGBACK-268] 


[1] http://logback.qos.ch/news.html 



--
This message was sent by Atlassian JIRA
(v6.2#6252)


Re: NullPointerException trying to authenticate when requesting the SlingMainServlet directly

2014-04-04 Thread Antonio Sanso
hi Oliver,

thanks a lot for your reply

On Apr 3, 2014, at 7:09 PM, Oliver Lietz 
apa...@oliverlietz.demailto:apa...@oliverlietz.de wrote:

On Thursday 03 April 2014 16:12:47 Antonio Sanso wrote:
hi *,

hello Antonio,

SLING-722 introduced an important fix to solve some issue related to sling
being registered in a Servlet container. Unluckily this fix has been
removed in SLING-2998.

do you mean the following lines?

-String pathInfo = request.getPathInfo();
-if (pathInfo == null || pathInfo.length() == 0) {
-pathInfo = /“;

correct



Which problem do you see?


the problem with the current code is

private String getPath(HttpServletRequest request) {
final StringBuilder sb = new StringBuilder();
if (request.getServletPath() != null) {
sb.append(request.getServletPath());
}
if (request.getPathInfo() != null) {
sb.append(request.getPathInfo());
}
return sb.toString();
}


that if I deploy slinging a servlet container (e.g. web logic ) using 
contextPath ‘test' and requesting http://localhost:4502/test getPath() returns 
an empty string and this leads to getAnonymousCredentials();

IMHO this is wrong behavior (the correct one would be to include as well the 
old piece of code).

WDYT?

regards

antonio


The rationale behind this is not too clear to me. I am not against
SLING-2998 per se. I think though that SLING-2998 should also contain the
fix contained in SLING-722.

@oliver WDYT?

Did you read the thread on 
us...@sling.apache.orgmailto:us...@sling.apache.org [2]? I did some research
back in 2013 and found a blog post [3] with a solution for my problem: Good
old Cocoon fixes this by simply concatenating the path info and servlet path,
so that your application doesn't have to care about it.

This was tested on Sling [4] and CQ and worked well.

regards

antonio

hth,
O.

[0] https://issues.apache.org/jira/browse/SLING-722
[1] https://issues.apache.org/jira/browse/SLING-2998

[2] http://mail-archives.apache.org/mod_mbox/sling-
users/201308.mbox/201308061718.30832.apa...@oliverlietz.demailto:201308061718.30832.apa...@oliverlietz.de
[3] http://bluxte.net/musings/2006/03/29/servletpath-and-pathinfo-servlet-api-
weirdness
[4] https://github.com/oliverlietz/sling-
tests/tree/master/org.apache.sling.tests/SLING-2998




Re: NullPointerException trying to authenticate when requesting the SlingMainServlet directly

2014-04-04 Thread Antonio Sanso
hi carsten
On Apr 3, 2014, at 6:34 PM, Carsten Ziegeler cziege...@apache.org wrote:

 Hi Antonio,
 
 where is the NPE happening?

I copied the subject from SLING-722 . With the current code there is actual no 
NPE but some functional issue (see my mail to Oliver)

regards

antonio

 
 Carsten
 
 
 2014-04-03 16:12 GMT+02:00 Antonio Sanso asa...@adobe.com:
 
 hi *,
 
 SLING-722 introduced an important fix to solve some issue related to sling
 being registered in a Servlet container.
 Unluckily this fix has been removed in SLING-2998.
 The rationale behind this is not too clear to me. I am not against
 SLING-2998 per se.
 I think though that SLING-2998 should also contain the fix contained in
 SLING-722.
 
 @oliver WDYT?
 
 regards
 
 antonio
 
 
 [0] https://issues.apache.org/jira/browse/SLING-722
 [1] https://issues.apache.org/jira/browse/SLING-2998
 
 
 
 
 -- 
 Carsten Ziegeler
 cziege...@apache.org



Re: NullPointerException trying to authenticate when requesting the SlingMainServlet directly

2014-04-04 Thread Carsten Ziegeler
So we could just add the check to the getPath() method, and this should fix
the problem, right?

Carsten


2014-04-04 9:11 GMT+02:00 Antonio Sanso asa...@adobe.com:

 hi carsten
 On Apr 3, 2014, at 6:34 PM, Carsten Ziegeler cziege...@apache.org wrote:

  Hi Antonio,
 
  where is the NPE happening?

 I copied the subject from SLING-722 . With the current code there is
 actual no NPE but some functional issue (see my mail to Oliver)

 regards

 antonio

 
  Carsten
 
 
  2014-04-03 16:12 GMT+02:00 Antonio Sanso asa...@adobe.com:
 
  hi *,
 
  SLING-722 introduced an important fix to solve some issue related to
 sling
  being registered in a Servlet container.
  Unluckily this fix has been removed in SLING-2998.
  The rationale behind this is not too clear to me. I am not against
  SLING-2998 per se.
  I think though that SLING-2998 should also contain the fix contained in
  SLING-722.
 
  @oliver WDYT?
 
  regards
 
  antonio
 
 
  [0] https://issues.apache.org/jira/browse/SLING-722
  [1] https://issues.apache.org/jira/browse/SLING-2998
 
 
 
 
  --
  Carsten Ziegeler
  cziege...@apache.org




-- 
Carsten Ziegeler
cziege...@apache.org


Re: [VOTE] Release Apache Sling Feature Flags 1.0.0

2014-04-04 Thread Bertrand Delacretaz
Hi,

On Mon, Mar 31, 2014 at 2:25 PM, Carsten Ziegeler cziege...@apache.org wrote:
 ...Staging repository:
 https://repository.apache.org/content/repositories/orgapachesling-1045...

+1, checked signatures, build and that the svn tag matches the below archive.

MD5 org.apache.sling.featureflags-1.0.0-source-release.zip =
e4c05787b3fe0d9aa7ee47b4e6a51f6b

-Bertrand


Re: NullPointerException trying to authenticate when requesting the SlingMainServlet directly

2014-04-04 Thread Antonio Sanso

On Apr 4, 2014, at 9:54 AM, Carsten Ziegeler cziege...@apache.org wrote:

 So we could just add the check to the getPath() method, and this should fix
 the problem, right?
 

I think so. At that point we can as well remove the associated  
getAnonymousCredentials() since getPath can never be empty anymore. Will be at 
least “/“

regards

antonio

 Carsten
 
 
 2014-04-04 9:11 GMT+02:00 Antonio Sanso asa...@adobe.com:
 
 hi carsten
 On Apr 3, 2014, at 6:34 PM, Carsten Ziegeler cziege...@apache.org wrote:
 
 Hi Antonio,
 
 where is the NPE happening?
 
 I copied the subject from SLING-722 . With the current code there is
 actual no NPE but some functional issue (see my mail to Oliver)
 
 regards
 
 antonio
 
 
 Carsten
 
 
 2014-04-03 16:12 GMT+02:00 Antonio Sanso asa...@adobe.com:
 
 hi *,
 
 SLING-722 introduced an important fix to solve some issue related to
 sling
 being registered in a Servlet container.
 Unluckily this fix has been removed in SLING-2998.
 The rationale behind this is not too clear to me. I am not against
 SLING-2998 per se.
 I think though that SLING-2998 should also contain the fix contained in
 SLING-722.
 
 @oliver WDYT?
 
 regards
 
 antonio
 
 
 [0] https://issues.apache.org/jira/browse/SLING-722
 [1] https://issues.apache.org/jira/browse/SLING-2998
 
 
 
 
 --
 Carsten Ziegeler
 cziege...@apache.org
 
 
 
 
 -- 
 Carsten Ziegeler
 cziege...@apache.org



Re: NullPointerException trying to authenticate when requesting the SlingMainServlet directly

2014-04-04 Thread Carsten Ziegeler
Yes, at least the check at the beginning of getAuthenticationInfo - the
fallback at the end is still needed I guess.

Carsten


2014-04-04 10:01 GMT+02:00 Antonio Sanso asa...@adobe.com:


 On Apr 4, 2014, at 9:54 AM, Carsten Ziegeler cziege...@apache.org wrote:

  So we could just add the check to the getPath() method, and this should
 fix
  the problem, right?
 

 I think so. At that point we can as well remove the associated
  getAnonymousCredentials() since getPath can never be empty anymore. Will
 be at least /

 regards

 antonio

  Carsten
 
 
  2014-04-04 9:11 GMT+02:00 Antonio Sanso asa...@adobe.com:
 
  hi carsten
  On Apr 3, 2014, at 6:34 PM, Carsten Ziegeler cziege...@apache.org
 wrote:
 
  Hi Antonio,
 
  where is the NPE happening?
 
  I copied the subject from SLING-722 . With the current code there is
  actual no NPE but some functional issue (see my mail to Oliver)
 
  regards
 
  antonio
 
 
  Carsten
 
 
  2014-04-03 16:12 GMT+02:00 Antonio Sanso asa...@adobe.com:
 
  hi *,
 
  SLING-722 introduced an important fix to solve some issue related to
  sling
  being registered in a Servlet container.
  Unluckily this fix has been removed in SLING-2998.
  The rationale behind this is not too clear to me. I am not against
  SLING-2998 per se.
  I think though that SLING-2998 should also contain the fix contained
 in
  SLING-722.
 
  @oliver WDYT?
 
  regards
 
  antonio
 
 
  [0] https://issues.apache.org/jira/browse/SLING-722
  [1] https://issues.apache.org/jira/browse/SLING-2998
 
 
 
 
  --
  Carsten Ziegeler
  cziege...@apache.org
 
 
 
 
  --
  Carsten Ziegeler
  cziege...@apache.org




-- 
Carsten Ziegeler
cziege...@apache.org


Re: NullPointerException trying to authenticate when requesting the SlingMainServlet directly

2014-04-04 Thread Antonio Sanso

On Apr 4, 2014, at 10:14 AM, Carsten Ziegeler 
cziege...@apache.orgmailto:cziege...@apache.org wrote:
  the
fallback at the end is still needed I guess.

for sure…. :)

regards

antonio


Carsten


2014-04-04 10:01 GMT+02:00 Antonio Sanso 
asa...@adobe.commailto:asa...@adobe.com:


On Apr 4, 2014, at 9:54 AM, Carsten Ziegeler 
cziege...@apache.orgmailto:cziege...@apache.org wrote:

So we could just add the check to the getPath() method, and this should
fix
the problem, right?


I think so. At that point we can as well remove the associated
getAnonymousCredentials() since getPath can never be empty anymore. Will
be at least /

regards

antonio

Carsten


2014-04-04 9:11 GMT+02:00 Antonio Sanso 
asa...@adobe.commailto:asa...@adobe.com:

hi carsten
On Apr 3, 2014, at 6:34 PM, Carsten Ziegeler 
cziege...@apache.orgmailto:cziege...@apache.org
wrote:

Hi Antonio,

where is the NPE happening?

I copied the subject from SLING-722 . With the current code there is
actual no NPE but some functional issue (see my mail to Oliver)

regards

antonio


Carsten


2014-04-03 16:12 GMT+02:00 Antonio Sanso 
asa...@adobe.commailto:asa...@adobe.com:

hi *,

SLING-722 introduced an important fix to solve some issue related to
sling
being registered in a Servlet container.
Unluckily this fix has been removed in SLING-2998.
The rationale behind this is not too clear to me. I am not against
SLING-2998 per se.
I think though that SLING-2998 should also contain the fix contained
in
SLING-722.

@oliver WDYT?

regards

antonio


[0] https://issues.apache.org/jira/browse/SLING-722
[1] https://issues.apache.org/jira/browse/SLING-2998




--
Carsten Ziegeler
cziege...@apache.orgmailto:cziege...@apache.org




--
Carsten Ziegeler
cziege...@apache.orgmailto:cziege...@apache.org




--
Carsten Ziegeler
cziege...@apache.orgmailto:cziege...@apache.org



[VOTE RESULT] Release Apache Sling Feature Flags 1.0.0

2014-04-04 Thread Carsten Ziegeler
Vote passed with three binding +1 votes from Bertrand Delacretaz, Justin
Edelson, and Carsten Ziegeler.




-- 
Carsten Ziegeler
cziege...@apache.org


[VOTE RESULT] Release Apache Sling discovery.impl 1.0.6

2014-04-04 Thread Stefan Egli
The vote passed with three binding +1 votes from Carsten Ziegeler, Bertrand 
Delacretaz and Justin Edelson, and no other votes.

Thanks for voting,

Cheers,
Stefan


[jira] [Closed] (SLING-3182) Filter out invalid alias values

2014-04-04 Thread Carsten Ziegeler (JIRA)

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

Carsten Ziegeler closed SLING-3182.
---


 Filter out invalid alias values
 ---

 Key: SLING-3182
 URL: https://issues.apache.org/jira/browse/SLING-3182
 Project: Sling
  Issue Type: Improvement
  Components: ResourceResolver
Affects Versions: Resource Resolver 1.0.6
Reporter: Carsten Ziegeler
Assignee: Carsten Ziegeler
 Fix For: Resource Resolver 1.1.0


 Right now, the sling:alias property is used as is for reverse mapping and 
 isn't checked for invalid characters which will result in invalid links.
 We should filter those out and ignore the values



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Closed] (SLING-3400) Sling holds resource providers after they have been unregistered

2014-04-04 Thread Carsten Ziegeler (JIRA)

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

Carsten Ziegeler closed SLING-3400.
---


 Sling holds resource providers after they have been unregistered
 

 Key: SLING-3400
 URL: https://issues.apache.org/jira/browse/SLING-3400
 Project: Sling
  Issue Type: Bug
Reporter: Laurie byrum
Assignee: Carsten Ziegeler
 Fix For: Resource Resolver 1.1.0


 We have been checking to see what class references leak after our code has 
 been unloaded. One thing that leaks is our resource provider which is being 
 held in Sling's Resource Resolver. 



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Closed] (SLING-2910) Move web console plugin into category Sling

2014-04-04 Thread Carsten Ziegeler (JIRA)

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

Carsten Ziegeler closed SLING-2910.
---


 Move web console plugin into category Sling
 -

 Key: SLING-2910
 URL: https://issues.apache.org/jira/browse/SLING-2910
 Project: Sling
  Issue Type: Improvement
  Components: ResourceResolver
Reporter: Carsten Ziegeler
Assignee: Carsten Ziegeler
Priority: Minor
 Fix For: Resource Resolver 1.1.0


 Putting all Sling relevant plugins into its own categorie makes the web 
 console easier to use



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Closed] (SLING-3444) Provide a switch to enable feature flags for the resource resolver

2014-04-04 Thread Carsten Ziegeler (JIRA)

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

Carsten Ziegeler closed SLING-3444.
---


 Provide a switch to enable feature flags for the resource resolver
 --

 Key: SLING-3444
 URL: https://issues.apache.org/jira/browse/SLING-3444
 Project: Sling
  Issue Type: Improvement
  Components: Feature Flags, ResourceResolver
Reporter: Carsten Ziegeler
Assignee: Carsten Ziegeler
 Fix For: Feature Flags 1.0.0, Resource Resolver 1.1.0


 When sending a post request which e.g. sets the feature flag property on a 
 resource, this results in an exception in the post servlet. (unsetting is not 
 possible either).
 The reason is, that the post servlet gets the resource several times and once 
 the feature flag is set, it's not visible to the resource resolver anymore.
 This is a proposal on how to fix this:
 FeatureFlag support for hiding resources is an implementation (detail) 
 feature of the ResourceResolver(Impl).
 FeatureFlag support for hiding resources is in general needed for GET 
 (and HEAD) requests only (see the button hiding use case, etc).
 This is the proposed
 Feature Flag Support is disabled by default in the ResourceResolverImpl.
 Feature Flag Support can be enabled in the ResourceResolverImpl by 
 setting a new sling.resourceresolver.feature (or so) property in the 
 authenticationInfo map given to the get*ResourceResolver method.
 The Feature bundle implements an AuthenticationInfoPostProcessor which 
 checks the request method (and optionally a request parameter) to decide 
 whether to set or not the sling.resourceresolver.feature property in the 
 AuthenticationInfo. By default this AuthenticationInfoPostProcessor sets the 
 flag only for GET and HEAD requests.
 This would enable feature flag support for GET/HEAD requests while still 
 alowing content updates with POST (and other non-idempotent) requests. As a 
 consequence, though, background processing requesting ResourceResolver 
 instances from the ResourceResolverFactory directly will by default get 
 ResourceResolver instances with feature flag support disabled.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Closed] (SLING-3332) Long startup time with many sling:alias

2014-04-04 Thread Carsten Ziegeler (JIRA)

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

Carsten Ziegeler closed SLING-3332.
---


 Long startup time with many sling:alias
 ---

 Key: SLING-3332
 URL: https://issues.apache.org/jira/browse/SLING-3332
 Project: Sling
  Issue Type: Improvement
  Components: ResourceResolver
Reporter: Antonio Sanso
Assignee: Antonio Sanso
Priority: Minor
 Fix For: Resource Resolver 1.1.0

 Attachments: SLING-3332.txt


 Similarly to SLING-3290 (Long startup time with many vanityPath) .
 When many  sling:alias are present the system take long time to startup , 
 Same when alias is removed or updated (and many sling:alias are present) .
 The reason behind is the usage of a query that updates the aliasMap used as 
 cache for sling:alias.
 Performance test report to follow



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Closed] (SLING-3183) Add a configuration flag to disable sling vanity path handling

2014-04-04 Thread Carsten Ziegeler (JIRA)

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

Carsten Ziegeler closed SLING-3183.
---


 Add a configuration flag to disable sling vanity path handling
 --

 Key: SLING-3183
 URL: https://issues.apache.org/jira/browse/SLING-3183
 Project: Sling
  Issue Type: Improvement
  Components: ResourceResolver
Affects Versions: Resource Resolver 1.0.6
Reporter: Carsten Ziegeler
Assignee: Carsten Ziegeler
 Fix For: Resource Resolver 1.1.0


 If the sling vanity path feature is not used, it still adds some processing 
 overhead (search executed, observation listener etc.).
 We should add a global flag to disable it if it's not used



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Closed] (SLING-2698) resource access security service for resource providers without backing ACLs

2014-04-04 Thread Carsten Ziegeler (JIRA)

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

Carsten Ziegeler closed SLING-2698.
---


 resource access security service for resource providers without backing ACLs
 

 Key: SLING-2698
 URL: https://issues.apache.org/jira/browse/SLING-2698
 Project: Sling
  Issue Type: New Feature
  Components: ResourceResolver
Reporter: Mike Müller
Assignee: Mike Müller
 Fix For: Resource Resolver 1.1.0

 Attachments: resource-resolver-wrapper.patch


 Adding a minmal resource access gate as discussed in [1].
 First step is to define the API interface and a minimal implementation which 
 allows to define READ access (rest of CRUD can follow later)
 [1] http://markmail.org/thread/4ctczoiy533tquyl



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Closed] (SLING-3160) Creating ResourceResolverFactory as ServiceFactory leads to multiple MapEntries creation

2014-04-04 Thread Carsten Ziegeler (JIRA)

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

Carsten Ziegeler closed SLING-3160.
---


 Creating ResourceResolverFactory as ServiceFactory leads to multiple 
 MapEntries creation
 

 Key: SLING-3160
 URL: https://issues.apache.org/jira/browse/SLING-3160
 Project: Sling
  Issue Type: Bug
  Components: ResourceResolver
Affects Versions: Resource Resolver 1.1.0
Reporter: Chetan Mehrotra
Assignee: Carsten Ziegeler
 Fix For: Resource Resolver 1.1.0

 Attachments: threaddump.txt


 With SLING-2944 ResourceResolverFactory  is now being created as 
 ServiceFactory leading to multiple instances being created for each consuming 
 bundle. 
 Each ResourceResolverFactoryImpl instance keeps a reference to MapEntries 
 which internally spawns a thread to keep the entries upto date. Due to 
 creation of multiple instances there are multiple MapEntries Update thread 
 getting created which is probably not desirable.
 I think all the ResourceResolverFactoryImpl must *share* a singleton state 
 where only single instance of MapEntries gets created



--
This message was sent by Atlassian JIRA
(v6.2#6252)


Re: [VOTE RESULT] Release Apache Sling discovery.impl 1.0.6

2014-04-04 Thread Carsten Ziegeler
I've pushed that version to the dist directory.

Carsten


2014-04-04 11:01 GMT+02:00 Stefan Egli e...@adobe.com:

 The vote passed with three binding +1 votes from Carsten Ziegeler,
 Bertrand Delacretaz and Justin Edelson, and no other votes.

 Thanks for voting,

 Cheers,
 Stefan




-- 
Carsten Ziegeler
cziege...@apache.org


[jira] [Closed] (SLING-2872) StringIndexOutOfBoundsException in resource resolver

2014-04-04 Thread Carsten Ziegeler (JIRA)

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

Carsten Ziegeler closed SLING-2872.
---


 StringIndexOutOfBoundsException in resource resolver
 

 Key: SLING-2872
 URL: https://issues.apache.org/jira/browse/SLING-2872
 Project: Sling
  Issue Type: Bug
  Components: ResourceResolver
Reporter: Antonio Sanso
Assignee: Antonio Sanso
 Fix For: Resource Resolver 1.1.0

 Attachments: SLING-2872-test.txt, SLING-2872.txt


 on a blank Sling instance, create a  mapping with ResourceResolver URL 
 Mapping like following :
  
 /content.html-/$
 call Resolver Map on  /content.html will give 
 java.lang.StringIndexOutOfBoundsException: String index out of range: 2



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Closed] (SLING-3043) Allow white list filtering of vanity paths

2014-04-04 Thread Carsten Ziegeler (JIRA)

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

Carsten Ziegeler closed SLING-3043.
---


 Allow white list filtering of vanity paths
 --

 Key: SLING-3043
 URL: https://issues.apache.org/jira/browse/SLING-3043
 Project: Sling
  Issue Type: Bug
  Components: ResourceResolver
Reporter: Carsten Ziegeler
Assignee: Carsten Ziegeler
  Labels: vanity
 Fix For: Resource Resolver 1.1.0


 Right now a sling:vanityPath can appear anywhere in the resource tree and it 
 can point to any other location in the tree. In some cases, it's helpful to 
 limit the possibilities.
 Therefore we should add regexps to exclude certain parts in the tree for 
 scanning and another set of regexps for filtering the location



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Closed] (SLING-3347) Improve handling of features service reference

2014-04-04 Thread Carsten Ziegeler (JIRA)

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

Carsten Ziegeler closed SLING-3347.
---


 Improve handling of features service reference
 --

 Key: SLING-3347
 URL: https://issues.apache.org/jira/browse/SLING-3347
 Project: Sling
  Issue Type: Improvement
  Components: ResourceResolver
Reporter: Felix Meschberger
Assignee: Felix Meschberger
 Fix For: Resource Resolver 1.1.0


 Currently each access to the ResourceResolverFactoryActivator.getFeatures() 
 method causes the service to be looked up in the Service Component Runtime. 
 Even though this service is cached there, it involves some work to do this 
 lookup.
 It would be better to reduce this lookup to the first use and then cache the 
 reference to the Features object until a change happens, such as the Features 
 service being unregistered.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Closed] (SLING-3350) Simplify Feature Flags API

2014-04-04 Thread Carsten Ziegeler (JIRA)

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

Carsten Ziegeler closed SLING-3350.
---


 Simplify Feature Flags API
 --

 Key: SLING-3350
 URL: https://issues.apache.org/jira/browse/SLING-3350
 Project: Sling
  Issue Type: Improvement
  Components: Extensions
Reporter: Felix Meschberger
Assignee: Felix Meschberger
 Fix For: Feature Flags 1.0.0

 Attachments: SLING-3350.patch


 The Feature Flags API currently is quite complex involving a helper object 
 making query for FeatureFlag status quite complex. Also, setting the current 
 context is clumsy with (currently) two filters.
 I propose a few changes:
 (a) Remove ClientContext object. Checking for feature enablement should be as 
 simple as just calling Features.isEnabled(featureName). Currently the 
 curent ClientContext has to be retrieved and then the isEnabled method being 
 called there.
 (b) Feature flag values are egerly evaluated. This should be done on demand 
 making the context setup much quicker and light-weight. For added performance 
 the evaluation results can still be cached.
 (c) The duplicate filter can be removed by code directly grabbing the 
 ResourceResolver from the request attribute just like the SlingMainServlet 
 does (thanks CarstenZ for the hint).
 (d) We don't currently need the explicit context management because the 
 servlet filter does that directly using internal API.
 (e) I wonder, whether we need all these feature accessors in the Features 
 service, some look like convenience methods, particularly the one of 
 getFeatureNames and getFeatures.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Closed] (SLING-3148) Implement support for Feature Flags/Toggles in Sling

2014-04-04 Thread Carsten Ziegeler (JIRA)

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

Carsten Ziegeler closed SLING-3148.
---


 Implement support for Feature Flags/Toggles in Sling
 

 Key: SLING-3148
 URL: https://issues.apache.org/jira/browse/SLING-3148
 Project: Sling
  Issue Type: New Feature
  Components: Extensions, ResourceResolver
Affects Versions: Resource Resolver 1.0.6
Reporter: Henry Saginor
Assignee: Felix Meschberger
Priority: Minor
 Fix For: Feature Flags 1.0.0, Resource Resolver 1.1.0


 It would be nice if sling provide support for feature flags (also called 
 toggles) pattern [1].
 I am thinking the implementation could provide the following.
 1) Integrate an existing framework such as togglz [2] or implement something 
 similar with UI/Configuration to toggle features.
 2) Create a jcr property (sling:Feature) which can be added to resource type 
 nodes. Then some conditional logic in sling:include, and get and post 
 servlets determines if the resource should be rendered if its resource type 
 contains such property.
 [1] http://en.wikipedia.org/wiki/Feature_toggle
 [2] http://www.togglz.org/



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Closed] (SLING-2975) MapEntry#compareTo method is not consistent and might throw ISE on Java7

2014-04-04 Thread Carsten Ziegeler (JIRA)

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

Carsten Ziegeler closed SLING-2975.
---


 MapEntry#compareTo method is not consistent and might throw ISE on Java7
 

 Key: SLING-2975
 URL: https://issues.apache.org/jira/browse/SLING-2975
 Project: Sling
  Issue Type: Bug
  Components: ResourceResolver
Affects Versions: Resource Resolver 1.0.6
Reporter: Carsten Ziegeler
Assignee: Carsten Ziegeler
 Fix For: Resource Resolver 1.1.0


 On Java7 sorting the map entries might result in an IllegalStateException:
 java.lang.IllegalArgumentException: Comparison method violates its general
 contract!
   at java.util.ComparableTimSort.mergeLo(ComparableTimSort.java:714)
   at java.util.ComparableTimSort.mergeAt(ComparableTimSort.java:451)
   at java.util.ComparableTimSort.mergeCollapse(ComparableTimSort.java:376)
   at java.util.ComparableTimSort.sort(ComparableTimSort.java:182)
   at java.util.ComparableTimSort.sort(ComparableTimSort.java:146)
   at java.util.Arrays.sort(Arrays.java:472)
   at java.util.Collections.sort(Collections.java:155)
 The behaviour of sorting has changed with Java7 (see 
 http://stackoverflow.com/questions/7849539/comparison-method-violates-its-general-contract-java-7-only)
  and it now throws such an exception if the compare method is not implemented 
 in an consistent way.
 In our case: if the two strings have the same lengths, always 1 is returned, 
 so compareTo(a, b) returns 1 while compareTo(b, a) returns 1 as well



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Closed] (SLING-3482) Synthetic resources should lead to a 404

2014-04-04 Thread Carsten Ziegeler (JIRA)

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

Carsten Ziegeler closed SLING-3482.
---


 Synthetic resources should lead to a 404
 

 Key: SLING-3482
 URL: https://issues.apache.org/jira/browse/SLING-3482
 Project: Sling
  Issue Type: Bug
  Components: ResourceResolver
Affects Versions: Resource Resolver 1.0.6
Reporter: Carsten Ziegeler
Assignee: Carsten Ziegeler
 Fix For: Resource Resolver 1.1.0


 If e.g. /libs is requested by a user who does not have access to /libs, a 
 synthetic resource for libs is returned which is then rendered.
 This is due to the special handling for servlet resources which are mounted 
 at /libs/
 I think the code in ResourceProviderEntry#getInternalResource is too generic:
 if (entries.size()  0  entries.size() == elements.length) {
 if (entries.get(entries.size() - 
 1).getResourceProviders().length == 0) {
 logger.debug(Resolved Synthetic {}, fullPath);
 return new SyntheticResource(resourceResolver, fullPath, 
 ResourceProvider.RESOURCE_TYPE_SYNTHETIC);
 }
 }
 However, fixing this might break other parts like the servlet resolver 
 relying on it



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Closed] (SLING-3346) Feature#isEnabled(ExecutionContext) method not evaluated

2014-04-04 Thread Carsten Ziegeler (JIRA)

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

Carsten Ziegeler closed SLING-3346.
---


 Feature#isEnabled(ExecutionContext) method not evaluated
 

 Key: SLING-3346
 URL: https://issues.apache.org/jira/browse/SLING-3346
 Project: Sling
  Issue Type: Bug
  Components: Extensions, ResourceResolver
Reporter: Simone Tripodi
Assignee: Felix Meschberger
 Fix For: Feature Flags 1.0.0, Resource Resolver 1.1.0


 It is enough for a _Resource_ having the {{sling:features}} property set with 
 a valid _Feature_ service name to be disabled -and dropping it re-enables the 
 _Resource_- it doesn't matter which boolean value the method 
 {{Feature#isEnabled(ExecutionContext)}} returns, it is not hit neither 
 evaluated.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


Re: [VOTE RESULT] Release Apache Sling discovery.impl 1.0.6

2014-04-04 Thread Stefan Egli
thanks!
Stefan

On 4/4/14 11:08 AM, Carsten Ziegeler cziege...@apache.org wrote:

I've pushed that version to the dist directory.

Carsten


2014-04-04 11:01 GMT+02:00 Stefan Egli e...@adobe.com:

 The vote passed with three binding +1 votes from Carsten Ziegeler,
 Bertrand Delacretaz and Justin Edelson, and no other votes.

 Thanks for voting,

 Cheers,
 Stefan




-- 
Carsten Ziegeler
cziege...@apache.org



Re: NullPointerException trying to authenticate when requesting the SlingMainServlet directly

2014-04-04 Thread Carsten Ziegeler
So I guess its as simple as this:

Index: src/main/java/org/apache/sling/auth/core/impl/SlingAuthenticator.java
===
---
src/main/java/org/apache/sling/auth/core/impl/SlingAuthenticator.java
(Revision 1584521)
+++
src/main/java/org/apache/sling/auth/core/impl/SlingAuthenticator.java
(Arbeitskopie)
@@ -674,6 +674,9 @@
 if (request.getPathInfo() != null) {
 sb.append(request.getPathInfo());
 }
+if ( sb.length() == 0 ) {
+sb.append(/);
+}
 return sb.toString();
 }

@@ -683,11 +686,6 @@
 // itself has been requested without any more info, this will be
null
 // and we assume the root (SLING-722)
 final String path = getPath(request);
-if (path.length() == 0) {
-// should not happen, be safe an return anonymous credentials
-log.warn(get authentication info: request path is empty;
assuming anonymous);
-return getAnonymousCredentials();
-}

 final ListAbstractAuthenticationHandlerHolder[] localArray =
this.authHandlerCache.findApplicableHolder(request);
 for (int m = 0; m  localArray.length; m++) {

Do we have an issue for this?

Regards
Carsten


2014-04-04 10:17 GMT+02:00 Antonio Sanso asa...@adobe.com:


 On Apr 4, 2014, at 10:14 AM, Carsten Ziegeler cziege...@apache.org
 mailto:cziege...@apache.org wrote:
   the
 fallback at the end is still needed I guess.

 for sure :)

 regards

 antonio


 Carsten


 2014-04-04 10:01 GMT+02:00 Antonio Sanso asa...@adobe.commailto:
 asa...@adobe.com:


 On Apr 4, 2014, at 9:54 AM, Carsten Ziegeler cziege...@apache.orgmailto:
 cziege...@apache.org wrote:

 So we could just add the check to the getPath() method, and this should
 fix
 the problem, right?


 I think so. At that point we can as well remove the associated
 getAnonymousCredentials() since getPath can never be empty anymore. Will
 be at least /

 regards

 antonio

 Carsten


 2014-04-04 9:11 GMT+02:00 Antonio Sanso asa...@adobe.commailto:
 asa...@adobe.com:

 hi carsten
 On Apr 3, 2014, at 6:34 PM, Carsten Ziegeler cziege...@apache.orgmailto:
 cziege...@apache.org
 wrote:

 Hi Antonio,

 where is the NPE happening?

 I copied the subject from SLING-722 . With the current code there is
 actual no NPE but some functional issue (see my mail to Oliver)

 regards

 antonio


 Carsten


 2014-04-03 16:12 GMT+02:00 Antonio Sanso asa...@adobe.commailto:
 asa...@adobe.com:

 hi *,

 SLING-722 introduced an important fix to solve some issue related to
 sling
 being registered in a Servlet container.
 Unluckily this fix has been removed in SLING-2998.
 The rationale behind this is not too clear to me. I am not against
 SLING-2998 per se.
 I think though that SLING-2998 should also contain the fix contained
 in
 SLING-722.

 @oliver WDYT?

 regards

 antonio


 [0] https://issues.apache.org/jira/browse/SLING-722
 [1] https://issues.apache.org/jira/browse/SLING-2998




 --
 Carsten Ziegeler
 cziege...@apache.orgmailto:cziege...@apache.org




 --
 Carsten Ziegeler
 cziege...@apache.orgmailto:cziege...@apache.org




 --
 Carsten Ziegeler
 cziege...@apache.orgmailto:cziege...@apache.org




-- 
Carsten Ziegeler
cziege...@apache.org


Re: NullPointerException trying to authenticate when requesting the SlingMainServlet directly

2014-04-04 Thread Oliver Lietz
On Friday 04 April 2014 11:16:36 Carsten Ziegeler wrote:
 So I guess its as simple as this:
 
 Index:
 src/main/java/org/apache/sling/auth/core/impl/SlingAuthenticator.java
 === ---
 src/main/java/org/apache/sling/auth/core/impl/SlingAuthenticator.java
 (Revision 1584521)
 +++
 src/main/java/org/apache/sling/auth/core/impl/SlingAuthenticator.java
 (Arbeitskopie)
 @@ -674,6 +674,9 @@
  if (request.getPathInfo() != null) {
  sb.append(request.getPathInfo());
  }
 +if ( sb.length() == 0 ) {
 +sb.append(/);
 +}
  return sb.toString();
  }
 
 @@ -683,11 +686,6 @@
  // itself has been requested without any more info, this will be
 null
  // and we assume the root (SLING-722)
  final String path = getPath(request);
 -if (path.length() == 0) {
 -// should not happen, be safe an return anonymous credentials
 -log.warn(get authentication info: request path is empty;
 assuming anonymous);
 -return getAnonymousCredentials();
 -}
 
  final ListAbstractAuthenticationHandlerHolder[] localArray =
 this.authHandlerCache.findApplicableHolder(request);
  for (int m = 0; m  localArray.length; m++) {
 

So we have a case where #getServletPath() returns  and #getPathInfo() null?

http://docs.oracle.com/javaee/6/api/javax/servlet/http/HttpServletRequest.html#getServletPath()

Returns the part of this request's URL that calls the servlet. This path 
starts with a / character and includes either the servlet name or a path to 
the servlet, but does not include any extra path information or a query 
string. Same as the value of the CGI variable SCRIPT_NAME.
This method will return an empty string () if the servlet used to process 
this request was matched using the /* pattern.


http://docs.oracle.com/javaee/6/api/javax/servlet/http/HttpServletRequest.html#getPathInfo()

Returns any extra path information associated with the URL the client sent 
when it made this request. The extra path information follows the servlet path 
but precedes the query string and will start with a / character.
This method returns null if there was no extra path information.
Same as the value of the CGI variable PATH_INFO.

@Carsten: I would keep getPath() unchanged and change the path after the 
comment for SLING-722:

String path = getPath(request);
if (path.length() == 0) {
path = /;
}


Regards,
O.

 Do we have an issue for this?
 
 Regards
 Carsten
 
 2014-04-04 10:17 GMT+02:00 Antonio Sanso asa...@adobe.com:
  On Apr 4, 2014, at 10:14 AM, Carsten Ziegeler cziege...@apache.org
  
  mailto:cziege...@apache.org wrote:
the
  
  fallback at the end is still needed I guess.
  
  for sure :)
  
  regards
  
  antonio
  
  
  Carsten
  
  
  2014-04-04 10:01 GMT+02:00 Antonio Sanso asa...@adobe.commailto:
  asa...@adobe.com:
  
  
  On Apr 4, 2014, at 9:54 AM, Carsten Ziegeler
  cziege...@apache.orgmailto: cziege...@apache.org wrote:
  
  So we could just add the check to the getPath() method, and this should
  fix
  the problem, right?
  
  
  I think so. At that point we can as well remove the associated
  getAnonymousCredentials() since getPath can never be empty anymore. Will
  be at least /
  
  regards
  
  antonio
  
  Carsten
  
  
  2014-04-04 9:11 GMT+02:00 Antonio Sanso asa...@adobe.commailto:
  asa...@adobe.com:
  
  hi carsten
  On Apr 3, 2014, at 6:34 PM, Carsten Ziegeler
  cziege...@apache.orgmailto: cziege...@apache.org
  wrote:
  
  Hi Antonio,
  
  where is the NPE happening?
  
  I copied the subject from SLING-722 . With the current code there is
  actual no NPE but some functional issue (see my mail to Oliver)
  
  regards
  
  antonio
  
  
  Carsten
  
  
  2014-04-03 16:12 GMT+02:00 Antonio Sanso asa...@adobe.commailto:
  asa...@adobe.com:
  
  hi *,
  
  SLING-722 introduced an important fix to solve some issue related to
  sling
  being registered in a Servlet container.
  Unluckily this fix has been removed in SLING-2998.
  The rationale behind this is not too clear to me. I am not against
  SLING-2998 per se.
  I think though that SLING-2998 should also contain the fix contained
  in
  SLING-722.
  
  @oliver WDYT?
  
  regards
  
  antonio
  
  
  [0] https://issues.apache.org/jira/browse/SLING-722
  [1] https://issues.apache.org/jira/browse/SLING-2998


Re: NullPointerException trying to authenticate when requesting the SlingMainServlet directly

2014-04-04 Thread Carsten Ziegeler
Why do you want to keep getPath() unchanged? You have a get method, get
something and then have to check the value and then default to /.
(In the end I don't care where the fix ends up, more curious)

Carsten


2014-04-04 12:13 GMT+02:00 Oliver Lietz apa...@oliverlietz.de:

 On Friday 04 April 2014 11:16:36 Carsten Ziegeler wrote:
  So I guess its as simple as this:
 
  Index:
  src/main/java/org/apache/sling/auth/core/impl/SlingAuthenticator.java
  === ---
  src/main/java/org/apache/sling/auth/core/impl/SlingAuthenticator.java
  (Revision 1584521)
  +++
  src/main/java/org/apache/sling/auth/core/impl/SlingAuthenticator.java
  (Arbeitskopie)
  @@ -674,6 +674,9 @@
   if (request.getPathInfo() != null) {
   sb.append(request.getPathInfo());
   }
  +if ( sb.length() == 0 ) {
  +sb.append(/);
  +}
   return sb.toString();
   }
 
  @@ -683,11 +686,6 @@
   // itself has been requested without any more info, this will be
  null
   // and we assume the root (SLING-722)
   final String path = getPath(request);
  -if (path.length() == 0) {
  -// should not happen, be safe an return anonymous
 credentials
  -log.warn(get authentication info: request path is empty;
  assuming anonymous);
  -return getAnonymousCredentials();
  -}
 
   final ListAbstractAuthenticationHandlerHolder[] localArray =
  this.authHandlerCache.findApplicableHolder(request);
   for (int m = 0; m  localArray.length; m++) {
 

 So we have a case where #getServletPath() returns  and #getPathInfo()
 null?


 http://docs.oracle.com/javaee/6/api/javax/servlet/http/HttpServletRequest.html#getServletPath()

 Returns the part of this request's URL that calls the servlet. This path
 starts with a / character and includes either the servlet name or a path
 to
 the servlet, but does not include any extra path information or a query
 string. Same as the value of the CGI variable SCRIPT_NAME.
 This method will return an empty string () if the servlet used to process
 this request was matched using the /* pattern.



 http://docs.oracle.com/javaee/6/api/javax/servlet/http/HttpServletRequest.html#getPathInfo()

 Returns any extra path information associated with the URL the client sent
 when it made this request. The extra path information follows the servlet
 path
 but precedes the query string and will start with a / character.
 This method returns null if there was no extra path information.
 Same as the value of the CGI variable PATH_INFO.

 @Carsten: I would keep getPath() unchanged and change the path after the
 comment for SLING-722:

 String path = getPath(request);
 if (path.length() == 0) {
 path = /;
 }


 Regards,
 O.

  Do we have an issue for this?
 
  Regards
  Carsten
 
  2014-04-04 10:17 GMT+02:00 Antonio Sanso asa...@adobe.com:
   On Apr 4, 2014, at 10:14 AM, Carsten Ziegeler cziege...@apache.org
  
   mailto:cziege...@apache.org wrote:
 the
  
   fallback at the end is still needed I guess.
  
   for sure :)
  
   regards
  
   antonio
  
  
   Carsten
  
  
   2014-04-04 10:01 GMT+02:00 Antonio Sanso asa...@adobe.commailto:
   asa...@adobe.com:
  
  
   On Apr 4, 2014, at 9:54 AM, Carsten Ziegeler
   cziege...@apache.orgmailto: cziege...@apache.org wrote:
  
   So we could just add the check to the getPath() method, and this should
   fix
   the problem, right?
  
  
   I think so. At that point we can as well remove the associated
   getAnonymousCredentials() since getPath can never be empty anymore.
 Will
   be at least /
  
   regards
  
   antonio
  
   Carsten
  
  
   2014-04-04 9:11 GMT+02:00 Antonio Sanso asa...@adobe.commailto:
   asa...@adobe.com:
  
   hi carsten
   On Apr 3, 2014, at 6:34 PM, Carsten Ziegeler
   cziege...@apache.orgmailto: cziege...@apache.org
   wrote:
  
   Hi Antonio,
  
   where is the NPE happening?
  
   I copied the subject from SLING-722 . With the current code there is
   actual no NPE but some functional issue (see my mail to Oliver)
  
   regards
  
   antonio
  
  
   Carsten
  
  
   2014-04-03 16:12 GMT+02:00 Antonio Sanso asa...@adobe.commailto:
   asa...@adobe.com:
  
   hi *,
  
   SLING-722 introduced an important fix to solve some issue related to
   sling
   being registered in a Servlet container.
   Unluckily this fix has been removed in SLING-2998.
   The rationale behind this is not too clear to me. I am not against
   SLING-2998 per se.
   I think though that SLING-2998 should also contain the fix contained
   in
   SLING-722.
  
   @oliver WDYT?
  
   regards
  
   antonio
  
  
   [0] https://issues.apache.org/jira/browse/SLING-722
   [1] https://issues.apache.org/jira/browse/SLING-2998




-- 
Carsten Ziegeler
cziege...@apache.org


[jira] [Updated] (SLING-3489) Fix the instructions on how to launch/deploy the demos

2014-04-04 Thread David Bosschaert (JIRA)

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

David Bosschaert updated SLING-3489:


Attachment: launchdemos_2.diff

I've updated the patch with additional instructions for the espblog demo.

 Fix the instructions on how to launch/deploy the demos
 --

 Key: SLING-3489
 URL: https://issues.apache.org/jira/browse/SLING-3489
 Project: Sling
  Issue Type: Bug
  Components: Samples
Reporter: David Bosschaert
Priority: Minor
 Attachments: launchdemos_2.diff


 Most Sling samples have incorrect instructions on how to get the Sling 
 container running and on how to deploy the demo itself.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Updated] (SLING-3489) Fix the instructions on how to launch/deploy the demos

2014-04-04 Thread David Bosschaert (JIRA)

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

David Bosschaert updated SLING-3489:


Attachment: (was: launchdemos.diff)

 Fix the instructions on how to launch/deploy the demos
 --

 Key: SLING-3489
 URL: https://issues.apache.org/jira/browse/SLING-3489
 Project: Sling
  Issue Type: Bug
  Components: Samples
Reporter: David Bosschaert
Priority: Minor
 Attachments: launchdemos_2.diff


 Most Sling samples have incorrect instructions on how to get the Sling 
 container running and on how to deploy the demo itself.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


Re: NullPointerException trying to authenticate when requesting the SlingMainServlet directly

2014-04-04 Thread Antonio Sanso
LGTM
On Apr 4, 2014, at 11:16 AM, Carsten Ziegeler cziege...@apache.org wrote:

 So I guess its as simple as this:
 
 Index: src/main/java/org/apache/sling/auth/core/impl/SlingAuthenticator.java
 ===
 ---
 src/main/java/org/apache/sling/auth/core/impl/SlingAuthenticator.java
 (Revision 1584521)
 +++
 src/main/java/org/apache/sling/auth/core/impl/SlingAuthenticator.java
 (Arbeitskopie)
 @@ -674,6 +674,9 @@
 if (request.getPathInfo() != null) {
 sb.append(request.getPathInfo());
 }
 +if ( sb.length() == 0 ) {
 +sb.append(/);
 +}
 return sb.toString();
 }
 
 @@ -683,11 +686,6 @@
 // itself has been requested without any more info, this will be
 null
 // and we assume the root (SLING-722)
 final String path = getPath(request);
 -if (path.length() == 0) {
 -// should not happen, be safe an return anonymous credentials
 -log.warn(get authentication info: request path is empty;
 assuming anonymous);
 -return getAnonymousCredentials();
 -}
 
 final ListAbstractAuthenticationHandlerHolder[] localArray =
 this.authHandlerCache.findApplicableHolder(request);
 for (int m = 0; m  localArray.length; m++) {
 
 Do we have an issue for this?
 
 Regards
 Carsten
 
 
 2014-04-04 10:17 GMT+02:00 Antonio Sanso asa...@adobe.com:
 
 
 On Apr 4, 2014, at 10:14 AM, Carsten Ziegeler cziege...@apache.org
 mailto:cziege...@apache.org wrote:
  the
 fallback at the end is still needed I guess.
 
 for sure :)
 
 regards
 
 antonio
 
 
 Carsten
 
 
 2014-04-04 10:01 GMT+02:00 Antonio Sanso asa...@adobe.commailto:
 asa...@adobe.com:
 
 
 On Apr 4, 2014, at 9:54 AM, Carsten Ziegeler cziege...@apache.orgmailto:
 cziege...@apache.org wrote:
 
 So we could just add the check to the getPath() method, and this should
 fix
 the problem, right?
 
 
 I think so. At that point we can as well remove the associated
 getAnonymousCredentials() since getPath can never be empty anymore. Will
 be at least /
 
 regards
 
 antonio
 
 Carsten
 
 
 2014-04-04 9:11 GMT+02:00 Antonio Sanso asa...@adobe.commailto:
 asa...@adobe.com:
 
 hi carsten
 On Apr 3, 2014, at 6:34 PM, Carsten Ziegeler cziege...@apache.orgmailto:
 cziege...@apache.org
 wrote:
 
 Hi Antonio,
 
 where is the NPE happening?
 
 I copied the subject from SLING-722 . With the current code there is
 actual no NPE but some functional issue (see my mail to Oliver)
 
 regards
 
 antonio
 
 
 Carsten
 
 
 2014-04-03 16:12 GMT+02:00 Antonio Sanso asa...@adobe.commailto:
 asa...@adobe.com:
 
 hi *,
 
 SLING-722 introduced an important fix to solve some issue related to
 sling
 being registered in a Servlet container.
 Unluckily this fix has been removed in SLING-2998.
 The rationale behind this is not too clear to me. I am not against
 SLING-2998 per se.
 I think though that SLING-2998 should also contain the fix contained
 in
 SLING-722.
 
 @oliver WDYT?
 
 regards
 
 antonio
 
 
 [0] https://issues.apache.org/jira/browse/SLING-722
 [1] https://issues.apache.org/jira/browse/SLING-2998
 
 
 
 
 --
 Carsten Ziegeler
 cziege...@apache.orgmailto:cziege...@apache.org
 
 
 
 
 --
 Carsten Ziegeler
 cziege...@apache.orgmailto:cziege...@apache.org
 
 
 
 
 --
 Carsten Ziegeler
 cziege...@apache.orgmailto:cziege...@apache.org
 
 
 
 
 -- 
 Carsten Ziegeler
 cziege...@apache.org



Re: NullPointerException trying to authenticate when requesting the SlingMainServlet directly

2014-04-04 Thread Oliver Lietz
On Friday 04 April 2014 12:20:33 Carsten Ziegeler wrote:
 Why do you want to keep getPath() unchanged? You have a get method, get
 something and then have to check the value and then default to /.
 (In the end I don't care where the fix ends up, more curious)

because we have otherwise get something and change it to a default in 
getPath() *and* we are closer to SLING-722:

Index: 
bundles/auth/core/src/main/java/org/apache/sling/auth/core/impl/SlingAuthenticator.java
===
--- 
bundles/auth/core/src/main/java/org/apache/sling/auth/core/impl/SlingAuthenticator.java
 
(revision 1584529)
+++ 
bundles/auth/core/src/main/java/org/apache/sling/auth/core/impl/SlingAuthenticator.java
 
(working copy)
@@ -680,13 +680,11 @@
 private AuthenticationInfo getAuthenticationInfo(HttpServletRequest 
request, HttpServletResponse response) {
 
 // Get the path used to select the authenticator, if the SlingServlet
-// itself has been requested without any more info, this will be null
+// itself has been requested without any more info, this will be 
empty
 // and we assume the root (SLING-722)
-final String path = getPath(request);
+String path = getPath(request);
 if (path.length() == 0) {
-// should not happen, be safe an return anonymous credentials
-log.warn(get authentication info: request path is empty; 
assuming anonymous);
-return getAnonymousCredentials();
+path = /;
 }
 
 final ListAbstractAuthenticationHandlerHolder[] localArray = 
this.authHandlerCache.findApplicableHolder(request);


O.

 Carsten
 
 2014-04-04 12:13 GMT+02:00 Oliver Lietz apa...@oliverlietz.de:
  On Friday 04 April 2014 11:16:36 Carsten Ziegeler wrote:
   So I guess its as simple as this:
   
   Index:
   src/main/java/org/apache/sling/auth/core/impl/SlingAuthenticator.java
   === ---
   src/main/java/org/apache/sling/auth/core/impl/SlingAuthenticator.java
   (Revision 1584521)
   +++
   src/main/java/org/apache/sling/auth/core/impl/SlingAuthenticator.java
   (Arbeitskopie)
   @@ -674,6 +674,9 @@
   
if (request.getPathInfo() != null) {

sb.append(request.getPathInfo());

}
   
   +if ( sb.length() == 0 ) {
   +sb.append(/);
   +}
   
return sb.toString();

}
   
   @@ -683,11 +686,6 @@
   
// itself has been requested without any more info, this will
be
   
   null
   
// and we assume the root (SLING-722)
final String path = getPath(request);
   
   -if (path.length() == 0) {
   -// should not happen, be safe an return anonymous
  
  credentials
  
   -log.warn(get authentication info: request path is empty;
   assuming anonymous);
   -return getAnonymousCredentials();
   -}
   
final ListAbstractAuthenticationHandlerHolder[] localArray =
   
   this.authHandlerCache.findApplicableHolder(request);
   
for (int m = 0; m  localArray.length; m++) {
  
  So we have a case where #getServletPath() returns  and #getPathInfo()
  null?
  
  
  http://docs.oracle.com/javaee/6/api/javax/servlet/http/HttpServletRequest
  .html#getServletPath()
  
  Returns the part of this request's URL that calls the servlet. This path
  starts with a / character and includes either the servlet name or a
  path to
  the servlet, but does not include any extra path information or a query
  string. Same as the value of the CGI variable SCRIPT_NAME.
  This method will return an empty string () if the servlet used to
  process this request was matched using the /* pattern.
  
  
  
  http://docs.oracle.com/javaee/6/api/javax/servlet/http/HttpServletRequest
  .html#getPathInfo()
  
  Returns any extra path information associated with the URL the client
  sent when it made this request. The extra path information follows the
  servlet path
  but precedes the query string and will start with a / character.
  This method returns null if there was no extra path information.
  Same as the value of the CGI variable PATH_INFO.
  
  @Carsten: I would keep getPath() unchanged and change the path after the
  
  comment for SLING-722:
  String path = getPath(request);
  if (path.length() == 0) {
  
  path = /;
  
  }
  
  Regards,
  O.
  
   Do we have an issue for this?
   
   Regards
   Carsten
   
   2014-04-04 10:17 GMT+02:00 Antonio Sanso asa...@adobe.com:
On Apr 4, 2014, at 10:14 AM, Carsten Ziegeler cziege...@apache.org

mailto:cziege...@apache.org wrote:
  the

fallback at the end is still needed I guess.

for sure :)

regards

antonio


Carsten


2014-04-04 10:01 

[jira] [Created] (SLING-3491) Standalone Launchpad Testing does not start on trunk

2014-04-04 Thread Robert Munteanu (JIRA)
Robert Munteanu created SLING-3491:
--

 Summary: Standalone Launchpad Testing does not start on trunk
 Key: SLING-3491
 URL: https://issues.apache.org/jira/browse/SLING-3491
 Project: Sling
  Issue Type: Bug
  Components: Launchpad
Affects Versions: Launchpad Builder 7
Reporter: Robert Munteanu
Assignee: Carsten Ziegeler
 Fix For: Launchpad Builder 7


When starting the standalone launchpad it can fail with the error below. 
Whether or not you see this depends a little on the version of 
org.apache.felix.http.jetty that you have in your local .m2 directory.

This is caused by the fact that in org.apache.felix.http.jetty version 2.3 the 
API bundles have been split off.

The error is:
19.03.2014 16:17:59.128 *ERROR* [FelixStartLevel] ERROR: Error starting 
slinginstall:org.apache.felix.http.jetty-2.3.0-R1570612.jar 
(org.osgi.framework.BundleException: Unresolved constraint in bundle 
org.apache.felix.http.jetty [5]: Unable to resolve 5.0: missing requirement 
[5.0] osgi.wiring.package; 
((osgi.wiring.package=javax.servlet)(version=3.0.0)(!(version=4.0.0
org.osgi.framework.BundleException: Unresolved constraint in bundle 
org.apache.felix.http.jetty [5]: Unable to resolve 5.0: missing requirement 
[5.0] osgi.wiring.package; 
((osgi.wiring.package=javax.servlet)(version=3.0.0)(!(version=4.0.0)))
19.03.2014 16:17:59.128 *ERROR* [FelixStartLevel]   at 
org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:3962)
19.03.2014 16:17:59.128 *ERROR* [FelixStartLevel]   at 
org.apache.felix.framework.Felix.startBundle(Felix.java:2025)
19.03.2014 16:17:59.128 *ERROR* [FelixStartLevel]   at 
org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1279)
19.03.2014 16:17:59.128 *ERROR* [FelixStartLevel]   at 
org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:304)
19.03.2014 16:17:59.128 *ERROR* [FelixStartLevel]   at 
java.lang.Thread.run(Thread.java:695)



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Updated] (SLING-3491) Standalone Launchpad Testing does not start on trunk

2014-04-04 Thread Robert Munteanu (JIRA)

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

Robert Munteanu updated SLING-3491:
---

Description: The fix from SLING-3468 needs to be applied to the 
launchpad/testing project as well.  (was: When starting the standalone 
launchpad it can fail with the error below. Whether or not you see this depends 
a little on the version of org.apache.felix.http.jetty that you have in your 
local .m2 directory.

This is caused by the fact that in org.apache.felix.http.jetty version 2.3 the 
API bundles have been split off.

The error is:
19.03.2014 16:17:59.128 *ERROR* [FelixStartLevel] ERROR: Error starting 
slinginstall:org.apache.felix.http.jetty-2.3.0-R1570612.jar 
(org.osgi.framework.BundleException: Unresolved constraint in bundle 
org.apache.felix.http.jetty [5]: Unable to resolve 5.0: missing requirement 
[5.0] osgi.wiring.package; 
((osgi.wiring.package=javax.servlet)(version=3.0.0)(!(version=4.0.0
org.osgi.framework.BundleException: Unresolved constraint in bundle 
org.apache.felix.http.jetty [5]: Unable to resolve 5.0: missing requirement 
[5.0] osgi.wiring.package; 
((osgi.wiring.package=javax.servlet)(version=3.0.0)(!(version=4.0.0)))
19.03.2014 16:17:59.128 *ERROR* [FelixStartLevel]   at 
org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:3962)
19.03.2014 16:17:59.128 *ERROR* [FelixStartLevel]   at 
org.apache.felix.framework.Felix.startBundle(Felix.java:2025)
19.03.2014 16:17:59.128 *ERROR* [FelixStartLevel]   at 
org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1279)
19.03.2014 16:17:59.128 *ERROR* [FelixStartLevel]   at 
org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:304)
19.03.2014 16:17:59.128 *ERROR* [FelixStartLevel]   at 
java.lang.Thread.run(Thread.java:695))

 Standalone Launchpad Testing does not start on trunk
 

 Key: SLING-3491
 URL: https://issues.apache.org/jira/browse/SLING-3491
 Project: Sling
  Issue Type: Bug
  Components: Launchpad
Affects Versions: Launchpad Builder 7
Reporter: Robert Munteanu
Assignee: Carsten Ziegeler
 Fix For: Launchpad Builder 7


 The fix from SLING-3468 needs to be applied to the launchpad/testing project 
 as well.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Resolved] (SLING-3491) Standalone Launchpad Testing does not start on trunk

2014-04-04 Thread Robert Munteanu (JIRA)

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

Robert Munteanu resolved SLING-3491.


Resolution: Fixed
  Assignee: Robert Munteanu  (was: Carsten Ziegeler)

Fixed in http://svn.apache.org/r1584648

 Standalone Launchpad Testing does not start on trunk
 

 Key: SLING-3491
 URL: https://issues.apache.org/jira/browse/SLING-3491
 Project: Sling
  Issue Type: Bug
  Components: Launchpad
Affects Versions: Launchpad Builder 7
Reporter: Robert Munteanu
Assignee: Robert Munteanu
 Fix For: Launchpad Builder 7


 The fix from SLING-3468 needs to be applied to the launchpad/testing project 
 as well.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Updated] (SLING-3489) Fix the instructions on how to launch/deploy the demos

2014-04-04 Thread David Bosschaert (JIRA)

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

David Bosschaert updated SLING-3489:


Attachment: (was: launchdemos_2.diff)

 Fix the instructions on how to launch/deploy the demos
 --

 Key: SLING-3489
 URL: https://issues.apache.org/jira/browse/SLING-3489
 Project: Sling
  Issue Type: Bug
  Components: Samples
Reporter: David Bosschaert
Priority: Minor

 Most Sling samples have incorrect instructions on how to get the Sling 
 container running and on how to deploy the demo itself.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Updated] (SLING-3489) Fix the instructions on how to launch/deploy the demos

2014-04-04 Thread David Bosschaert (JIRA)

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

David Bosschaert updated SLING-3489:


Attachment: launchdemos_3.diff

Updated the patch to provide better documentation for the 
accessmanager.ui/usermanager.ui samples as well.

 Fix the instructions on how to launch/deploy the demos
 --

 Key: SLING-3489
 URL: https://issues.apache.org/jira/browse/SLING-3489
 Project: Sling
  Issue Type: Bug
  Components: Samples
Reporter: David Bosschaert
Priority: Minor
 Attachments: launchdemos_3.diff


 Most Sling samples have incorrect instructions on how to get the Sling 
 container running and on how to deploy the demo itself.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Updated] (SLING-3492) failed authentication when Sling is deployed in an app server

2014-04-04 Thread Antonio Sanso (JIRA)

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

Antonio Sanso updated SLING-3492:
-

Summary: failed authentication when Sling is deployed in an app server  
(was: failed authnetication when Sling is deployed in an app server)

 failed authentication when Sling is deployed in an app server
 -

 Key: SLING-3492
 URL: https://issues.apache.org/jira/browse/SLING-3492
 Project: Sling
  Issue Type: Bug
  Components: Authentication
Reporter: Antonio Sanso

 As reported in [0] SLING-2998 reverted a fix introduced in SLING-722.
 The problem with the current code is
 {code}
 private String getPath(HttpServletRequest request) {
 final StringBuilder sb = new StringBuilder();
 if (request.getServletPath() != null) {
 sb.append(request.getServletPath());
 }
 if (request.getPathInfo() != null) {
 sb.append(request.getPathInfo());
 }
 return sb.toString();
 }
 {code}
 that if I deploy sling in a servlet container (e.g. web logic ) using 
 contextPath ‘test' and requesting http://localhost:4502/test getPath() 
 returns 
 an empty string and this leads to getAnonymousCredentials();
 [0]  http://www.mail-archive.com/dev@sling.apache.org/msg28252.html



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Created] (SLING-3492) failed authnetication when Sling is deployed in an app server

2014-04-04 Thread Antonio Sanso (JIRA)
Antonio Sanso created SLING-3492:


 Summary: failed authnetication when Sling is deployed in an app 
server
 Key: SLING-3492
 URL: https://issues.apache.org/jira/browse/SLING-3492
 Project: Sling
  Issue Type: Bug
  Components: Authentication
Reporter: Antonio Sanso


As reported in [0] SLING-2998 reverted a fix introduced in SLING-722.

The problem with the current code is

{code}
private String getPath(HttpServletRequest request) {
final StringBuilder sb = new StringBuilder();
if (request.getServletPath() != null) {
sb.append(request.getServletPath());
}
if (request.getPathInfo() != null) {
sb.append(request.getPathInfo());
}
return sb.toString();
}
{code}

that if I deploy sling in a servlet container (e.g. web logic ) using 
contextPath ‘test' and requesting http://localhost:4502/test getPath() returns 
an empty string and this leads to getAnonymousCredentials();


[0]  http://www.mail-archive.com/dev@sling.apache.org/msg28252.html



--
This message was sent by Atlassian JIRA
(v6.2#6252)


Re: NullPointerException trying to authenticate when requesting the SlingMainServlet directly

2014-04-04 Thread Antonio Sanso
hi Oliver,

this can work as well.

I have opened https://issues.apache.org/jira/browse/SLING-3492 and everybody is 
fine I am going to attach this patch.

regards

antonio

On Apr 4, 2014, at 1:47 PM, Oliver Lietz apa...@oliverlietz.de wrote:

 On Friday 04 April 2014 12:20:33 Carsten Ziegeler wrote:
 Why do you want to keep getPath() unchanged? You have a get method, get
 something and then have to check the value and then default to /.
 (In the end I don't care where the fix ends up, more curious)
 
 because we have otherwise get something and change it to a default in 
 getPath() *and* we are closer to SLING-722:
 
 Index: 
 bundles/auth/core/src/main/java/org/apache/sling/auth/core/impl/SlingAuthenticator.java
 ===
 --- 
 bundles/auth/core/src/main/java/org/apache/sling/auth/core/impl/SlingAuthenticator.java

 (revision 1584529)
 +++ 
 bundles/auth/core/src/main/java/org/apache/sling/auth/core/impl/SlingAuthenticator.java

 (working copy)
 @@ -680,13 +680,11 @@
 private AuthenticationInfo getAuthenticationInfo(HttpServletRequest 
 request, HttpServletResponse response) {
 
 // Get the path used to select the authenticator, if the SlingServlet
 -// itself has been requested without any more info, this will be null
 +// itself has been requested without any more info, this will be 
 empty
 // and we assume the root (SLING-722)
 -final String path = getPath(request);
 +String path = getPath(request);
 if (path.length() == 0) {
 -// should not happen, be safe an return anonymous credentials
 -log.warn(get authentication info: request path is empty; 
 assuming anonymous);
 -return getAnonymousCredentials();
 +path = /;
 }
 
 final ListAbstractAuthenticationHandlerHolder[] localArray = 
 this.authHandlerCache.findApplicableHolder(request);
 
 
 O.
 
 Carsten
 
 2014-04-04 12:13 GMT+02:00 Oliver Lietz apa...@oliverlietz.de:
 On Friday 04 April 2014 11:16:36 Carsten Ziegeler wrote:
 So I guess its as simple as this:
 
 Index:
 src/main/java/org/apache/sling/auth/core/impl/SlingAuthenticator.java
 === ---
 src/main/java/org/apache/sling/auth/core/impl/SlingAuthenticator.java
 (Revision 1584521)
 +++
 src/main/java/org/apache/sling/auth/core/impl/SlingAuthenticator.java
 (Arbeitskopie)
 @@ -674,6 +674,9 @@
 
 if (request.getPathInfo() != null) {
 
 sb.append(request.getPathInfo());
 
 }
 
 +if ( sb.length() == 0 ) {
 +sb.append(/);
 +}
 
 return sb.toString();
 
 }
 
 @@ -683,11 +686,6 @@
 
 // itself has been requested without any more info, this will
 be
 
 null
 
 // and we assume the root (SLING-722)
 final String path = getPath(request);
 
 -if (path.length() == 0) {
 -// should not happen, be safe an return anonymous
 
 credentials
 
 -log.warn(get authentication info: request path is empty;
 assuming anonymous);
 -return getAnonymousCredentials();
 -}
 
 final ListAbstractAuthenticationHandlerHolder[] localArray =
 
 this.authHandlerCache.findApplicableHolder(request);
 
 for (int m = 0; m  localArray.length; m++) {
 
 So we have a case where #getServletPath() returns  and #getPathInfo()
 null?
 
 
 http://docs.oracle.com/javaee/6/api/javax/servlet/http/HttpServletRequest
 .html#getServletPath()
 
 Returns the part of this request's URL that calls the servlet. This path
 starts with a / character and includes either the servlet name or a
 path to
 the servlet, but does not include any extra path information or a query
 string. Same as the value of the CGI variable SCRIPT_NAME.
 This method will return an empty string () if the servlet used to
 process this request was matched using the /* pattern.
 
 
 
 http://docs.oracle.com/javaee/6/api/javax/servlet/http/HttpServletRequest
 .html#getPathInfo()
 
 Returns any extra path information associated with the URL the client
 sent when it made this request. The extra path information follows the
 servlet path
 but precedes the query string and will start with a / character.
 This method returns null if there was no extra path information.
 Same as the value of the CGI variable PATH_INFO.
 
 @Carsten: I would keep getPath() unchanged and change the path after the
 
 comment for SLING-722:
String path = getPath(request);
if (path.length() == 0) {
 
path = /;
 
}
 
 Regards,
 O.
 
 Do we have an issue for this?
 
 Regards
 Carsten
 
 2014-04-04 10:17 GMT+02:00 Antonio Sanso asa...@adobe.com:
 On Apr 4, 2014, at 10:14 AM, Carsten Ziegeler cziege...@apache.org
 
 mailto:cziege...@apache.org wrote:
  the
 
 fallback at the end is still needed I guess.
 
 for sure :)
 
 regards
 
 antonio
 
 
 

[jira] [Updated] (SLING-3492) failed authentication when Sling is deployed in an app server

2014-04-04 Thread Antonio Sanso (JIRA)

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

Antonio Sanso updated SLING-3492:
-

Description: 
As reported in [0] SLING-2998 reverted a fix introduced in SLING-722.

The problem with the current code is

{noformat}
private String getPath(HttpServletRequest request) {
final StringBuilder sb = new StringBuilder();
if (request.getServletPath() != null) {
sb.append(request.getServletPath());
}
if (request.getPathInfo() != null) {
sb.append(request.getPathInfo());
}
return sb.toString();
}
{noformat}

that if I deploy sling in a servlet container (e.g. web logic ) using 
contextPath ‘test' and requesting http://localhost:4502/test getPath() returns 
an empty string and this leads to getAnonymousCredentials();


[0]  http://www.mail-archive.com/dev@sling.apache.org/msg28252.html

  was:
As reported in [0] SLING-2998 reverted a fix introduced in SLING-722.

The problem with the current code is

{code}
private String getPath(HttpServletRequest request) {
final StringBuilder sb = new StringBuilder();
if (request.getServletPath() != null) {
sb.append(request.getServletPath());
}
if (request.getPathInfo() != null) {
sb.append(request.getPathInfo());
}
return sb.toString();
}
{code}

that if I deploy sling in a servlet container (e.g. web logic ) using 
contextPath ‘test' and requesting http://localhost:4502/test getPath() returns 
an empty string and this leads to getAnonymousCredentials();


[0]  http://www.mail-archive.com/dev@sling.apache.org/msg28252.html


 failed authentication when Sling is deployed in an app server
 -

 Key: SLING-3492
 URL: https://issues.apache.org/jira/browse/SLING-3492
 Project: Sling
  Issue Type: Bug
  Components: Authentication
Reporter: Antonio Sanso

 As reported in [0] SLING-2998 reverted a fix introduced in SLING-722.
 The problem with the current code is
 {noformat}
 private String getPath(HttpServletRequest request) {
 final StringBuilder sb = new StringBuilder();
 if (request.getServletPath() != null) {
 sb.append(request.getServletPath());
 }
 if (request.getPathInfo() != null) {
 sb.append(request.getPathInfo());
 }
 return sb.toString();
 }
 {noformat}
 that if I deploy sling in a servlet container (e.g. web logic ) using 
 contextPath ‘test' and requesting http://localhost:4502/test getPath() 
 returns 
 an empty string and this leads to getAnonymousCredentials();
 [0]  http://www.mail-archive.com/dev@sling.apache.org/msg28252.html



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (SLING-3405) SLING2094Test and ServerSideScriptsTest fail with java 8: JSP compiler does not find java.util.Arrays or java.lang.CharSequence

2014-04-04 Thread Robert Munteanu (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-3405?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13959985#comment-13959985
 ] 

Robert Munteanu commented on SLING-3405:


Compilation of that sample class works fine now with [org.eclipse.jdt.core 
3.9.1.v20130905-0837|http://search.maven.org/#artifactdetails\|org.eclipse.tycho\|org.eclipse.jdt.core\|3.9.1.v20130905-0837\|jar]
 and a Java 8 runtime.

Nevertheless, I have no idea where to add this new JDT compiler jar ; {{mvn 
dependency:tree}} mentions nothing about org.eclipse.jdt.core in 
bundles/scripting/jsp . I actually made the change in contrib/commons/compiler 
before realising that the issue is rooted somewhere else.

 SLING2094Test and ServerSideScriptsTest fail with java 8: JSP compiler does 
 not find java.util.Arrays or java.lang.CharSequence
 ---

 Key: SLING-3405
 URL: https://issues.apache.org/jira/browse/SLING-3405
 Project: Sling
  Issue Type: Bug
  Components: Scripting, Testing
Reporter: Bertrand Delacretaz
Priority: Minor
 Attachments: jasper-upgrade.patch


 Running the launchpad/integration-tests SLING2094Test fails due to a 
 compilation error for the test script [1]: Unable to compile class for JSP, 
 the import java.util.Arrays cannot be resolved.
 [1] 
 https://svn.apache.org/repos/asf/sling/trunk/launchpad/integration-tests/src/main/resources/integration-test/issues/sling2094/sling2094.jsp



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Resolved] (SLING-3492) failed authentication when Sling is deployed in an app server

2014-04-04 Thread Oliver Lietz (JIRA)

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

Oliver Lietz resolved SLING-3492.
-

Resolution: Fixed

r1584705

 failed authentication when Sling is deployed in an app server
 -

 Key: SLING-3492
 URL: https://issues.apache.org/jira/browse/SLING-3492
 Project: Sling
  Issue Type: Bug
  Components: Authentication
Reporter: Antonio Sanso
Assignee: Oliver Lietz
 Fix For: Auth Core 1.1.8


 As reported in [0] SLING-2998 reverted a fix introduced in SLING-722.
 The problem with the current code is
 {noformat}
 private String getPath(HttpServletRequest request) {
 final StringBuilder sb = new StringBuilder();
 if (request.getServletPath() != null) {
 sb.append(request.getServletPath());
 }
 if (request.getPathInfo() != null) {
 sb.append(request.getPathInfo());
 }
 return sb.toString();
 }
 {noformat}
 that if I deploy sling in a servlet container (e.g. web logic ) using 
 contextPath ‘test' and requesting http://localhost:4502/test getPath() 
 returns 
 an empty string and this leads to getAnonymousCredentials();
 [0]  http://www.mail-archive.com/dev@sling.apache.org/msg28252.html



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Updated] (SLING-3492) failed authentication when Sling is deployed in an app server

2014-04-04 Thread Oliver Lietz (JIRA)

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

Oliver Lietz updated SLING-3492:


Fix Version/s: Auth Core 1.1.8

 failed authentication when Sling is deployed in an app server
 -

 Key: SLING-3492
 URL: https://issues.apache.org/jira/browse/SLING-3492
 Project: Sling
  Issue Type: Bug
  Components: Authentication
Reporter: Antonio Sanso
Assignee: Oliver Lietz
 Fix For: Auth Core 1.1.8


 As reported in [0] SLING-2998 reverted a fix introduced in SLING-722.
 The problem with the current code is
 {noformat}
 private String getPath(HttpServletRequest request) {
 final StringBuilder sb = new StringBuilder();
 if (request.getServletPath() != null) {
 sb.append(request.getServletPath());
 }
 if (request.getPathInfo() != null) {
 sb.append(request.getPathInfo());
 }
 return sb.toString();
 }
 {noformat}
 that if I deploy sling in a servlet container (e.g. web logic ) using 
 contextPath ‘test' and requesting http://localhost:4502/test getPath() 
 returns 
 an empty string and this leads to getAnonymousCredentials();
 [0]  http://www.mail-archive.com/dev@sling.apache.org/msg28252.html



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Assigned] (SLING-3492) failed authentication when Sling is deployed in an app server

2014-04-04 Thread Oliver Lietz (JIRA)

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

Oliver Lietz reassigned SLING-3492:
---

Assignee: Oliver Lietz

 failed authentication when Sling is deployed in an app server
 -

 Key: SLING-3492
 URL: https://issues.apache.org/jira/browse/SLING-3492
 Project: Sling
  Issue Type: Bug
  Components: Authentication
Reporter: Antonio Sanso
Assignee: Oliver Lietz

 As reported in [0] SLING-2998 reverted a fix introduced in SLING-722.
 The problem with the current code is
 {noformat}
 private String getPath(HttpServletRequest request) {
 final StringBuilder sb = new StringBuilder();
 if (request.getServletPath() != null) {
 sb.append(request.getServletPath());
 }
 if (request.getPathInfo() != null) {
 sb.append(request.getPathInfo());
 }
 return sb.toString();
 }
 {noformat}
 that if I deploy sling in a servlet container (e.g. web logic ) using 
 contextPath ‘test' and requesting http://localhost:4502/test getPath() 
 returns 
 an empty string and this leads to getAnonymousCredentials();
 [0]  http://www.mail-archive.com/dev@sling.apache.org/msg28252.html



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (SLING-3405) SLING2094Test and ServerSideScriptsTest fail with java 8: JSP compiler does not find java.util.Arrays or java.lang.CharSequence

2014-04-04 Thread Bertrand Delacretaz (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-3405?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13959994#comment-13959994
 ] 

Bertrand Delacretaz commented on SLING-3405:


AFAICS those compiler classes are provided by the jasper-jdt dependency in 
bundles/scripting/jsp:

{code}
cd bundles/scripting/jsp
mvn dependency:copy-dependencies
unzip -l target/dependency/jasper-jdt-6.0.14.jar

Archive:  target/dependency/jasper-jdt-6.0.14.jar
...
 2447  02-12-07 14:00   org/eclipse/jdt/core/compiler/BuildContext.class
 1537  02-12-07 14:00   
org/eclipse/jdt/core/compiler/CategorizedProblem.class
18317  02-12-07 14:00   org/eclipse/jdt/core/compiler/CharOperation.class
 1556  02-12-07 14:00   
org/eclipse/jdt/core/compiler/CompilationParticipant.class
...
{code}

 SLING2094Test and ServerSideScriptsTest fail with java 8: JSP compiler does 
 not find java.util.Arrays or java.lang.CharSequence
 ---

 Key: SLING-3405
 URL: https://issues.apache.org/jira/browse/SLING-3405
 Project: Sling
  Issue Type: Bug
  Components: Scripting, Testing
Reporter: Bertrand Delacretaz
Priority: Minor
 Attachments: jasper-upgrade.patch


 Running the launchpad/integration-tests SLING2094Test fails due to a 
 compilation error for the test script [1]: Unable to compile class for JSP, 
 the import java.util.Arrays cannot be resolved.
 [1] 
 https://svn.apache.org/repos/asf/sling/trunk/launchpad/integration-tests/src/main/resources/integration-test/issues/sling2094/sling2094.jsp



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (SLING-3405) SLING2094Test and ServerSideScriptsTest fail with java 8: JSP compiler does not find java.util.Arrays or java.lang.CharSequence

2014-04-04 Thread Robert Munteanu (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-3405?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13960001#comment-13960001
 ] 

Robert Munteanu commented on SLING-3405:


I see, thanks.

 SLING2094Test and ServerSideScriptsTest fail with java 8: JSP compiler does 
 not find java.util.Arrays or java.lang.CharSequence
 ---

 Key: SLING-3405
 URL: https://issues.apache.org/jira/browse/SLING-3405
 Project: Sling
  Issue Type: Bug
  Components: Scripting, Testing
Reporter: Bertrand Delacretaz
Priority: Minor
 Attachments: jasper-upgrade.patch


 Running the launchpad/integration-tests SLING2094Test fails due to a 
 compilation error for the test script [1]: Unable to compile class for JSP, 
 the import java.util.Arrays cannot be resolved.
 [1] 
 https://svn.apache.org/repos/asf/sling/trunk/launchpad/integration-tests/src/main/resources/integration-test/issues/sling2094/sling2094.jsp



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (SLING-3405) SLING2094Test and ServerSideScriptsTest fail with java 8: JSP compiler does not find java.util.Arrays or java.lang.CharSequence

2014-04-04 Thread Robert Munteanu (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-3405?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13960004#comment-13960004
 ] 

Robert Munteanu commented on SLING-3405:


By looking at https://tomcat.apache.org/whichversion.html , I can see that the 
latest Tomcat version is 6.0.39, and since the attached [^jasper-upgrade.patch] 
does not work, it's clear that we must look into the 7.x stream at least. There 
are two issues here:

* Tomcat 7 requires Java 6 at least. That shouldn't be too much of a problem, 
as Java 5 is long EOLed
* There are no published jasper-jdt artifacts for Tomcat 7. Not sure why that 
is, I need to look a bit deeper

 SLING2094Test and ServerSideScriptsTest fail with java 8: JSP compiler does 
 not find java.util.Arrays or java.lang.CharSequence
 ---

 Key: SLING-3405
 URL: https://issues.apache.org/jira/browse/SLING-3405
 Project: Sling
  Issue Type: Bug
  Components: Scripting, Testing
Reporter: Bertrand Delacretaz
Priority: Minor
 Attachments: jasper-upgrade.patch


 Running the launchpad/integration-tests SLING2094Test fails due to a 
 compilation error for the test script [1]: Unable to compile class for JSP, 
 the import java.util.Arrays cannot be resolved.
 [1] 
 https://svn.apache.org/repos/asf/sling/trunk/launchpad/integration-tests/src/main/resources/integration-test/issues/sling2094/sling2094.jsp



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (SLING-3405) SLING2094Test and ServerSideScriptsTest fail with java 8: JSP compiler does not find java.util.Arrays or java.lang.CharSequence

2014-04-04 Thread Felix Meschberger (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-3405?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13960005#comment-13960005
 ] 

Felix Meschberger commented on SLING-3405:
--

The goal is actually to update to the latest Eclipse Compiler which fully 
supports Java 8. Same for the Java compiler support bundle.

I have been thinking of actually removing the Java Compiler from both the JSP 
and the Compiler support bundles and just install the Eclipse JDT compiler 
bundle in Sling. WDYT ?

 SLING2094Test and ServerSideScriptsTest fail with java 8: JSP compiler does 
 not find java.util.Arrays or java.lang.CharSequence
 ---

 Key: SLING-3405
 URL: https://issues.apache.org/jira/browse/SLING-3405
 Project: Sling
  Issue Type: Bug
  Components: Scripting, Testing
Reporter: Bertrand Delacretaz
Priority: Minor
 Attachments: jasper-upgrade.patch


 Running the launchpad/integration-tests SLING2094Test fails due to a 
 compilation error for the test script [1]: Unable to compile class for JSP, 
 the import java.util.Arrays cannot be resolved.
 [1] 
 https://svn.apache.org/repos/asf/sling/trunk/launchpad/integration-tests/src/main/resources/integration-test/issues/sling2094/sling2094.jsp



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (SLING-3405) SLING2094Test and ServerSideScriptsTest fail with java 8: JSP compiler does not find java.util.Arrays or java.lang.CharSequence

2014-04-04 Thread Robert Munteanu (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-3405?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13960021#comment-13960021
 ] 

Robert Munteanu commented on SLING-3405:


{quote}I have been thinking of actually removing the Java Compiler from both 
the JSP and the Compiler support bundles and just install the Eclipse JDT 
compiler bundle in Sling. WDYT ?{quote}

That sounds good to me. The jsp scripting support bundle should keep working, 
as the JDT bundle has changed in a compatible way ( still at 3.x ).

 SLING2094Test and ServerSideScriptsTest fail with java 8: JSP compiler does 
 not find java.util.Arrays or java.lang.CharSequence
 ---

 Key: SLING-3405
 URL: https://issues.apache.org/jira/browse/SLING-3405
 Project: Sling
  Issue Type: Bug
  Components: Scripting, Testing
Reporter: Bertrand Delacretaz
Priority: Minor
 Attachments: jasper-upgrade.patch


 Running the launchpad/integration-tests SLING2094Test fails due to a 
 compilation error for the test script [1]: Unable to compile class for JSP, 
 the import java.util.Arrays cannot be resolved.
 [1] 
 https://svn.apache.org/repos/asf/sling/trunk/launchpad/integration-tests/src/main/resources/integration-test/issues/sling2094/sling2094.jsp



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Created] (SLING-3493) Javashell demo doesn't work

2014-04-04 Thread David Bosschaert (JIRA)
David Bosschaert created SLING-3493:
---

 Summary: Javashell demo doesn't work
 Key: SLING-3493
 URL: https://issues.apache.org/jira/browse/SLING-3493
 Project: Sling
  Issue Type: Bug
  Components: Commons, Samples
Reporter: David Bosschaert


The JavaShell demo doesn't work because its dependencies have issues with their 
metadata.

The JavaShell demo has dependencies on the org.apache.sling.commons.compiler 
and org.apache.sling.scripting.java bundles.
Both these bundles don't resolve.

The org.apache.sling.commons.compiler bundle has:
  org.osgi.service.prefs,version=[1.1,2) -- Cannot be resolved

The org.apache.sling.scripting.java bundle has:
  org.osgi.framework,version=[1.7,2) -- Cannot be resolved



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Updated] (SLING-3493) Javashell demo doesn't work

2014-04-04 Thread David Bosschaert (JIRA)

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

David Bosschaert updated SLING-3493:


Attachment: SLING-3493.diff

The attached SLING-3493.diff patch fixes these issues.

The dependency error in the commons/compiler is caused by an import indirectly 
referenced from an eclipse component: org.osgi.service.prefs. This import is 
not needed so I removed it.

The import range on org.osgi.framework in scripting/java is wrong, which is 
caused by a transitive dependency of the o.a.s.commons.compiler component. I 
have excluded that in Maven so that the correct version of this package is 
picked up from the org.osgi.core module.

 Javashell demo doesn't work
 ---

 Key: SLING-3493
 URL: https://issues.apache.org/jira/browse/SLING-3493
 Project: Sling
  Issue Type: Bug
  Components: Commons, Samples
Reporter: David Bosschaert
 Attachments: SLING-3493.diff


 The JavaShell demo doesn't work because its dependencies have issues with 
 their metadata.
 The JavaShell demo has dependencies on the org.apache.sling.commons.compiler 
 and org.apache.sling.scripting.java bundles.
 Both these bundles don't resolve.
 The org.apache.sling.commons.compiler bundle has:
   org.osgi.service.prefs,version=[1.1,2) -- Cannot be resolved
 The org.apache.sling.scripting.java bundle has:
   org.osgi.framework,version=[1.7,2) -- Cannot be resolved



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Updated] (SLING-3489) Fix the instructions on how to launch/deploy the demos

2014-04-04 Thread David Bosschaert (JIRA)

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

David Bosschaert updated SLING-3489:


Attachment: (was: launchdemos_3.diff)

 Fix the instructions on how to launch/deploy the demos
 --

 Key: SLING-3489
 URL: https://issues.apache.org/jira/browse/SLING-3489
 Project: Sling
  Issue Type: Bug
  Components: Samples
Reporter: David Bosschaert
Priority: Minor
 Attachments: launchdemos_4.diff


 Most Sling samples have incorrect instructions on how to get the Sling 
 container running and on how to deploy the demo itself.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Updated] (SLING-3489) Fix the instructions on how to launch/deploy the demos

2014-04-04 Thread David Bosschaert (JIRA)

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

David Bosschaert updated SLING-3489:


Attachment: launchdemos_4.diff

I've updated the patch with additional instructions for the javashell demo.

Note that for the javashell demo to work, the patch provided with SLING-3493 
needs to be applied.

 Fix the instructions on how to launch/deploy the demos
 --

 Key: SLING-3489
 URL: https://issues.apache.org/jira/browse/SLING-3489
 Project: Sling
  Issue Type: Bug
  Components: Samples
Reporter: David Bosschaert
Priority: Minor
 Attachments: launchdemos_4.diff


 Most Sling samples have incorrect instructions on how to get the Sling 
 container running and on how to deploy the demo itself.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Created] (SLING-3494) Launchpad Testing WAR tests fail due to a CNFE

2014-04-04 Thread Robert Munteanu (JIRA)
Robert Munteanu created SLING-3494:
--

 Summary: Launchpad Testing WAR tests fail due to a CNFE
 Key: SLING-3494
 URL: https://issues.apache.org/jira/browse/SLING-3494
 Project: Sling
  Issue Type: Bug
Reporter: Robert Munteanu
Assignee: Robert Munteanu
 Fix For: Launchpad Testing 7


---
 T E S T S
---
Running org.apache.sling.launchpad.testing.TestAll
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.579
sec  FAILURE!
initializationError(org.apache.sling.launchpad.testing.TestAll)  Time
elapsed: 0.007 sec   ERROR!
java.lang.NoClassDefFoundError:
org/apache/sling/commons/testing/integration/HttpTest
at java.lang.ClassLoader.defineClass1(Native Method)



--
This message was sent by Atlassian JIRA
(v6.2#6252)


Re: Failure running Launchpad Testing WAR version - ClassNotFoundException: org.apache.sling.commons.testing.integration.HttpTest

2014-04-04 Thread Robert Munteanu
Filed https://issues.apache.org/jira/browse/SLING-3494, fixed with
http://svn.apache.org/r1584906

On Fri, Dec 13, 2013 at 4:31 PM, Robert Munteanu romb...@apache.org wrote:
 Hi,

 I can't run the testing-war project locally and WAR integration tests
 are not enabled on BuildBot.

 I'll paste the error at the end of the mail, maybe this looks familiar
 to someone.

 Thanks,

 Robert

 [INFO] --- maven-surefire-plugin:2.12.4:test
 (surefire-integration-test) @ org.apache.sling.launchpad.testing-war
 ---
 [INFO] Surefire report directory:
 /home/ADOBENET/rmuntean/w/git/sling/launchpad/testing-war/target/surefire-reports

 ---
  T E S T S
 ---
 Running org.apache.sling.launchpad.testing.TestAll
 Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.579
 sec  FAILURE!
 initializationError(org.apache.sling.launchpad.testing.TestAll)  Time
 elapsed: 0.007 sec   ERROR!
 java.lang.NoClassDefFoundError:
 org/apache/sling/commons/testing/integration/HttpTest
 at java.lang.ClassLoader.defineClass1(Native Method)
 at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
 at 
 java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
 at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
 at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
 at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
 at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
 at java.security.AccessController.doPrivileged(Native Method)
 at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
 at 
 org.apache.maven.surefire.booter.IsolatedClassLoader.loadClass(IsolatedClassLoader.java:97)
 at java.lang.ClassLoader.defineClass1(Native Method)
 at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
 at 
 java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
 at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
 at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
 at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
 at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
 at java.security.AccessController.doPrivileged(Native Method)
 at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
 at 
 org.apache.maven.surefire.booter.IsolatedClassLoader.loadClass(IsolatedClassLoader.java:97)
 at java.lang.ClassLoader.defineClass1(Native Method)
 at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
 at 
 java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
 at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
 at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
 at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
 at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
 at java.security.AccessController.doPrivileged(Native Method)
 at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
 at 
 org.apache.maven.surefire.booter.IsolatedClassLoader.loadClass(IsolatedClassLoader.java:97)
 at org.apache.sling.launchpad.testing.TestAll.suite(TestAll.java:76)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at 
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
 at 
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:606)
 at 
 org.junit.internal.runners.SuiteMethod.testFromSuiteMethod(SuiteMethod.java:35)
 at org.junit.internal.runners.SuiteMethod.init(SuiteMethod.java:24)
 at org.junit.runners.AllTests.init(AllTests.java:25)
 at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native 
 Method)
 at 
 sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
 at 
 sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
 at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
 at 
 org.junit.internal.builders.AnnotatedBuilder.buildRunner(AnnotatedBuilder.java:29)
 at 
 org.junit.internal.builders.AnnotatedBuilder.runnerForClass(AnnotatedBuilder.java:21)
 at 
 

[jira] [Resolved] (SLING-3494) Launchpad Testing WAR tests fail due to a CNFE

2014-04-04 Thread Robert Munteanu (JIRA)

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

Robert Munteanu resolved SLING-3494.


Resolution: Fixed

Fixed in http://svn.apache.org/r1584906

 Launchpad Testing WAR tests fail due to a CNFE
 --

 Key: SLING-3494
 URL: https://issues.apache.org/jira/browse/SLING-3494
 Project: Sling
  Issue Type: Bug
Reporter: Robert Munteanu
Assignee: Robert Munteanu
 Fix For: Launchpad Testing 7


 ---
  T E S T S
 ---
 Running org.apache.sling.launchpad.testing.TestAll
 Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.579
 sec  FAILURE!
 initializationError(org.apache.sling.launchpad.testing.TestAll)  Time
 elapsed: 0.007 sec   ERROR!
 java.lang.NoClassDefFoundError:
 org/apache/sling/commons/testing/integration/HttpTest
 at java.lang.ClassLoader.defineClass1(Native Method)



--
This message was sent by Atlassian JIRA
(v6.2#6252)