[
https://issues.apache.org/jira/browse/SLING-13248?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18090994#comment-18090994
]
Julian Reschke commented on SLING-13248:
----------------------------------------
This probably requires a test case. Weird vanity paths of course should not
abort vp init.
> 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
> 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)