You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Julian Sedding (Jira)" <ji...@apache.org> on 2026/07/23 10:11:00 UTC
[jira] [Commented] (SLING-13248) Exception while initializing Vanity paths
[ https://issues.apache.org/jira/browse/SLING-13248?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18098429#comment-18098429 ]
Julian Sedding commented on SLING-13248:
----------------------------------------
[~joerghoh] and I analysed this issue. It turns out that a "sling:vanityPath" property of type "Date" exists. This is always sorted before any propert of type "String" in the query result. However, the {{PagedQueryIterator}} coerces the value of the "Date" property to a "String", before comparing it using {{Comparable#compareTo()}}.
I.e. the query sorts "(Date)2025-10-14T20:32:01.481Z" before "(String)/acs-commons", but the lexicographic order is "(String)/acs-commons" before "(String)2025-10-14T20:32:01.481Z".
See also OAK-12327.
cc [~joerghoh]
> Exception while initializing Vanity paths
> -----------------------------------------
>
> Key: SLING-13248
> URL: https://issues.apache.org/jira/browse/SLING-13248
> Project: Sling
> Issue Type: Task
> Components: ResourceResolver
> Affects Versions: Resource Resolver 1.12.12
> Reporter: Joerg Hoh
> Assignee: Joerg Hoh
> Priority: Major
>
> Came across the case, that the Sling vanity path resolution was not using the cache, but it was resolving the vanity paths always within the {{ResourceResolver.resolve(path)}} codepath.
> It seems to be caused by this exception:
> {noformat}
> 18.06.2026 10:12:45.421 *ERROR* [VanityPathInitializer] org.apache.sling.resourceresolver.impl.mapping.PagedQueryIterator unexpected query result in page 0, property name 'sling:vanityPath', got '/acs-commons', last value was '2025-10-14T20:32:01.481Z'
> 18.06.2026 10:12:45.422 *ERROR* [VanityPathInitializer] org.apache.sling.resourceresolver.impl.mapping.VanityPathHandler vanity path initializer thread terminated with an exception
> org.apache.sling.resourceresolver.impl.mapping.PagedQueryIterator$QueryImplementationException: unexpected query result in page 0, property name 'sling:vanityPath', got '/acs-commons', last value was '2025-10-14T20:32:01.481Z'
> at org.apache.sling.resourceresolver.impl.mapping.PagedQueryIterator.getNext(PagedQueryIterator.java:104) [org.apache.sling.resourceresolver:1.12.12]
> at org.apache.sling.resourceresolver.impl.mapping.PagedQueryIterator.hasNext(PagedQueryIterator.java:135) [org.apache.sling.resourceresolver:1.12.12]
> at org.apache.sling.resourceresolver.impl.mapping.VanityPathHandler.loadVanityPaths(VanityPathHandler.java:491) [org.apache.sling.resourceresolver:1.12.12]
> at org.apache.sling.resourceresolver.impl.mapping.VanityPathHandler$VanityPathInitializer.execute(VanityPathHandler.java:199) [org.apache.sling.resourceresolver:1.12.12]
> at org.apache.sling.resourceresolver.impl.mapping.VanityPathHandler$VanityPathInitializer.run(VanityPathHandler.java:186) [org.apache.sling.resourceresolver:1.12.12]
> at java.base/java.lang.Thread.run(Thread.java:1583)
> {noformat}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)