[GitHub] [sling-site] kwin opened a new pull request, #108: Clarify usage of OSGi HTTP Whiteboard with Sling

2023-04-11 Thread via GitHub


kwin opened a new pull request, #108:
URL: https://github.com/apache/sling-site/pull/108

   This outlines the limitations discovered in SLING-11677


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@sling.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[jira] [Resolved] (SLING-11677) Sling Engine Context 'org.apache.sling' has higher ranking than 'default' context

2023-04-11 Thread Konrad Windszus (Jira)


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

Konrad Windszus resolved SLING-11677.
-
Resolution: Won't Fix

> Sling Engine Context 'org.apache.sling' has higher ranking than 'default' 
> context
> -
>
> Key: SLING-11677
> URL: https://issues.apache.org/jira/browse/SLING-11677
> Project: Sling
>  Issue Type: Bug
>  Components: Engine
>Reporter: Konrad Windszus
>Assignee: Konrad Windszus
>Priority: Major
> Attachments: HTTP-Service-Default-Context.png, Servlet-Contexts.png
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> When a servlet is registered with the OSGi HTTP Whiteboard pattern without 
> the property {{osgi.http.whiteboard.context.select}} the "default" context 
> helper is used 
> (https://docs.osgi.org/specification/osgi.cmpn/7.0.0/service.http.whiteboard.html#service.http.whiteboard.common.properties)
> With the Jetty Implementation from Felix in Sling this has the 
> {{service.ranking}} {{Integer.MIN_VALUE}} 
> (https://github.com/apache/felix-dev/blob/e7d17aca517949dd65a913f9ac5088e653a4a2dc/http/base/src/main/java/org/apache/felix/http/base/internal/whiteboard/WhiteboardManager.java#L182)
>  while the one for the default Sling Main Servlet has no explicit ranking 
> (i.e. 0). That leads to the fact that the Sling Main servlet always takes 
> precedence as
> {quote}
> In the case of two Servlet Context Helpers with the same path, the service 
> with the highest ranking is searched first for a match. In the case of a tie, 
> the lowest service ID is searched first.
> {quote}
> (https://docs.osgi.org/specification/osgi.cmpn/7.0.0/service.http.whiteboard.html#service.http.whiteboard.servletcontext)
>  as both "default" and "org.apache.sling" are registered for path "".
> The Sling Main servlet context should use a lower ranking so that simple 
> servlets registered via OSGI HTTP Whiteboard pattern without explicit context 
> can kick in at all!
> Attached the web console of Sling Starter 12:
>  !Servlet-Contexts.png! 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (SLING-11677) Sling Engine Context 'org.apache.sling' has higher ranking than 'default' context

2023-04-11 Thread Konrad Windszus (Jira)


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

Konrad Windszus commented on SLING-11677:
-

With https://issues.apache.org/jira/browse/FELIX-6584 implemented it is no 
longer possible to leverage the default context in any servlets used in a Sling 
distribution. Therefore closing this as Won't fix. I am gonna extend 
https://sling.apache.org/documentation/the-sling-engine/servlets.html to 
mention how OSGi HTTP Whiteboard can be used in OSGi runtimes where the Sling 
Main Servlet is deployed as well.

> Sling Engine Context 'org.apache.sling' has higher ranking than 'default' 
> context
> -
>
> Key: SLING-11677
> URL: https://issues.apache.org/jira/browse/SLING-11677
> Project: Sling
>  Issue Type: Bug
>  Components: Engine
>Reporter: Konrad Windszus
>Assignee: Konrad Windszus
>Priority: Major
> Attachments: HTTP-Service-Default-Context.png, Servlet-Contexts.png
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> When a servlet is registered with the OSGi HTTP Whiteboard pattern without 
> the property {{osgi.http.whiteboard.context.select}} the "default" context 
> helper is used 
> (https://docs.osgi.org/specification/osgi.cmpn/7.0.0/service.http.whiteboard.html#service.http.whiteboard.common.properties)
> With the Jetty Implementation from Felix in Sling this has the 
> {{service.ranking}} {{Integer.MIN_VALUE}} 
> (https://github.com/apache/felix-dev/blob/e7d17aca517949dd65a913f9ac5088e653a4a2dc/http/base/src/main/java/org/apache/felix/http/base/internal/whiteboard/WhiteboardManager.java#L182)
>  while the one for the default Sling Main Servlet has no explicit ranking 
> (i.e. 0). That leads to the fact that the Sling Main servlet always takes 
> precedence as
> {quote}
> In the case of two Servlet Context Helpers with the same path, the service 
> with the highest ranking is searched first for a match. In the case of a tie, 
> the lowest service ID is searched first.
> {quote}
> (https://docs.osgi.org/specification/osgi.cmpn/7.0.0/service.http.whiteboard.html#service.http.whiteboard.servletcontext)
>  as both "default" and "org.apache.sling" are registered for path "".
> The Sling Main servlet context should use a lower ranking so that simple 
> servlets registered via OSGI HTTP Whiteboard pattern without explicit context 
> can kick in at all!
> Attached the web console of Sling Starter 12:
>  !Servlet-Contexts.png! 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Resolved] (SLING-7377) Expose derived resource types for a given resource type

2023-04-11 Thread Konrad Windszus (Jira)


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

Konrad Windszus resolved SLING-7377.

Resolution: Won't Fix

For the foreseeable future I won't work on this. Therefore closing.

> Expose derived resource types for a given resource type
> ---
>
> Key: SLING-7377
> URL: https://issues.apache.org/jira/browse/SLING-7377
> Project: Sling
>  Issue Type: Improvement
>  Components: API, ResourceResolver
>Affects Versions: API 2.16.4
>Reporter: Konrad Windszus
>Priority: Major
>
> Currently {{sling:resourceSuperType}} properties are only evaluated in the 
> Sling Servlet Resolver and it is only possible to retrieve the super type of 
> a given type (via {{Resource.getResourceSuperType()}} 
> (https://issues.apache.org/jira/browse/SLING-278) but not vice versa.
> For the use case of e.g. searching for content of resource type {{a}} or any 
> type derived from {{a}} it is necessary to know all resource types derived 
> from {{a}} (direct or transitive) up front.
> For that I propose to extend the {{ResourceResolver}} interface with an 
> additional method which retrieves all derived resource types for a given type.
> There was an initial discussion about this in 
> https://www.mail-archive.com/dev@sling.apache.org/msg73080.html.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[GitHub] [sling-org-apache-sling-servlets-resolver] sonarcloud[bot] commented on pull request #7: [SLING-9230] - Servlet should not be allowed to register with invalid…

2023-04-11 Thread via GitHub


sonarcloud[bot] commented on PR #7:
URL: 
https://github.com/apache/sling-org-apache-sling-servlets-resolver/pull/7#issuecomment-1504711294

   SonarCloud Quality Gate failed.    [![Quality Gate 
failed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/failed-16px.png
 'Quality Gate 
failed')](https://sonarcloud.io/dashboard?id=apache_sling-org-apache-sling-servlets-resolver&pullRequest=7)
   
   
[![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png
 
'Bug')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-servlets-resolver&pullRequest=7&resolved=false&types=BUG)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-servlets-resolver&pullRequest=7&resolved=false&types=BUG)
 [0 
Bugs](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-servlets-resolver&pullRequest=7&resolved=false&types=BUG)
  
   
[![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png
 
'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-servlets-resolver&pullRequest=7&resolved=false&types=VULNERABILITY)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-servlets-resolver&pullRequest=7&resolved=false&types=VULNERABILITY)
 [0 
Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-servlets-resolver&pullRequest=7&resolved=false&types=VULNERABILITY)
  
   [![Security 
Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png
 'Security 
Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-servlets-resolver&pullRequest=7&resolved=false&types=SECURITY_HOTSPOT)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-servlets-resolver&pullRequest=7&resolved=false&types=SECURITY_HOTSPOT)
 [0 Security 
Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-servlets-resolver&pullRequest=7&resolved=false&types=SECURITY_HOTSPOT)
  
   [![Code 
Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png
 'Code 
Smell')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-servlets-resolver&pullRequest=7&resolved=false&types=CODE_SMELL)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-servlets-resolver&pullRequest=7&resolved=false&types=CODE_SMELL)
 [0 Code 
Smells](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-servlets-resolver&pullRequest=7&resolved=false&types=CODE_SMELL)
   
   
[![70.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/60-16px.png
 
'70.0%')](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-servlets-resolver&pullRequest=7&metric=new_coverage&view=list)
 [70.0% 
Coverage](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-servlets-resolver&pullRequest=7&metric=new_coverage&view=list)
  
   
[![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png
 
'0.0%')](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-servlets-resolver&pullRequest=7&metric=new_duplicated_lines_density&view=list)
 [0.0% 
Duplication](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-servlets-resolver&pullRequest=7&metric=new_duplicated_lines_density&view=list)
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@sling.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [sling-org-apache-sling-servlets-resolver] sonarcloud[bot] commented on pull request #31: SLING-11558 part1: remove the LocationIterator

2023-04-11 Thread via GitHub


sonarcloud[bot] commented on PR #31:
URL: 
https://github.com/apache/sling-org-apache-sling-servlets-resolver/pull/31#issuecomment-1504710175

   Kudos, SonarCloud Quality Gate passed!    [![Quality Gate 
passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png
 'Quality Gate 
passed')](https://sonarcloud.io/dashboard?id=apache_sling-org-apache-sling-servlets-resolver&pullRequest=31)
   
   
[![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png
 
'Bug')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-servlets-resolver&pullRequest=31&resolved=false&types=BUG)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-servlets-resolver&pullRequest=31&resolved=false&types=BUG)
 [0 
Bugs](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-servlets-resolver&pullRequest=31&resolved=false&types=BUG)
  
   
[![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png
 
'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-servlets-resolver&pullRequest=31&resolved=false&types=VULNERABILITY)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-servlets-resolver&pullRequest=31&resolved=false&types=VULNERABILITY)
 [0 
Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-servlets-resolver&pullRequest=31&resolved=false&types=VULNERABILITY)
  
   [![Security 
Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png
 'Security 
Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-servlets-resolver&pullRequest=31&resolved=false&types=SECURITY_HOTSPOT)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-servlets-resolver&pullRequest=31&resolved=false&types=SECURITY_HOTSPOT)
 [0 Security 
Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-servlets-resolver&pullRequest=31&resolved=false&types=SECURITY_HOTSPOT)
  
   [![Code 
Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png
 'Code 
Smell')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-servlets-resolver&pullRequest=31&resolved=false&types=CODE_SMELL)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-servlets-resolver&pullRequest=31&resolved=false&types=CODE_SMELL)
 [0 Code 
Smells](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-servlets-resolver&pullRequest=31&resolved=false&types=CODE_SMELL)
   
   
[![100.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/100-16px.png
 
'100.0%')](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-servlets-resolver&pullRequest=31&metric=new_coverage&view=list)
 [100.0% 
Coverage](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-servlets-resolver&pullRequest=31&metric=new_coverage&view=list)
  
   
[![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png
 
'0.0%')](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-servlets-resolver&pullRequest=31&metric=new_duplicated_lines_density&view=list)
 [0.0% 
Duplication](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-servlets-resolver&pullRequest=31&metric=new_duplicated_lines_density&view=list)
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@sling.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[jira] [Commented] (SLING-7377) Expose derived resource types for a given resource type

2023-04-11 Thread Carsten Ziegeler (Jira)


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

Carsten Ziegeler commented on SLING-7377:
-

This issue is open for a very long time with no activity, can we resolve this 
one way or the other?

> Expose derived resource types for a given resource type
> ---
>
> Key: SLING-7377
> URL: https://issues.apache.org/jira/browse/SLING-7377
> Project: Sling
>  Issue Type: Improvement
>  Components: API, ResourceResolver
>Affects Versions: API 2.16.4
>Reporter: Konrad Windszus
>Priority: Major
>
> Currently {{sling:resourceSuperType}} properties are only evaluated in the 
> Sling Servlet Resolver and it is only possible to retrieve the super type of 
> a given type (via {{Resource.getResourceSuperType()}} 
> (https://issues.apache.org/jira/browse/SLING-278) but not vice versa.
> For the use case of e.g. searching for content of resource type {{a}} or any 
> type derived from {{a}} it is necessary to know all resource types derived 
> from {{a}} (direct or transitive) up front.
> For that I propose to extend the {{ResourceResolver}} interface with an 
> additional method which retrieves all derived resource types for a given type.
> There was an initial discussion about this in 
> https://www.mail-archive.com/dev@sling.apache.org/msg73080.html.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Resolved] (SLING-3179) Implement solution to the Authentication Handler Credential Validation Problem

2023-04-11 Thread Carsten Ziegeler (Jira)


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

Carsten Ziegeler resolved SLING-3179.
-
Resolution: Won't Fix

> Implement solution to the Authentication Handler Credential Validation Problem
> --
>
> Key: SLING-3179
> URL: https://issues.apache.org/jira/browse/SLING-3179
> Project: Sling
>  Issue Type: Bug
>  Components: API, JCR, ResourceResolver
>Affects Versions: JCR Base 2.1.2, API 2.4.2, Resource Resolver 1.0.6
>Reporter: Felix Meschberger
>Assignee: Antonio Sanso
>Priority: Major
> Attachments: SLING-3179.diff, SLING-3179.patch
>
>
> The proposal [Solving the Authentication Handler Credential Validation 
> Problem|https://cwiki.apache.org/confluence/display/SLING/Solving+the+Authentication+Handler+Credential+Validation+Problem]
>  should be implemented.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Resolved] (SLING-4327) ResourceResolver aware of any mappings

2023-04-11 Thread Carsten Ziegeler (Jira)


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

Carsten Ziegeler resolved SLING-4327.
-
Resolution: Won't Fix

> ResourceResolver aware of any mappings
> --
>
> Key: SLING-4327
> URL: https://issues.apache.org/jira/browse/SLING-4327
> Project: Sling
>  Issue Type: Wish
>  Components: API
>Reporter: Kamil Ciecierski
>Priority: Major
>
> Provide ability to create a ResourceResolver which is aware of any mappings, 
> for example by providing proper argument mappingPath. In case of AEM it would 
> be possible to use publish instance mapping present under etc/publish.map to 
> on author instance.
> To achieve that the CommonResourceResolverFactoryImpl could be implementing 
> methods getResourceResolver() and getAdministrativeResourceResolver() with 
> additional argument defining the mapping location. The advantage of this 
> solution is that the created ResourceResolver can be used many times with the 
> same mappings. The drawback is that the mappings configuration will be found 
> and cached when they resourceresolver will be used for the first time - there 
> is no possibility to define the list of working mappings before. 
> The proposal of API extension:
> {code}
> ResourceResolver getResourceResolver(Map authenticationInfo, 
> String customRootMap) throws LoginException;
>  
> ResourceResolver getAdministrativeResourceResolver(Map 
> authenticationInfo, String customRootMap) throws LoginException;
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Resolved] (SLING-1513) allow host-specific rendering for virtual hosts. "Multitenancy Support"

2023-04-11 Thread Carsten Ziegeler (Jira)


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

Carsten Ziegeler resolved SLING-1513.
-
Resolution: Won't Fix

> allow host-specific rendering for virtual hosts. "Multitenancy Support"
> ---
>
> Key: SLING-1513
> URL: https://issues.apache.org/jira/browse/SLING-1513
> Project: Sling
>  Issue Type: New Feature
>  Components: API
>Reporter: Markus Blaurock
>Priority: Major
>
> Currently we have the need to run multiple websites on the same
> sling-instance. That is, serving the same or similar content in
> different ways (layouts), defined by the hostname.
> Reason behind this is we would like to have a single pool of 
> sling-app-servers and
> each one should be possible to serve all websites. Otherwise we would
> need to have one pool for each (small) site, which is not feasible.
> e.g. Content "a/b/c" should be accessible with
>   http://www.one/a/b/c.html
> and
>   http://www.two/a/b/c.html
> and looking differently. 
> https://cwiki.apache.org/SLING/multitenancy-support.html   would solve the 
> problem easily.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Resolved] (SLING-4800) If SlingMainServlet has allowTrace = false, default Allow header shouldn't contain TRACE method

2023-04-11 Thread Carsten Ziegeler (Jira)


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

Carsten Ziegeler resolved SLING-4800.
-
Resolution: Won't Fix

> If SlingMainServlet has allowTrace = false, default Allow header shouldn't 
> contain TRACE method
> ---
>
> Key: SLING-4800
> URL: https://issues.apache.org/jira/browse/SLING-4800
> Project: Sling
>  Issue Type: Bug
>  Components: API, Engine
>Reporter: Justin Edelson
>Priority: Minor
>
> If the configuration of the SlingMainServlet specifies that the TRACE method 
> isn't allowed, the Allow header in an OPTIONS response from servlets 
> extending the SlingSafeMethodsServlet still contain the TRACE method. This 
> shouldn't be the case. Although technically allowable by the HTTP spec, this 
> behavior isn't ideal



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Resolved] (SLING-3414) Mutlitenancy Support Integration

2023-04-11 Thread Carsten Ziegeler (Jira)


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

Carsten Ziegeler resolved SLING-3414.
-
Resolution: Won't Fix

> Mutlitenancy Support Integration
> 
>
> Key: SLING-3414
> URL: https://issues.apache.org/jira/browse/SLING-3414
> Project: Sling
>  Issue Type: Improvement
>  Components: API, Engine
>Affects Versions: Servlets Resolver 2.3.2, Engine 2.3.0, API 2.6.0, 
> Resource Resolver 1.1.0
>Reporter: Andreas Schaefer
>Priority: Major
>  Labels: resource, servlet, tenant
>
> Based on the proposal for the multi-tenancy integration: 
> https://cwiki.apache.org/confluence/display/SLING/Multitenancy+Support+Integration
>  this is the issue to track it.
> The Tenant module (contrib/extension/tenant) is just the data structure and 
> Felix UI to handle Tenants but it does not provide any functionality to 
> actually enable multi-tenancy in Sling.
> As described in the original proposal 
> https://cwiki.apache.org/confluence/display/SLING/Multitenancy+Support there 
> must be support for a per-call enhancement of the Search Path in order to 
> prepend the Search Path with the Tenant specific search path. This needs to 
> be done in the Resource's Resource Path but also in the Servlet Resolver 
> which uses the Administrative Resource Resolver and so need to change its 
> Search Path on a per-call basis. Finally the Servlet Resolver needs to change 
> its Caching mechanisms to let Servlets being cache per tenant (if on the 
> tenant search path) in order to provide a tenant specific view.
> Because the tenant can be identified by different means like subdomains, 
> path, cookies, parameters etc the Tenant module cannot provide a catch-all 
> implementation. Therefore sling should provide a Service interface for the 
> client to implement on how to obtain a tenant id.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Resolved] (SLING-3206) Create an API to handle resource vanity paths

2023-04-11 Thread Carsten Ziegeler (Jira)


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

Carsten Ziegeler resolved SLING-3206.
-
Resolution: Won't Fix

> Create an API to handle resource vanity paths
> -
>
> Key: SLING-3206
> URL: https://issues.apache.org/jira/browse/SLING-3206
> Project: Sling
>  Issue Type: Improvement
>  Components: API
>Reporter: Carsten Ziegeler
>Priority: Major
>  Labels: vanity
>
> Right now vanity path handling is complicated, it would be nice to have a 
> central API which allows to set a vanity path for a resource and to query if 
> a vanity path for a resource is set.
> Maybe a method getting all vanity paths back could be added as well.
> The implementation would directly write into the mapping structure in the 
> resource tree. For the query part, it would mark its own entries to easily 
> identify them in contrast to entries created by other means



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Resolved] (SLING-4752) New resource query API

2023-04-11 Thread Carsten Ziegeler (Jira)


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

Carsten Ziegeler resolved SLING-4752.
-
Resolution: Won't Fix

> New resource query API
> --
>
> Key: SLING-4752
> URL: https://issues.apache.org/jira/browse/SLING-4752
> Project: Sling
>  Issue Type: Improvement
>  Components: API, JCR, ResourceResolver
>Reporter: Carsten Ziegeler
>Priority: Major
> Attachments: api-patch.txt, resourceresolver-patch.txt
>
>
> Discussion thread:
> http://mail-archives.apache.org/mod_mbox/sling-dev/201505.mbox/%3C555983F6.7020100%40apache.org%3E
> Starting mail:
> The current resource query api has several problems:
> - it's using the JCR spec to define a query
> - it's not clear which queries are supported by providers
> - queries are string based
> - implementing queries in a resource provider is way too hard as this
> would require to implement the complete jcr query api.
> I've created a draft for a new, object based API at [1]. The main idea
> is to use a builder pattern to create Query objects. This are immutable
> and have a unique identifier. The QueryManager service can be used to
> execute a query in the context of a resource resolver. The manager
> delegates the query to the providers. As each Query object has this
> identifier, implementations can use this to cache the parsing of the query.
> In addition to the query object you can pass in query instructions to
> specify a limit or range for the query.
> Obviously this is a reduced set compared to the full fledged jcr search
> api, however it should be suitable for the majority of use cases.
> [1]
> https://svn.apache.org/repos/asf/sling/whiteboard/cziegeler/api-v3/src/main/java/org/apache/sling/api/resource/query/



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Resolved] (SLING-8269) Generics in ResourceProvider SPI don't resolve

2023-04-11 Thread Carsten Ziegeler (Jira)


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

Carsten Ziegeler resolved SLING-8269.
-
Resolution: Won't Fix

> Generics in ResourceProvider SPI don't resolve
> --
>
> Key: SLING-8269
> URL: https://issues.apache.org/jira/browse/SLING-8269
> Project: Sling
>  Issue Type: Improvement
>  Components: API
>Affects Versions: API 2.11.0
>Reporter: Julian Sedding
>Priority: Minor
>
> In the "new" {{ResourceProvider}} SPI a resource provider always "owns" its 
> root. This means that below that path no other RP is asked for resources 
> (unless it's registered on a more specific root path). In order to allow for 
> the scenario where a RP falls back to \{{Resource}}s provided by other RPs, 
> an API was added, that I gather should be used as follows:
> {code:java}
> public Iterator listChildren(ResolveContext ctx, Resource 
> parent) {
> Iterator ownChildren = ... // compute child resource
> ResolveContext parentCtx = ctx.getParentResolveContext();
> ResourceProvider parentProvider = ctx.getParentResourceProvider();
> if (parentCtx == null || parentProvider == null) {
> return null;
> }
> return merge(ownChildren, parentProvider.listChildren(parentCtx, parent));
> }
> {code}
>  
>  However, the {{parentCtx}} on the last line does not match the signature of 
> {{listChildren(ResourceContext, Resource)}}, because the generic type of 
> both {{ResolveContext}} and {{ResourceContext}} (from the 
> {{listChildren}} method signature) do not match, leading to the following 
> compile-time error:
> {noformat}
> incompatible types: 
> org.apache.sling.spi.resource.provider.ResolveContext cannot 
> be converted to 
> org.apache.sling.spi.resource.provider.ResolveContext
> {noformat}
> This can be worked around by dropping generic types of the local variables 
> and accepting an "unchecked type" warning, i.e.:
> {code:java}
> ResolveContext parentCtx = ctx.getParentResolveContext();
> ResourceProvider parentProvider = ctx.getParentResourceProvider();
> {code}
> cc [~cziegeler]



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (SLING-11546) ValueMap.get("calendar", String.class) conversion loses timezone information

2023-04-11 Thread Carsten Ziegeler (Jira)


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

Carsten Ziegeler commented on SLING-11546:
--

[~Henry Kuijpers]  Could you maybe please provide a PR with the fix and the 
test?

> ValueMap.get("calendar", String.class) conversion loses timezone information
> 
>
> Key: SLING-11546
> URL: https://issues.apache.org/jira/browse/SLING-11546
> Project: Sling
>  Issue Type: Bug
>  Components: API, ResourceResolver
>Affects Versions: API 2.21.0, Resource Resolver 1.6.16
>Reporter: Jelle Bouwmans
>Priority: Major
> Attachments: image-2022-08-19-10-41-27-129.png, 
> image-2022-08-19-10-45-25-409.png
>
>  Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> When doing a ValueMap.get("calendar", String.class) conversion, before 
> SLING-8116, 
> ISO8601.format() was used. Now, Calendar.toInstant().toString() is used. This 
> gives a different result, because the ISO8601 gives the correct timezone, but 
> toInstant() gives the Zulu time.
> toInstant() does the following:
> {quote}public final Instant toInstant() \{ return 
> Instant.ofEpochMilli(getTimeInMillis()); }
> {quote}
> Timezones and offsets are completely ignored.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Resolved] (SLING-11824) Deadlock during repository restart

2023-04-11 Thread Carsten Ziegeler (Jira)


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

Carsten Ziegeler resolved SLING-11824.
--
Resolution: Fixed

> Deadlock during repository restart
> --
>
> Key: SLING-11824
> URL: https://issues.apache.org/jira/browse/SLING-11824
> Project: Sling
>  Issue Type: Bug
>  Components: Engine
>Affects Versions: Engine 2.14.0
>Reporter: Julian Sedding
>Assignee: Carsten Ziegeler
>Priority: Major
> Fix For: Engine 2.14.2
>
>
> A deadlock can occur when the repository is restarted in a running system. 
> This may be due to a configuration change of a low level component, but has 
> also been reported to occur after refreshing the commons-io bundle.
> From the thread dump
> {noformat}
> "VM Thread" os_prio=0 cpu=106005.20ms elapsed=72363.91s 
> tid=0x56165220f800 nid=0x19ef runnable  
> "ParGC Thread#0" os_prio=0 cpu=11616.68ms elapsed=72363.93s 
> tid=0x5616520cb800 nid=0x19ee runnable  
> "ParGC Thread#1" os_prio=0 cpu=11624.23ms elapsed=72362.83s 
> tid=0x5616534fd800 nid=0x19f8 runnable  
> "ParGC Thread#2" os_prio=0 cpu=11621.66ms elapsed=72362.83s 
> tid=0x561653518000 nid=0x19f9 runnable  
> "VM Periodic Task Thread" os_prio=0 cpu=32588.40ms elapsed=72360.26s 
> tid=0x561655593800 nid=0x1a13 waiting on condition  
> JNI global refs: 98, weak refs: 3
> Found one Java-level deadlock:
> =
> "CM Event Dispatcher (Fire ConfigurationEvent: 
> pid=org.apache.sling.jcr.resource.internal.JcrResourceResolverFactoryImpl)":
>   waiting to lock monitor 0x56166302ce80 (object 0x0007679e6638, a 
> org.apache.sling.engine.impl.helper.SlingServletContext),
>   which is held by "SlingServletContext registration"
> "SlingServletContext registration":
>   waiting to lock monitor 0x5616631e3480 (object 0x00074f987900, a 
> java.util.HashMap),
>   which is held by "CM Event Dispatcher (Fire ConfigurationEvent: 
> pid=org.apache.sling.jcr.resource.internal.JcrResourceResolverFactoryImpl) 
> {noformat}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[GitHub] [sling-org-apache-sling-engine] cziegeler commented on pull request #32: SLING-11824 : Deadlock during repository restart

2023-04-11 Thread via GitHub


cziegeler commented on PR #32:
URL: 
https://github.com/apache/sling-org-apache-sling-engine/pull/32#issuecomment-1504674859

   I've added some basic tests


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@sling.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [sling-org-apache-sling-engine] cziegeler merged pull request #32: SLING-11824 : Deadlock during repository restart

2023-04-11 Thread via GitHub


cziegeler merged PR #32:
URL: https://github.com/apache/sling-org-apache-sling-engine/pull/32


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@sling.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [sling-org-apache-sling-engine] sonarcloud[bot] commented on pull request #32: SLING-11824 : Deadlock during repository restart

2023-04-11 Thread via GitHub


sonarcloud[bot] commented on PR #32:
URL: 
https://github.com/apache/sling-org-apache-sling-engine/pull/32#issuecomment-1504673941

   SonarCloud Quality Gate failed.    [![Quality Gate 
failed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/failed-16px.png
 'Quality Gate 
failed')](https://sonarcloud.io/dashboard?id=apache_sling-org-apache-sling-engine&pullRequest=32)
   
   
[![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png
 
'Bug')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-engine&pullRequest=32&resolved=false&types=BUG)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-engine&pullRequest=32&resolved=false&types=BUG)
 [0 
Bugs](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-engine&pullRequest=32&resolved=false&types=BUG)
  
   
[![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png
 
'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-engine&pullRequest=32&resolved=false&types=VULNERABILITY)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-engine&pullRequest=32&resolved=false&types=VULNERABILITY)
 [0 
Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-engine&pullRequest=32&resolved=false&types=VULNERABILITY)
  
   [![Security 
Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png
 'Security 
Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-engine&pullRequest=32&resolved=false&types=SECURITY_HOTSPOT)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-engine&pullRequest=32&resolved=false&types=SECURITY_HOTSPOT)
 [0 Security 
Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-engine&pullRequest=32&resolved=false&types=SECURITY_HOTSPOT)
  
   [![Code 
Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png
 'Code 
Smell')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-engine&pullRequest=32&resolved=false&types=CODE_SMELL)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-engine&pullRequest=32&resolved=false&types=CODE_SMELL)
 [0 Code 
Smells](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-engine&pullRequest=32&resolved=false&types=CODE_SMELL)
   
   
[![77.6%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/60-16px.png
 
'77.6%')](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-engine&pullRequest=32&metric=new_coverage&view=list)
 [77.6% 
Coverage](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-engine&pullRequest=32&metric=new_coverage&view=list)
  
   
[![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png
 
'0.0%')](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-engine&pullRequest=32&metric=new_duplicated_lines_density&view=list)
 [0.0% 
Duplication](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-engine&pullRequest=32&metric=new_duplicated_lines_density&view=list)
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@sling.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[jira] [Commented] (SLING-9662) Introduce an URI Mapping SPI

2023-04-11 Thread Carsten Ziegeler (Jira)


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

Carsten Ziegeler commented on SLING-9662:
-

[~henzlerg] Ther has been no activity here for a very long time. What is the 
status and can we resolve one way or the other?

> Introduce an URI Mapping SPI
> 
>
> Key: SLING-9662
> URL: https://issues.apache.org/jira/browse/SLING-9662
> Project: Sling
>  Issue Type: New Feature
>  Components: API
>Reporter: Georg Henzler
>Assignee: Georg Henzler
>Priority: Major
>  Time Spent: 3h 20m
>  Remaining Estimate: 0h
>
> _an earlier version used the terms ResourceUri/ResourceToUriMapper (updated 
> this description during the discussion)_ 
> Introduce a simple SPI that allows to contribute to the resource resolver's 
> map() and resolve() methods:
> Prerequisite *SlingUri:* (SLING-9745 to be completed first)
> General purpose class to represent a ResourceUri (like e.g. a link in an html 
>  tag). Immutable itself but adjustable using the builder pattern. Part of 
> the Sling API and can be used anywhere to simplify handling/modification of 
> Sling ResourceUri. Implements RequestPathInfo. ResourceUri can be created 
> easily from a String, a Request, a Resource, a URI or a RequestPathInfo.
> *SlingUriMapper:*
> SPI interface to be implemented as OSGi Service. All registered services 
> build a conceptual chain sorted by service ranking. The resource link is 
> passed through the chain while any SlingUriMapper chain member may or may not 
> make adjustments to the resource link.
>  rr.resolve() passes through the chain starting at the SlingUriMapper with 
> the highest service ranking and rr.map() passes through the 
> chain starting at the SlingUriMapper with the lowest service 
> ranking
> *PathToUriMappingService:* 
> The new OSGi service to provide path to URI resolution and path to URI 
> mapping. The methods rr.resolve() and rr.map() and should delegate to this 
> service.
>  
> _Mailing List References:_
>  [https://www.mail-archive.com/dev@sling.apache.org/msg93537.html] 
>  [https://www.mail-archive.com/dev@sling.apache.org/msg87736.html]



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (SLING-8047) Rendered/exported JSON requested via SlingRequestProcessor is not written to output stream

2023-04-11 Thread Carsten Ziegeler (Jira)


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

Carsten Ziegeler commented on SLING-8047:
-

This is open for over four years now. Is this still a problem or can we resolve?

> Rendered/exported JSON requested via SlingRequestProcessor is not written to 
> output stream
> --
>
> Key: SLING-8047
> URL: https://issues.apache.org/jira/browse/SLING-8047
> Project: Sling
>  Issue Type: Bug
>  Components: Servlets
>Reporter: Philip Mundt
>Assignee: Jason E Bailey
>Priority: Major
> Attachments: 
> SLING-8047-DefaultGetServlet-does-not-write-to-output-stream.patch, 
> SLING-8047-ExportServlet-does-not-write-to-output-stream.patch
>
>  Time Spent: 2h 50m
>  Remaining Estimate: 0h
>
> While trying to facilitate the {{SlingRequestProcessor}} to get a rendered or 
> exported JSON representation of a resource, we ran into the problem of the 
> response always being empty. The HTML rendering worked without any issue.
> (See example code of [Get the rendered HTML for an AEM resource, component or 
> page|http://www.nateyolles.com/blog/2015/10/get-rendered-html-for-an-aem-resource-or-component]
>  or [https://stackoverflow.com/a/34218708])
> Main, observed difference seem to be the method calls to print writer:
> h4. JsonRenderer
> {{org.apache.sling.servlets.get.impl.helpers.JsonRenderer#render}} uses 
> {{#write}} method of response's print writer.
> h4. ExportServlet (via JacksonExporter)
> {{org.apache.sling.models.impl.ExportServlet#doGet}} uses {{#write}} method 
> of response's print writer.
> h4. HTMLRenderer
> {{org.apache.sling.servlets.get.impl.helpers.HtmlRenderer#render}} uses 
> {{#print}} and {{#println}} methods of response's print writer.
> h3. Further observations
> When the print writer's {{autoFlush}} property is set to true and one uses 
> the {{#println}} method instead of {{#write}}, the {{JsonRenderer}} will 
> flush the print writer's buffer to the output stream. Due to wrapping the 
> response in 
> {{org.apache.sling.scripting.core.impl.helper.OnDemandWriterResponse}} (where 
> {{autoFlush=false}}) this does not work for the {{ExportServlet}}.
> When adding implicit {{#flush()}} calls to both classes, both request 
> scenarios will work. According to the servlet specification, it should not be 
> necessary to flush the print writer, as the container must immediately flush 
> all remaining content to the client upon "termination of the service method 
> of the servlet".
> Please find two test cases for (where implicit {{#flush()}} calls were added):
>  * JsonRenderer ({{sling-org-apache-sling-servlets-get}}): 
> [^SLING-8047-DefaultGetServlet-does-not-write-to-output-stream.patch]
>  * ExportServlet ({{sling-org-apache-sling-models-impl}}): 
> [^SLING-8047-ExportServlet-does-not-write-to-output-stream.patch]



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (SLING-11677) Sling Engine Context 'org.apache.sling' has higher ranking than 'default' context

2023-04-11 Thread Carsten Ziegeler (Jira)


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

Carsten Ziegeler commented on SLING-11677:
--

[~kwin]  with FELIX–6584 released some time ago, can we close this?

> Sling Engine Context 'org.apache.sling' has higher ranking than 'default' 
> context
> -
>
> Key: SLING-11677
> URL: https://issues.apache.org/jira/browse/SLING-11677
> Project: Sling
>  Issue Type: Bug
>  Components: Engine
>Reporter: Konrad Windszus
>Assignee: Konrad Windszus
>Priority: Major
> Attachments: HTTP-Service-Default-Context.png, Servlet-Contexts.png
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> When a servlet is registered with the OSGi HTTP Whiteboard pattern without 
> the property {{osgi.http.whiteboard.context.select}} the "default" context 
> helper is used 
> (https://docs.osgi.org/specification/osgi.cmpn/7.0.0/service.http.whiteboard.html#service.http.whiteboard.common.properties)
> With the Jetty Implementation from Felix in Sling this has the 
> {{service.ranking}} {{Integer.MIN_VALUE}} 
> (https://github.com/apache/felix-dev/blob/e7d17aca517949dd65a913f9ac5088e653a4a2dc/http/base/src/main/java/org/apache/felix/http/base/internal/whiteboard/WhiteboardManager.java#L182)
>  while the one for the default Sling Main Servlet has no explicit ranking 
> (i.e. 0). That leads to the fact that the Sling Main servlet always takes 
> precedence as
> {quote}
> In the case of two Servlet Context Helpers with the same path, the service 
> with the highest ranking is searched first for a match. In the case of a tie, 
> the lowest service ID is searched first.
> {quote}
> (https://docs.osgi.org/specification/osgi.cmpn/7.0.0/service.http.whiteboard.html#service.http.whiteboard.servletcontext)
>  as both "default" and "org.apache.sling" are registered for path "".
> The Sling Main servlet context should use a lower ranking so that simple 
> servlets registered via OSGI HTTP Whiteboard pattern without explicit context 
> can kick in at all!
> Attached the web console of Sling Starter 12:
>  !Servlet-Contexts.png! 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[GitHub] [sling-org-apache-sling-engine] cziegeler commented on a diff in pull request #32: SLING-11824 : Deadlock during repository restart

2023-04-11 Thread via GitHub


cziegeler commented on code in PR #32:
URL: 
https://github.com/apache/sling-org-apache-sling-engine/pull/32#discussion_r1163625407


##
src/main/java/org/apache/sling/engine/impl/helper/SlingServletContext.java:
##
@@ -199,37 +202,78 @@ private void setServerInfo() {
 }
 }
 
-@Override
-public void contextDestroyed(final ServletContextEvent sce) {
-synchronized ( this ) {
-this.servletContext = null;
-this.setServerInfo();
-if ( this.registration != null ) {
-this.registration.unregister();
-this.registration = null;
-}
+private void runAsync(final Runnable r) {
+final Thread thread = new Thread(r, "SlingServletContext 
registration");

Review Comment:
   Adjusted



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@sling.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [sling-org-apache-sling-engine] cziegeler commented on a diff in pull request #32: SLING-11824 : Deadlock during repository restart

2023-04-11 Thread via GitHub


cziegeler commented on code in PR #32:
URL: 
https://github.com/apache/sling-org-apache-sling-engine/pull/32#discussion_r1163625189


##
src/main/java/org/apache/sling/engine/impl/helper/SlingServletContext.java:
##
@@ -116,6 +116,9 @@ public class SlingServletContext implements ServletContext, 
ServletContextListen
 
 private volatile String configuredServerInfo;
 
+// counter to synchronize the init and destroy methods
+private volatile long initCounter;

Review Comment:
   Sure, but it doesn't really matter - so I stick with long :)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@sling.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [sling-org-apache-sling-engine] sonarcloud[bot] commented on pull request #32: SLING-11824 : Deadlock during repository restart

2023-04-11 Thread via GitHub


sonarcloud[bot] commented on PR #32:
URL: 
https://github.com/apache/sling-org-apache-sling-engine/pull/32#issuecomment-1504649071

   SonarCloud Quality Gate failed.    [![Quality Gate 
failed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/failed-16px.png
 'Quality Gate 
failed')](https://sonarcloud.io/dashboard?id=apache_sling-org-apache-sling-engine&pullRequest=32)
   
   
[![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png
 
'Bug')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-engine&pullRequest=32&resolved=false&types=BUG)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-engine&pullRequest=32&resolved=false&types=BUG)
 [0 
Bugs](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-engine&pullRequest=32&resolved=false&types=BUG)
  
   
[![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png
 
'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-engine&pullRequest=32&resolved=false&types=VULNERABILITY)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-engine&pullRequest=32&resolved=false&types=VULNERABILITY)
 [0 
Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-engine&pullRequest=32&resolved=false&types=VULNERABILITY)
  
   [![Security 
Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png
 'Security 
Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-engine&pullRequest=32&resolved=false&types=SECURITY_HOTSPOT)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-engine&pullRequest=32&resolved=false&types=SECURITY_HOTSPOT)
 [0 Security 
Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-engine&pullRequest=32&resolved=false&types=SECURITY_HOTSPOT)
  
   [![Code 
Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png
 'Code 
Smell')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-engine&pullRequest=32&resolved=false&types=CODE_SMELL)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-engine&pullRequest=32&resolved=false&types=CODE_SMELL)
 [0 Code 
Smells](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-engine&pullRequest=32&resolved=false&types=CODE_SMELL)
   
   
[![77.6%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/60-16px.png
 
'77.6%')](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-engine&pullRequest=32&metric=new_coverage&view=list)
 [77.6% 
Coverage](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-engine&pullRequest=32&metric=new_coverage&view=list)
  
   
[![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png
 
'0.0%')](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-engine&pullRequest=32&metric=new_duplicated_lines_density&view=list)
 [0.0% 
Duplication](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-engine&pullRequest=32&metric=new_duplicated_lines_density&view=list)
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@sling.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [sling-org-apache-sling-feature-cpconverter] sonarcloud[bot] commented on pull request #137: Bump gson from 2.8.6 to 2.8.9

2023-04-11 Thread via GitHub


sonarcloud[bot] commented on PR #137:
URL: 
https://github.com/apache/sling-org-apache-sling-feature-cpconverter/pull/137#issuecomment-1503853376

   Kudos, SonarCloud Quality Gate passed!    [![Quality Gate 
passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png
 'Quality Gate 
passed')](https://sonarcloud.io/dashboard?id=apache_sling-org-apache-sling-feature-cpconverter&pullRequest=137)
   
   
[![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png
 
'Bug')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-feature-cpconverter&pullRequest=137&resolved=false&types=BUG)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-feature-cpconverter&pullRequest=137&resolved=false&types=BUG)
 [0 
Bugs](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-feature-cpconverter&pullRequest=137&resolved=false&types=BUG)
  
   
[![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png
 
'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-feature-cpconverter&pullRequest=137&resolved=false&types=VULNERABILITY)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-feature-cpconverter&pullRequest=137&resolved=false&types=VULNERABILITY)
 [0 
Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-feature-cpconverter&pullRequest=137&resolved=false&types=VULNERABILITY)
  
   [![Security 
Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png
 'Security 
Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-feature-cpconverter&pullRequest=137&resolved=false&types=SECURITY_HOTSPOT)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-feature-cpconverter&pullRequest=137&resolved=false&types=SECURITY_HOTSPOT)
 [0 Security 
Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-feature-cpconverter&pullRequest=137&resolved=false&types=SECURITY_HOTSPOT)
  
   [![Code 
Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png
 'Code 
Smell')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-feature-cpconverter&pullRequest=137&resolved=false&types=CODE_SMELL)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-feature-cpconverter&pullRequest=137&resolved=false&types=CODE_SMELL)
 [0 Code 
Smells](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-feature-cpconverter&pullRequest=137&resolved=false&types=CODE_SMELL)
   
   [![No Coverage 
information](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/NoCoverageInfo-16px.png
 'No Coverage 
information')](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-feature-cpconverter&pullRequest=137&metric=coverage&view=list)
 No Coverage information  
   
[![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png
 
'0.0%')](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-feature-cpconverter&pullRequest=137&metric=new_duplicated_lines_density&view=list)
 [0.0% 
Duplication](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-feature-cpconverter&pullRequest=137&metric=new_duplicated_lines_density&view=list)
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@sling.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [sling-org-apache-sling-feature-cpconverter] sonarcloud[bot] commented on pull request #163: [draft] remove toobig check

2023-04-11 Thread via GitHub


sonarcloud[bot] commented on PR #163:
URL: 
https://github.com/apache/sling-org-apache-sling-feature-cpconverter/pull/163#issuecomment-1503852715

   Kudos, SonarCloud Quality Gate passed!    [![Quality Gate 
passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png
 'Quality Gate 
passed')](https://sonarcloud.io/dashboard?id=apache_sling-org-apache-sling-feature-cpconverter&pullRequest=163)
   
   
[![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png
 
'Bug')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-feature-cpconverter&pullRequest=163&resolved=false&types=BUG)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-feature-cpconverter&pullRequest=163&resolved=false&types=BUG)
 [0 
Bugs](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-feature-cpconverter&pullRequest=163&resolved=false&types=BUG)
  
   
[![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png
 
'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-feature-cpconverter&pullRequest=163&resolved=false&types=VULNERABILITY)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-feature-cpconverter&pullRequest=163&resolved=false&types=VULNERABILITY)
 [0 
Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-feature-cpconverter&pullRequest=163&resolved=false&types=VULNERABILITY)
  
   [![Security 
Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png
 'Security 
Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-feature-cpconverter&pullRequest=163&resolved=false&types=SECURITY_HOTSPOT)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-feature-cpconverter&pullRequest=163&resolved=false&types=SECURITY_HOTSPOT)
 [0 Security 
Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-feature-cpconverter&pullRequest=163&resolved=false&types=SECURITY_HOTSPOT)
  
   [![Code 
Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png
 'Code 
Smell')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-feature-cpconverter&pullRequest=163&resolved=false&types=CODE_SMELL)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-feature-cpconverter&pullRequest=163&resolved=false&types=CODE_SMELL)
 [0 Code 
Smells](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-feature-cpconverter&pullRequest=163&resolved=false&types=CODE_SMELL)
   
   
[![100.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/100-16px.png
 
'100.0%')](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-feature-cpconverter&pullRequest=163&metric=new_coverage&view=list)
 [100.0% 
Coverage](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-feature-cpconverter&pullRequest=163&metric=new_coverage&view=list)
  
   
[![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png
 
'0.0%')](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-feature-cpconverter&pullRequest=163&metric=new_duplicated_lines_density&view=list)
 [0.0% 
Duplication](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-feature-cpconverter&pullRequest=163&metric=new_duplicated_lines_density&view=list)
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@sling.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [sling-org-apache-sling-engine] jsedding commented on a diff in pull request #32: SLING-11824 : Deadlock during repository restart

2023-04-11 Thread via GitHub


jsedding commented on code in PR #32:
URL: 
https://github.com/apache/sling-org-apache-sling-engine/pull/32#discussion_r1163046176


##
src/main/java/org/apache/sling/engine/impl/helper/SlingServletContext.java:
##
@@ -199,37 +202,78 @@ private void setServerInfo() {
 }
 }
 
-@Override
-public void contextDestroyed(final ServletContextEvent sce) {
-synchronized ( this ) {
-this.servletContext = null;
-this.setServerInfo();
-if ( this.registration != null ) {
-this.registration.unregister();
-this.registration = null;
-}
+private void runAsync(final Runnable r) {
+final Thread thread = new Thread(r, "SlingServletContext 
registration");

Review Comment:
   I think having different thread names for register and unregister might be 
useful.



##
src/main/java/org/apache/sling/engine/impl/helper/SlingServletContext.java:
##
@@ -116,6 +116,9 @@ public class SlingServletContext implements ServletContext, 
ServletContextListen
 
 private volatile String configuredServerInfo;
 
+// counter to synchronize the init and destroy methods
+private volatile long initCounter;

Review Comment:
   nit: wouldn't an int suffice? IIUC we don't care about an overflow, we only 
care that it's different.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@sling.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [sling-org-apache-sling-engine] sonarcloud[bot] commented on pull request #32: SLING-11824 : Deadlock during repository restart

2023-04-11 Thread via GitHub


sonarcloud[bot] commented on PR #32:
URL: 
https://github.com/apache/sling-org-apache-sling-engine/pull/32#issuecomment-1503695640

   SonarCloud Quality Gate failed.    [![Quality Gate 
failed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/failed-16px.png
 'Quality Gate 
failed')](https://sonarcloud.io/dashboard?id=apache_sling-org-apache-sling-engine&pullRequest=32)
   
   
[![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png
 
'Bug')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-engine&pullRequest=32&resolved=false&types=BUG)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-engine&pullRequest=32&resolved=false&types=BUG)
 [0 
Bugs](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-engine&pullRequest=32&resolved=false&types=BUG)
  
   
[![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png
 
'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-engine&pullRequest=32&resolved=false&types=VULNERABILITY)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-engine&pullRequest=32&resolved=false&types=VULNERABILITY)
 [0 
Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-engine&pullRequest=32&resolved=false&types=VULNERABILITY)
  
   [![Security 
Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png
 'Security 
Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-engine&pullRequest=32&resolved=false&types=SECURITY_HOTSPOT)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-engine&pullRequest=32&resolved=false&types=SECURITY_HOTSPOT)
 [0 Security 
Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-engine&pullRequest=32&resolved=false&types=SECURITY_HOTSPOT)
  
   [![Code 
Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png
 'Code 
Smell')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-engine&pullRequest=32&resolved=false&types=CODE_SMELL)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-engine&pullRequest=32&resolved=false&types=CODE_SMELL)
 [0 Code 
Smells](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-engine&pullRequest=32&resolved=false&types=CODE_SMELL)
   
   
[![59.2%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/50-16px.png
 
'59.2%')](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-engine&pullRequest=32&metric=new_coverage&view=list)
 [59.2% 
Coverage](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-engine&pullRequest=32&metric=new_coverage&view=list)
  
   
[![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png
 
'0.0%')](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-engine&pullRequest=32&metric=new_duplicated_lines_density&view=list)
 [0.0% 
Duplication](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-engine&pullRequest=32&metric=new_duplicated_lines_density&view=list)
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@sling.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [sling-org-apache-sling-engine] sonarcloud[bot] commented on pull request #32: SLING-11824 : Deadlock during repository restart

2023-04-11 Thread via GitHub


sonarcloud[bot] commented on PR #32:
URL: 
https://github.com/apache/sling-org-apache-sling-engine/pull/32#issuecomment-1503681190

   SonarCloud Quality Gate failed.    [![Quality Gate 
failed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/failed-16px.png
 'Quality Gate 
failed')](https://sonarcloud.io/dashboard?id=apache_sling-org-apache-sling-engine&pullRequest=32)
   
   
[![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png
 
'Bug')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-engine&pullRequest=32&resolved=false&types=BUG)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-engine&pullRequest=32&resolved=false&types=BUG)
 [0 
Bugs](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-engine&pullRequest=32&resolved=false&types=BUG)
  
   
[![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png
 
'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-engine&pullRequest=32&resolved=false&types=VULNERABILITY)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-engine&pullRequest=32&resolved=false&types=VULNERABILITY)
 [0 
Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-engine&pullRequest=32&resolved=false&types=VULNERABILITY)
  
   [![Security 
Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png
 'Security 
Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-engine&pullRequest=32&resolved=false&types=SECURITY_HOTSPOT)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-engine&pullRequest=32&resolved=false&types=SECURITY_HOTSPOT)
 [0 Security 
Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-engine&pullRequest=32&resolved=false&types=SECURITY_HOTSPOT)
  
   [![Code 
Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png
 'Code 
Smell')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-engine&pullRequest=32&resolved=false&types=CODE_SMELL)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-engine&pullRequest=32&resolved=false&types=CODE_SMELL)
 [1 Code 
Smell](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-engine&pullRequest=32&resolved=false&types=CODE_SMELL)
   
   
[![56.9%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/50-16px.png
 
'56.9%')](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-engine&pullRequest=32&metric=new_coverage&view=list)
 [56.9% 
Coverage](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-engine&pullRequest=32&metric=new_coverage&view=list)
  
   
[![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png
 
'0.0%')](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-engine&pullRequest=32&metric=new_duplicated_lines_density&view=list)
 [0.0% 
Duplication](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-engine&pullRequest=32&metric=new_duplicated_lines_density&view=list)
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@sling.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[jira] [Updated] (SLING-11824) Deadlock during repository restart

2023-04-11 Thread Julian Sedding (Jira)


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

Julian Sedding updated SLING-11824:
---
Description: 
A deadlock can occur when the repository is restarted in a running system. This 
may be due to a configuration change of a low level component, but has also 
been reported to occur after refreshing the commons-io bundle.

>From the thread dump
{noformat}
"VM Thread" os_prio=0 cpu=106005.20ms elapsed=72363.91s tid=0x56165220f800 
nid=0x19ef runnable  
"ParGC Thread#0" os_prio=0 cpu=11616.68ms elapsed=72363.93s 
tid=0x5616520cb800 nid=0x19ee runnable  
"ParGC Thread#1" os_prio=0 cpu=11624.23ms elapsed=72362.83s 
tid=0x5616534fd800 nid=0x19f8 runnable  
"ParGC Thread#2" os_prio=0 cpu=11621.66ms elapsed=72362.83s 
tid=0x561653518000 nid=0x19f9 runnable  
"VM Periodic Task Thread" os_prio=0 cpu=32588.40ms elapsed=72360.26s 
tid=0x561655593800 nid=0x1a13 waiting on condition  
JNI global refs: 98, weak refs: 3
Found one Java-level deadlock:
=
"CM Event Dispatcher (Fire ConfigurationEvent: 
pid=org.apache.sling.jcr.resource.internal.JcrResourceResolverFactoryImpl)":
  waiting to lock monitor 0x56166302ce80 (object 0x0007679e6638, a 
org.apache.sling.engine.impl.helper.SlingServletContext),
  which is held by "SlingServletContext registration"
"SlingServletContext registration":
  waiting to lock monitor 0x5616631e3480 (object 0x00074f987900, a 
java.util.HashMap),
  which is held by "CM Event Dispatcher (Fire ConfigurationEvent: 
pid=org.apache.sling.jcr.resource.internal.JcrResourceResolverFactoryImpl) 
{noformat}

  was:
A deadlock can occur when the repository is restarted in a running system. This 
may be due to a configuration change of a low level component, but has also 
been reported to occur after stopping and restarting the commons-io bundle.

>From the thread dump
{noformat}
"VM Thread" os_prio=0 cpu=106005.20ms elapsed=72363.91s tid=0x56165220f800 
nid=0x19ef runnable  
"ParGC Thread#0" os_prio=0 cpu=11616.68ms elapsed=72363.93s 
tid=0x5616520cb800 nid=0x19ee runnable  
"ParGC Thread#1" os_prio=0 cpu=11624.23ms elapsed=72362.83s 
tid=0x5616534fd800 nid=0x19f8 runnable  
"ParGC Thread#2" os_prio=0 cpu=11621.66ms elapsed=72362.83s 
tid=0x561653518000 nid=0x19f9 runnable  
"VM Periodic Task Thread" os_prio=0 cpu=32588.40ms elapsed=72360.26s 
tid=0x561655593800 nid=0x1a13 waiting on condition  
JNI global refs: 98, weak refs: 3
Found one Java-level deadlock:
=
"CM Event Dispatcher (Fire ConfigurationEvent: 
pid=org.apache.sling.jcr.resource.internal.JcrResourceResolverFactoryImpl)":
  waiting to lock monitor 0x56166302ce80 (object 0x0007679e6638, a 
org.apache.sling.engine.impl.helper.SlingServletContext),
  which is held by "SlingServletContext registration"
"SlingServletContext registration":
  waiting to lock monitor 0x5616631e3480 (object 0x00074f987900, a 
java.util.HashMap),
  which is held by "CM Event Dispatcher (Fire ConfigurationEvent: 
pid=org.apache.sling.jcr.resource.internal.JcrResourceResolverFactoryImpl) 
{noformat}


> Deadlock during repository restart
> --
>
> Key: SLING-11824
> URL: https://issues.apache.org/jira/browse/SLING-11824
> Project: Sling
>  Issue Type: Bug
>  Components: Engine
>Affects Versions: Engine 2.14.0
>Reporter: Julian Sedding
>Priority: Major
> Fix For: Engine 2.14.2
>
>
> A deadlock can occur when the repository is restarted in a running system. 
> This may be due to a configuration change of a low level component, but has 
> also been reported to occur after refreshing the commons-io bundle.
> From the thread dump
> {noformat}
> "VM Thread" os_prio=0 cpu=106005.20ms elapsed=72363.91s 
> tid=0x56165220f800 nid=0x19ef runnable  
> "ParGC Thread#0" os_prio=0 cpu=11616.68ms elapsed=72363.93s 
> tid=0x5616520cb800 nid=0x19ee runnable  
> "ParGC Thread#1" os_prio=0 cpu=11624.23ms elapsed=72362.83s 
> tid=0x5616534fd800 nid=0x19f8 runnable  
> "ParGC Thread#2" os_prio=0 cpu=11621.66ms elapsed=72362.83s 
> tid=0x561653518000 nid=0x19f9 runnable  
> "VM Periodic Task Thread" os_prio=0 cpu=32588.40ms elapsed=72360.26s 
> tid=0x561655593800 nid=0x1a13 waiting on condition  
> JNI global refs: 98, weak refs: 3
> Found one Java-level deadlock:
> =
> "CM Event Dispatcher (Fire ConfigurationEvent: 
> pid=org.apache.sling.jcr.resource.internal.JcrResourceResolverFactoryImpl)":
>   waiting to lock monitor 0x56166302ce80 (object 0x0007679e6638, a 
> org.apache.sling.engine.impl.helper.SlingServletContext),
>   which is held by "SlingServletContext registration"
> "SlingServletContext registration":
>   waiting to lock monitor 0x5616631e3480 (object 0x

[jira] [Assigned] (SLING-11824) Deadlock during repository restart

2023-04-11 Thread Carsten Ziegeler (Jira)


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

Carsten Ziegeler reassigned SLING-11824:


Assignee: Carsten Ziegeler

> Deadlock during repository restart
> --
>
> Key: SLING-11824
> URL: https://issues.apache.org/jira/browse/SLING-11824
> Project: Sling
>  Issue Type: Bug
>  Components: Engine
>Affects Versions: Engine 2.14.0
>Reporter: Julian Sedding
>Assignee: Carsten Ziegeler
>Priority: Major
> Fix For: Engine 2.14.2
>
>
> A deadlock can occur when the repository is restarted in a running system. 
> This may be due to a configuration change of a low level component, but has 
> also been reported to occur after refreshing the commons-io bundle.
> From the thread dump
> {noformat}
> "VM Thread" os_prio=0 cpu=106005.20ms elapsed=72363.91s 
> tid=0x56165220f800 nid=0x19ef runnable  
> "ParGC Thread#0" os_prio=0 cpu=11616.68ms elapsed=72363.93s 
> tid=0x5616520cb800 nid=0x19ee runnable  
> "ParGC Thread#1" os_prio=0 cpu=11624.23ms elapsed=72362.83s 
> tid=0x5616534fd800 nid=0x19f8 runnable  
> "ParGC Thread#2" os_prio=0 cpu=11621.66ms elapsed=72362.83s 
> tid=0x561653518000 nid=0x19f9 runnable  
> "VM Periodic Task Thread" os_prio=0 cpu=32588.40ms elapsed=72360.26s 
> tid=0x561655593800 nid=0x1a13 waiting on condition  
> JNI global refs: 98, weak refs: 3
> Found one Java-level deadlock:
> =
> "CM Event Dispatcher (Fire ConfigurationEvent: 
> pid=org.apache.sling.jcr.resource.internal.JcrResourceResolverFactoryImpl)":
>   waiting to lock monitor 0x56166302ce80 (object 0x0007679e6638, a 
> org.apache.sling.engine.impl.helper.SlingServletContext),
>   which is held by "SlingServletContext registration"
> "SlingServletContext registration":
>   waiting to lock monitor 0x5616631e3480 (object 0x00074f987900, a 
> java.util.HashMap),
>   which is held by "CM Event Dispatcher (Fire ConfigurationEvent: 
> pid=org.apache.sling.jcr.resource.internal.JcrResourceResolverFactoryImpl) 
> {noformat}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (SLING-11824) Deadlock during repository restart

2023-04-11 Thread Carsten Ziegeler (Jira)


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

Carsten Ziegeler commented on SLING-11824:
--

I think this is due to the synchronous service unregistration in 
SlingServletContext#contextDestroyed .  I can't reproduce the issue with this 
PR: [https://github.com/apache/sling-org-apache-sling-engine/pull/32]

 

> Deadlock during repository restart
> --
>
> Key: SLING-11824
> URL: https://issues.apache.org/jira/browse/SLING-11824
> Project: Sling
>  Issue Type: Bug
>  Components: Engine
>Affects Versions: Engine 2.14.0
>Reporter: Julian Sedding
>Assignee: Carsten Ziegeler
>Priority: Major
> Fix For: Engine 2.14.2
>
>
> A deadlock can occur when the repository is restarted in a running system. 
> This may be due to a configuration change of a low level component, but has 
> also been reported to occur after stopping and restarting the commons-io 
> bundle.
> From the thread dump
> {noformat}
> "VM Thread" os_prio=0 cpu=106005.20ms elapsed=72363.91s 
> tid=0x56165220f800 nid=0x19ef runnable  
> "ParGC Thread#0" os_prio=0 cpu=11616.68ms elapsed=72363.93s 
> tid=0x5616520cb800 nid=0x19ee runnable  
> "ParGC Thread#1" os_prio=0 cpu=11624.23ms elapsed=72362.83s 
> tid=0x5616534fd800 nid=0x19f8 runnable  
> "ParGC Thread#2" os_prio=0 cpu=11621.66ms elapsed=72362.83s 
> tid=0x561653518000 nid=0x19f9 runnable  
> "VM Periodic Task Thread" os_prio=0 cpu=32588.40ms elapsed=72360.26s 
> tid=0x561655593800 nid=0x1a13 waiting on condition  
> JNI global refs: 98, weak refs: 3
> Found one Java-level deadlock:
> =
> "CM Event Dispatcher (Fire ConfigurationEvent: 
> pid=org.apache.sling.jcr.resource.internal.JcrResourceResolverFactoryImpl)":
>   waiting to lock monitor 0x56166302ce80 (object 0x0007679e6638, a 
> org.apache.sling.engine.impl.helper.SlingServletContext),
>   which is held by "SlingServletContext registration"
> "SlingServletContext registration":
>   waiting to lock monitor 0x5616631e3480 (object 0x00074f987900, a 
> java.util.HashMap),
>   which is held by "CM Event Dispatcher (Fire ConfigurationEvent: 
> pid=org.apache.sling.jcr.resource.internal.JcrResourceResolverFactoryImpl) 
> {noformat}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Assigned] (SLING-11824) Deadlock during repository restart

2023-04-11 Thread Carsten Ziegeler (Jira)


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

Carsten Ziegeler reassigned SLING-11824:


Assignee: (was: Carsten Ziegeler)

> Deadlock during repository restart
> --
>
> Key: SLING-11824
> URL: https://issues.apache.org/jira/browse/SLING-11824
> Project: Sling
>  Issue Type: Bug
>  Components: Engine
>Affects Versions: Engine 2.14.0
>Reporter: Julian Sedding
>Priority: Major
> Fix For: Engine 2.14.2
>
>
> A deadlock can occur when the repository is restarted in a running system. 
> This may be due to a configuration change of a low level component, but has 
> also been reported to occur after stopping and restarting the commons-io 
> bundle.
> From the thread dump
> {noformat}
> "VM Thread" os_prio=0 cpu=106005.20ms elapsed=72363.91s 
> tid=0x56165220f800 nid=0x19ef runnable  
> "ParGC Thread#0" os_prio=0 cpu=11616.68ms elapsed=72363.93s 
> tid=0x5616520cb800 nid=0x19ee runnable  
> "ParGC Thread#1" os_prio=0 cpu=11624.23ms elapsed=72362.83s 
> tid=0x5616534fd800 nid=0x19f8 runnable  
> "ParGC Thread#2" os_prio=0 cpu=11621.66ms elapsed=72362.83s 
> tid=0x561653518000 nid=0x19f9 runnable  
> "VM Periodic Task Thread" os_prio=0 cpu=32588.40ms elapsed=72360.26s 
> tid=0x561655593800 nid=0x1a13 waiting on condition  
> JNI global refs: 98, weak refs: 3
> Found one Java-level deadlock:
> =
> "CM Event Dispatcher (Fire ConfigurationEvent: 
> pid=org.apache.sling.jcr.resource.internal.JcrResourceResolverFactoryImpl)":
>   waiting to lock monitor 0x56166302ce80 (object 0x0007679e6638, a 
> org.apache.sling.engine.impl.helper.SlingServletContext),
>   which is held by "SlingServletContext registration"
> "SlingServletContext registration":
>   waiting to lock monitor 0x5616631e3480 (object 0x00074f987900, a 
> java.util.HashMap),
>   which is held by "CM Event Dispatcher (Fire ConfigurationEvent: 
> pid=org.apache.sling.jcr.resource.internal.JcrResourceResolverFactoryImpl) 
> {noformat}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (SLING-11824) Deadlock during repository restart

2023-04-11 Thread Carsten Ziegeler (Jira)


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

Carsten Ziegeler updated SLING-11824:
-
Affects Version/s: (was: Resource Resolver 1.10.0)

> Deadlock during repository restart
> --
>
> Key: SLING-11824
> URL: https://issues.apache.org/jira/browse/SLING-11824
> Project: Sling
>  Issue Type: Bug
>  Components: Engine
>Affects Versions: Engine 2.14.0
>Reporter: Julian Sedding
>Assignee: Carsten Ziegeler
>Priority: Major
> Fix For: Engine 2.14.2
>
>
> A deadlock can occur when the repository is restarted in a running system. 
> This may be due to a configuration change of a low level component, but has 
> also been reported to occur after stopping and restarting the commons-io 
> bundle.
> From the thread dump
> {noformat}
> "VM Thread" os_prio=0 cpu=106005.20ms elapsed=72363.91s 
> tid=0x56165220f800 nid=0x19ef runnable  
> "ParGC Thread#0" os_prio=0 cpu=11616.68ms elapsed=72363.93s 
> tid=0x5616520cb800 nid=0x19ee runnable  
> "ParGC Thread#1" os_prio=0 cpu=11624.23ms elapsed=72362.83s 
> tid=0x5616534fd800 nid=0x19f8 runnable  
> "ParGC Thread#2" os_prio=0 cpu=11621.66ms elapsed=72362.83s 
> tid=0x561653518000 nid=0x19f9 runnable  
> "VM Periodic Task Thread" os_prio=0 cpu=32588.40ms elapsed=72360.26s 
> tid=0x561655593800 nid=0x1a13 waiting on condition  
> JNI global refs: 98, weak refs: 3
> Found one Java-level deadlock:
> =
> "CM Event Dispatcher (Fire ConfigurationEvent: 
> pid=org.apache.sling.jcr.resource.internal.JcrResourceResolverFactoryImpl)":
>   waiting to lock monitor 0x56166302ce80 (object 0x0007679e6638, a 
> org.apache.sling.engine.impl.helper.SlingServletContext),
>   which is held by "SlingServletContext registration"
> "SlingServletContext registration":
>   waiting to lock monitor 0x5616631e3480 (object 0x00074f987900, a 
> java.util.HashMap),
>   which is held by "CM Event Dispatcher (Fire ConfigurationEvent: 
> pid=org.apache.sling.jcr.resource.internal.JcrResourceResolverFactoryImpl) 
> {noformat}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (SLING-11824) Deadlock during repository restart

2023-04-11 Thread Carsten Ziegeler (Jira)


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

Carsten Ziegeler updated SLING-11824:
-
Fix Version/s: Engine 2.14.2

> Deadlock during repository restart
> --
>
> Key: SLING-11824
> URL: https://issues.apache.org/jira/browse/SLING-11824
> Project: Sling
>  Issue Type: Bug
>  Components: Engine, ResourceResolver
>Affects Versions: Resource Resolver 1.10.0, Engine 2.14.0
>Reporter: Julian Sedding
>Assignee: Carsten Ziegeler
>Priority: Major
> Fix For: Engine 2.14.2
>
>
> A deadlock can occur when the repository is restarted in a running system. 
> This may be due to a configuration change of a low level component, but has 
> also been reported to occur after stopping and restarting the commons-io 
> bundle.
> From the thread dump
> {noformat}
> "VM Thread" os_prio=0 cpu=106005.20ms elapsed=72363.91s 
> tid=0x56165220f800 nid=0x19ef runnable  
> "ParGC Thread#0" os_prio=0 cpu=11616.68ms elapsed=72363.93s 
> tid=0x5616520cb800 nid=0x19ee runnable  
> "ParGC Thread#1" os_prio=0 cpu=11624.23ms elapsed=72362.83s 
> tid=0x5616534fd800 nid=0x19f8 runnable  
> "ParGC Thread#2" os_prio=0 cpu=11621.66ms elapsed=72362.83s 
> tid=0x561653518000 nid=0x19f9 runnable  
> "VM Periodic Task Thread" os_prio=0 cpu=32588.40ms elapsed=72360.26s 
> tid=0x561655593800 nid=0x1a13 waiting on condition  
> JNI global refs: 98, weak refs: 3
> Found one Java-level deadlock:
> =
> "CM Event Dispatcher (Fire ConfigurationEvent: 
> pid=org.apache.sling.jcr.resource.internal.JcrResourceResolverFactoryImpl)":
>   waiting to lock monitor 0x56166302ce80 (object 0x0007679e6638, a 
> org.apache.sling.engine.impl.helper.SlingServletContext),
>   which is held by "SlingServletContext registration"
> "SlingServletContext registration":
>   waiting to lock monitor 0x5616631e3480 (object 0x00074f987900, a 
> java.util.HashMap),
>   which is held by "CM Event Dispatcher (Fire ConfigurationEvent: 
> pid=org.apache.sling.jcr.resource.internal.JcrResourceResolverFactoryImpl) 
> {noformat}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (SLING-11824) Deadlock during repository restart

2023-04-11 Thread Carsten Ziegeler (Jira)


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

Carsten Ziegeler updated SLING-11824:
-
Component/s: (was: ResourceResolver)

> Deadlock during repository restart
> --
>
> Key: SLING-11824
> URL: https://issues.apache.org/jira/browse/SLING-11824
> Project: Sling
>  Issue Type: Bug
>  Components: Engine
>Affects Versions: Resource Resolver 1.10.0, Engine 2.14.0
>Reporter: Julian Sedding
>Assignee: Carsten Ziegeler
>Priority: Major
> Fix For: Engine 2.14.2
>
>
> A deadlock can occur when the repository is restarted in a running system. 
> This may be due to a configuration change of a low level component, but has 
> also been reported to occur after stopping and restarting the commons-io 
> bundle.
> From the thread dump
> {noformat}
> "VM Thread" os_prio=0 cpu=106005.20ms elapsed=72363.91s 
> tid=0x56165220f800 nid=0x19ef runnable  
> "ParGC Thread#0" os_prio=0 cpu=11616.68ms elapsed=72363.93s 
> tid=0x5616520cb800 nid=0x19ee runnable  
> "ParGC Thread#1" os_prio=0 cpu=11624.23ms elapsed=72362.83s 
> tid=0x5616534fd800 nid=0x19f8 runnable  
> "ParGC Thread#2" os_prio=0 cpu=11621.66ms elapsed=72362.83s 
> tid=0x561653518000 nid=0x19f9 runnable  
> "VM Periodic Task Thread" os_prio=0 cpu=32588.40ms elapsed=72360.26s 
> tid=0x561655593800 nid=0x1a13 waiting on condition  
> JNI global refs: 98, weak refs: 3
> Found one Java-level deadlock:
> =
> "CM Event Dispatcher (Fire ConfigurationEvent: 
> pid=org.apache.sling.jcr.resource.internal.JcrResourceResolverFactoryImpl)":
>   waiting to lock monitor 0x56166302ce80 (object 0x0007679e6638, a 
> org.apache.sling.engine.impl.helper.SlingServletContext),
>   which is held by "SlingServletContext registration"
> "SlingServletContext registration":
>   waiting to lock monitor 0x5616631e3480 (object 0x00074f987900, a 
> java.util.HashMap),
>   which is held by "CM Event Dispatcher (Fire ConfigurationEvent: 
> pid=org.apache.sling.jcr.resource.internal.JcrResourceResolverFactoryImpl) 
> {noformat}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Created] (SLING-11824) Deadlock during repository restart

2023-04-11 Thread Julian Sedding (Jira)
Julian Sedding created SLING-11824:
--

 Summary: Deadlock during repository restart
 Key: SLING-11824
 URL: https://issues.apache.org/jira/browse/SLING-11824
 Project: Sling
  Issue Type: Bug
  Components: Engine, ResourceResolver
Affects Versions: Engine 2.14.0, Resource Resolver 1.10.0
Reporter: Julian Sedding
Assignee: Carsten Ziegeler


A deadlock can occur when the repository is restarted in a running system. This 
may be due to a configuration change of a low level component, but has also 
been reported to occur after stopping and restarting the commons-io bundle.

>From the thread dump
{noformat}
"VM Thread" os_prio=0 cpu=106005.20ms elapsed=72363.91s tid=0x56165220f800 
nid=0x19ef runnable  
"ParGC Thread#0" os_prio=0 cpu=11616.68ms elapsed=72363.93s 
tid=0x5616520cb800 nid=0x19ee runnable  
"ParGC Thread#1" os_prio=0 cpu=11624.23ms elapsed=72362.83s 
tid=0x5616534fd800 nid=0x19f8 runnable  
"ParGC Thread#2" os_prio=0 cpu=11621.66ms elapsed=72362.83s 
tid=0x561653518000 nid=0x19f9 runnable  
"VM Periodic Task Thread" os_prio=0 cpu=32588.40ms elapsed=72360.26s 
tid=0x561655593800 nid=0x1a13 waiting on condition  
JNI global refs: 98, weak refs: 3
Found one Java-level deadlock:
=
"CM Event Dispatcher (Fire ConfigurationEvent: 
pid=org.apache.sling.jcr.resource.internal.JcrResourceResolverFactoryImpl)":
  waiting to lock monitor 0x56166302ce80 (object 0x0007679e6638, a 
org.apache.sling.engine.impl.helper.SlingServletContext),
  which is held by "SlingServletContext registration"
"SlingServletContext registration":
  waiting to lock monitor 0x5616631e3480 (object 0x00074f987900, a 
java.util.HashMap),
  which is held by "CM Event Dispatcher (Fire ConfigurationEvent: 
pid=org.apache.sling.jcr.resource.internal.JcrResourceResolverFactoryImpl) 
{noformat}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[GitHub] [sling-org-apache-sling-feature-cpconverter] rombert commented on pull request #164: Issues/sling 11821

2023-04-11 Thread via GitHub


rombert commented on PR #164:
URL: 
https://github.com/apache/sling-org-apache-sling-feature-cpconverter/pull/164#issuecomment-1503345048

   Thanks for the follow-up PR @DominikSuess 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@sling.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [sling-org-apache-sling-feature-cpconverter] rombert merged pull request #164: Issues/sling 11821

2023-04-11 Thread via GitHub


rombert merged PR #164:
URL: 
https://github.com/apache/sling-org-apache-sling-feature-cpconverter/pull/164


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@sling.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[Jenkins] Sling » Modules » sling-org-apache-sling-starter » master #722 is FIXED

2023-04-11 Thread Apache Jenkins Server
Please see 
https://ci-builds.apache.org/job/Sling/job/modules/job/sling-org-apache-sling-starter/job/master/722/
 for details.

No further emails will be sent until the status of the build is changed.

[GitHub] [sling-org-apache-sling-feature-cpconverter] niekraaijmakers commented on pull request #164: Issues/sling 11821

2023-04-11 Thread via GitHub


niekraaijmakers commented on PR #164:
URL: 
https://github.com/apache/sling-org-apache-sling-feature-cpconverter/pull/164#issuecomment-1503072596

   LGTM


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@sling.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [sling-org-apache-sling-feature-cpconverter] sonarcloud[bot] commented on pull request #164: Issues/sling 11821

2023-04-11 Thread via GitHub


sonarcloud[bot] commented on PR #164:
URL: 
https://github.com/apache/sling-org-apache-sling-feature-cpconverter/pull/164#issuecomment-1503019005

   SonarCloud Quality Gate failed.    [![Quality Gate 
failed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/failed-16px.png
 'Quality Gate 
failed')](https://sonarcloud.io/dashboard?id=apache_sling-org-apache-sling-feature-cpconverter&pullRequest=164)
   
   
[![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png
 
'Bug')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-feature-cpconverter&pullRequest=164&resolved=false&types=BUG)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-feature-cpconverter&pullRequest=164&resolved=false&types=BUG)
 [0 
Bugs](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-feature-cpconverter&pullRequest=164&resolved=false&types=BUG)
  
   
[![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png
 
'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-feature-cpconverter&pullRequest=164&resolved=false&types=VULNERABILITY)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-feature-cpconverter&pullRequest=164&resolved=false&types=VULNERABILITY)
 [0 
Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-feature-cpconverter&pullRequest=164&resolved=false&types=VULNERABILITY)
  
   [![Security 
Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png
 'Security 
Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-feature-cpconverter&pullRequest=164&resolved=false&types=SECURITY_HOTSPOT)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-feature-cpconverter&pullRequest=164&resolved=false&types=SECURITY_HOTSPOT)
 [0 Security 
Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-feature-cpconverter&pullRequest=164&resolved=false&types=SECURITY_HOTSPOT)
  
   [![Code 
Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png
 'Code 
Smell')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-feature-cpconverter&pullRequest=164&resolved=false&types=CODE_SMELL)
 
[![B](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/B-16px.png
 
'B')](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-feature-cpconverter&pullRequest=164&resolved=false&types=CODE_SMELL)
 [1 Code 
Smell](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-feature-cpconverter&pullRequest=164&resolved=false&types=CODE_SMELL)
   
   
[![100.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/100-16px.png
 
'100.0%')](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-feature-cpconverter&pullRequest=164&metric=new_coverage&view=list)
 [100.0% 
Coverage](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-feature-cpconverter&pullRequest=164&metric=new_coverage&view=list)
  
   
[![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png
 
'0.0%')](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-feature-cpconverter&pullRequest=164&metric=new_duplicated_lines_density&view=list)
 [0.0% 
Duplication](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-feature-cpconverter&pullRequest=164&metric=new_duplicated_lines_density&view=list)
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@sling.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [sling-org-apache-sling-feature-cpconverter] DominikSuess opened a new pull request, #164: Issues/sling 11821

2023-04-11 Thread via GitHub


DominikSuess opened a new pull request, #164:
URL: 
https://github.com/apache/sling-org-apache-sling-feature-cpconverter/pull/164

   @rombert - @niekraaijmakers  made me aware that I somehow missed to commit 
the latest local adjustments around packages without types which in the state I 
submitted in the PR causes the other unittests to fail. Sorry about the 
incomplete submission.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@sling.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[jira] [Updated] (SLING-11823) Sling Mocks: Allow specifying service ranking (or additional properties) when calling registerAdapter()

2023-04-11 Thread Henry Kuijpers (Jira)


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

Henry Kuijpers updated SLING-11823:
---
Description: 
{code:java}
final Session mockedSession = mock(Session.class);
doThrow(new 
RepositoryException("Failure")).when(mockedSession).move("/content/test", 
"/content/test2");
context.registerAdapter(ResourceResolver.class, Session.class, mockedSession);

// Call implementation that uses the ResourceResolver and adapts it to Session 
to call move
underTest.doSomething();
{code}

The consequence of this is that an adapterfactory is registered etc, however, 
it will not be called, since it has a lower service ranking than existing 
adapters (in case of JCR/OAK ResourceResolverType). 

It would be nice to be able to specify additional properties, or at least be 
able to specify the service ranking, so that one of those adapters could be 
forced to be the first in the list.

  was:
{code:java}
final Session mockedSession = mock(Session.class);
doThrow(new 
RepositoryException("Failure")).when(mockedSession).move("/content/test", 
"/content/test2");
context.registerAdapter(ResourceResolver.class, Session.class, mockedSession);

// Call implementation that uses the ResourceResolver and adapts it to session 
to call move
underTest.doSomething();
{code}

The consequence of this is that an adapterfactory is registered etc, however, 
it will not be called, since it has a lower service ranking than existing 
adapters (in case of JCR/OAK ResourceResolverType). 

It would be nice to be able to specify additional properties, or at least be 
able to specify the service ranking, so that one of those adapters could be 
forced to be the first in the list.


> Sling Mocks: Allow specifying service ranking (or additional properties) when 
> calling registerAdapter()
> ---
>
> Key: SLING-11823
> URL: https://issues.apache.org/jira/browse/SLING-11823
> Project: Sling
>  Issue Type: Improvement
>  Components: Testing
>Affects Versions: Testing Sling Mock 3.4.4
>Reporter: Henry Kuijpers
>Priority: Major
>
> {code:java}
> final Session mockedSession = mock(Session.class);
> doThrow(new 
> RepositoryException("Failure")).when(mockedSession).move("/content/test", 
> "/content/test2");
> context.registerAdapter(ResourceResolver.class, Session.class, mockedSession);
> // Call implementation that uses the ResourceResolver and adapts it to 
> Session to call move
> underTest.doSomething();
> {code}
> The consequence of this is that an adapterfactory is registered etc, however, 
> it will not be called, since it has a lower service ranking than existing 
> adapters (in case of JCR/OAK ResourceResolverType). 
> It would be nice to be able to specify additional properties, or at least be 
> able to specify the service ranking, so that one of those adapters could be 
> forced to be the first in the list.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (SLING-11823) Sling Mocks: Allow specifying service ranking (or additional properties) when calling registerAdapter()

2023-04-11 Thread Henry Kuijpers (Jira)


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

Henry Kuijpers updated SLING-11823:
---
Description: 
{code:java}
final Session mockedSession = mock(Session.class);
doThrow(new 
RepositoryException("Failure")).when(mockedSession).move("/content/test", 
"/content/test2");
context.registerAdapter(ResourceResolver.class, Session.class, mockedSession);

// Call implementation that uses the ResourceResolver and adapts it to session 
to call move
underTest.doSomething();
{code}

The consequence of this is that an adapterfactory is registered etc, however, 
it will not be called, since it has a lower service ranking than existing 
adapters (in case of JCR/OAK ResourceResolverType). 

It would be nice to be able to specify additional properties, or at least be 
able to specify the service ranking, so that one of those adapters could be 
forced to be the first in the list.

  was:
{code:java}
final Session mockedSession = mock(Session.class);
doThrow(new 
RepositoryException("Failure")).when(mockedSession).move("/content/test", 
"/content/test2");
context.registerAdapter(ResourceResolver.class, Session.class, mockedSession);
{code}

The consequence of this is that an adapterfactory is registered etc, however, 
it will not be called, since it has a lower service ranking than existing 
adapters (in case of JCR/OAK ResourceResolverType). 

It would be nice to be able to specify additional properties, or at least be 
able to specify the service ranking, so that one of those adapters could be 
forced to be the first in the list.


> Sling Mocks: Allow specifying service ranking (or additional properties) when 
> calling registerAdapter()
> ---
>
> Key: SLING-11823
> URL: https://issues.apache.org/jira/browse/SLING-11823
> Project: Sling
>  Issue Type: Improvement
>  Components: Testing
>Affects Versions: Testing Sling Mock 3.4.4
>Reporter: Henry Kuijpers
>Priority: Major
>
> {code:java}
> final Session mockedSession = mock(Session.class);
> doThrow(new 
> RepositoryException("Failure")).when(mockedSession).move("/content/test", 
> "/content/test2");
> context.registerAdapter(ResourceResolver.class, Session.class, mockedSession);
> // Call implementation that uses the ResourceResolver and adapts it to 
> session to call move
> underTest.doSomething();
> {code}
> The consequence of this is that an adapterfactory is registered etc, however, 
> it will not be called, since it has a lower service ranking than existing 
> adapters (in case of JCR/OAK ResourceResolverType). 
> It would be nice to be able to specify additional properties, or at least be 
> able to specify the service ranking, so that one of those adapters could be 
> forced to be the first in the list.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Created] (SLING-11823) Sling Mocks: Allow specifying service ranking (or additional properties) when calling registerAdapter()

2023-04-11 Thread Henry Kuijpers (Jira)
Henry Kuijpers created SLING-11823:
--

 Summary: Sling Mocks: Allow specifying service ranking (or 
additional properties) when calling registerAdapter()
 Key: SLING-11823
 URL: https://issues.apache.org/jira/browse/SLING-11823
 Project: Sling
  Issue Type: Improvement
  Components: Testing
Affects Versions: Testing Sling Mock 3.4.4
Reporter: Henry Kuijpers


{code:java}
final Session mockedSession = mock(Session.class);
doThrow(new 
RepositoryException("Failure")).when(mockedSession).move("/content/test", 
"/content/test2");
context.registerAdapter(ResourceResolver.class, Session.class, mockedSession);
{code}

The consequence of this is that an adapterfactory is registered etc, however, 
it will not be called, since it has a lower service ranking than existing 
adapters (in case of JCR/OAK ResourceResolverType). 

It would be nice to be able to specify additional properties, or at least be 
able to specify the service ranking, so that one of those adapters could be 
forced to be the first in the list.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[GitHub] [sling-org-apache-sling-feature-cpconverter] niekraaijmakers commented on pull request #145: [SECURITY] Fix Zip Slip Vulnerability

2023-04-11 Thread via GitHub


niekraaijmakers commented on PR #145:
URL: 
https://github.com/apache/sling-org-apache-sling-feature-cpconverter/pull/145#issuecomment-1502792995

   LGTM.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@sling.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org