You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Joerg Hoh (Jira)" <ji...@apache.org> on 2023/10/06 16:48:00 UTC
[jira] [Updated] (OAK-10473) Invalid names should be treated as non-existing items
[ https://issues.apache.org/jira/browse/OAK-10473?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Joerg Hoh updated OAK-10473:
----------------------------
Description:
I found that when a invalid path is resolved, an IllegalArgumentException is thrown within Oak, which is not handled by any other layer, but just bubbles up.
{noformat}
06.10.2023 18:32:58.115 *ERROR* [127.0.0.1 [1696609978107] GET /content/wknd/language-masters/en/about-us/%5bobject%20Object%5d.html HTTP/1.1] org.apache.sling.engine.impl.SlingRequestProcessorImpl service: Uncaught
Throwable
java.lang.IllegalArgumentException: Not a valid identifier 'object Object'
at org.apache.jackrabbit.guava.common.base.Preconditions.checkArgument(Preconditions.java:143) [org.apache.jackrabbit.guava:1.54.0.T20230817132355-3800a65]
at org.apache.jackrabbit.oak.plugins.identifier.IdentifierManager.getTree(IdentifierManager.java:133) [org.apache.jackrabbit.oak-core:1.54.0.T20230817132355-3800a65]
at org.apache.jackrabbit.oak.plugins.identifier.IdentifierManager.getPath(IdentifierManager.java:165) [org.apache.jackrabbit.oak-core:1.54.0.T20230817132355-3800a65]
at org.apache.jackrabbit.oak.namepath.impl.NamePathMapperImpl.getOakPath(NamePathMapperImpl.java:100) [org.apache.jackrabbit.oak-core:1.54.0.T20230817132355-3800a65]
at org.apache.jackrabbit.oak.jcr.session.SessionContext.getOakPath(SessionContext.java:361) [org.apache.jackrabbit.oak-jcr:1.54.0.T20230817132355-3800a65]
at org.apache.jackrabbit.oak.jcr.session.SessionContext.getOakPathOrThrowNotFound(SessionContext.java:398) [org.apache.jackrabbit.oak-jcr:1.54.0.T20230817132355-3800a65]
at org.apache.jackrabbit.oak.jcr.session.ItemImpl.getOakPathOrThrowNotFound(ItemImpl.java:333) [org.apache.jackrabbit.oak-jcr:1.54.0.T20230817132355-3800a65]
at org.apache.jackrabbit.oak.jcr.session.NodeImpl.getNodeOrNull(NodeImpl.java:1681) [org.apache.jackrabbit.oak-jcr:1.54.0.T20230817132355-3800a65]
at org.apache.sling.jcr.resource.internal.NodeUtil.getNodeOrNull(NodeUtil.java:136) [org.apache.sling.jcr.resource:3.2.4]
at org.apache.sling.jcr.resource.internal.helper.jcr.JcrItemResourceFactory.getSubitem(JcrItemResourceFactory.java:152) [org.apache.sling.jcr.resource:3.2.4]
at org.apache.sling.jcr.resource.internal.helper.jcr.JcrItemResourceFactory.getItem(JcrItemResourceFactory.java:117) [org.apache.sling.jcr.resource:3.2.4]
at org.apache.sling.jcr.resource.internal.helper.jcr.JcrItemResourceFactory.createResource(JcrItemResourceFactory.java:84) [org.apache.sling.jcr.resource:3.2.4]
at org.apache.sling.jcr.resource.internal.helper.jcr.JcrResourceProvider.getResource(JcrResourceProvider.java:342) [org.apache.sling.jcr.resource:3.2.4]
at org.apache.sling.resourceresolver.impl.providers.stateful.AuthenticatedResourceProvider.getResource(AuthenticatedResourceProvider.java:154) [org.apache.sling.resourceresolver:1.10.1.SNAPSHOT]
{noformat}
This exception should be caught within Oak and be treated as "this item does not exist", as higher layers (Sling here) cannot handle this exception well.
was:
I found that when a invalid path is resolved, an IllegalArgumentException is thrown within Oak, which is not handled by any other layer, but just bubbles up.
{noformat}
06.10.2023 18:32:58.115 *ERROR* [127.0.0.1 [1696609978107] GET /content/wknd/language-masters/en/about-us/%5bobject%20Object%5d.html HTTP/1.1] org.apache.sling.engine.impl.SlingRequestProcessorImpl service: Uncaught
Throwable
java.lang.IllegalArgumentException: Not a valid identifier 'object Object'
at org.apache.jackrabbit.guava.common.base.Preconditions.checkArgument(Preconditions.java:143) [org.apache.jackrabbit.guava:1.54.0.T20230817132355-3800a65]
at org.apache.jackrabbit.oak.plugins.identifier.IdentifierManager.getTree(IdentifierManager.java:133) [org.apache.jackrabbit.oak-core:1.54.0.T20230817132355-3800a65]
at org.apache.jackrabbit.oak.plugins.identifier.IdentifierManager.getPath(IdentifierManager.java:165) [org.apache.jackrabbit.oak-core:1.54.0.T20230817132355-3800a65]
at org.apache.jackrabbit.oak.namepath.impl.NamePathMapperImpl.getOakPath(NamePathMapperImpl.java:100) [org.apache.jackrabbit.oak-core:1.54.0.T20230817132355-3800a65]
at org.apache.jackrabbit.oak.jcr.session.SessionContext.getOakPath(SessionContext.java:361) [org.apache.jackrabbit.oak-jcr:1.54.0.T20230817132355-3800a65]
at org.apache.jackrabbit.oak.jcr.session.SessionContext.getOakPathOrThrowNotFound(SessionContext.java:398) [org.apache.jackrabbit.oak-jcr:1.54.0.T20230817132355-3800a65]
at org.apache.jackrabbit.oak.jcr.session.ItemImpl.getOakPathOrThrowNotFound(ItemImpl.java:333) [org.apache.jackrabbit.oak-jcr:1.54.0.T20230817132355-3800a65]
at org.apache.jackrabbit.oak.jcr.session.NodeImpl.getNodeOrNull(NodeImpl.java:1681) [org.apache.jackrabbit.oak-jcr:1.54.0.T20230817132355-3800a65]
at org.apache.sling.jcr.resource.internal.NodeUtil.getNodeOrNull(NodeUtil.java:136) [org.apache.sling.jcr.resource:3.2.4]
at org.apache.sling.jcr.resource.internal.helper.jcr.JcrItemResourceFactory.getSubitem(JcrItemResourceFactory.java:152) [org.apache.sling.jcr.resource:3.2.4]
at org.apache.sling.jcr.resource.internal.helper.jcr.JcrItemResourceFactory.getItem(JcrItemResourceFactory.java:117) [org.apache.sling.jcr.resource:3.2.4]
at org.apache.sling.jcr.resource.internal.helper.jcr.JcrItemResourceFactory.createResource(JcrItemResourceFactory.java:84) [org.apache.sling.jcr.resource:3.2.4]
at org.apache.sling.jcr.resource.internal.helper.jcr.JcrResourceProvider.getResource(JcrResourceProvider.java:342) [org.apache.sling.jcr.resource:3.2.4]
at org.apache.sling.resourceresolver.impl.providers.stateful.AuthenticatedResourceProvider.getResource(AuthenticatedResourceProvider.java:154) [org.apache.sling.resourceresolver:1.10.1.SNAPSHOT]
{noformat}
This exception should be caught within Oak and be treated as "this item does not exist", as higher layers (Sling here) cannot this exception well.
> Invalid names should be treated as non-existing items
> -----------------------------------------------------
>
> Key: OAK-10473
> URL: https://issues.apache.org/jira/browse/OAK-10473
> Project: Jackrabbit Oak
> Issue Type: Task
> Components: jcr
> Affects Versions: 1.56.0
> Reporter: Joerg Hoh
> Priority: Major
>
> I found that when a invalid path is resolved, an IllegalArgumentException is thrown within Oak, which is not handled by any other layer, but just bubbles up.
> {noformat}
> 06.10.2023 18:32:58.115 *ERROR* [127.0.0.1 [1696609978107] GET /content/wknd/language-masters/en/about-us/%5bobject%20Object%5d.html HTTP/1.1] org.apache.sling.engine.impl.SlingRequestProcessorImpl service: Uncaught
> Throwable
> java.lang.IllegalArgumentException: Not a valid identifier 'object Object'
> at org.apache.jackrabbit.guava.common.base.Preconditions.checkArgument(Preconditions.java:143) [org.apache.jackrabbit.guava:1.54.0.T20230817132355-3800a65]
> at org.apache.jackrabbit.oak.plugins.identifier.IdentifierManager.getTree(IdentifierManager.java:133) [org.apache.jackrabbit.oak-core:1.54.0.T20230817132355-3800a65]
> at org.apache.jackrabbit.oak.plugins.identifier.IdentifierManager.getPath(IdentifierManager.java:165) [org.apache.jackrabbit.oak-core:1.54.0.T20230817132355-3800a65]
> at org.apache.jackrabbit.oak.namepath.impl.NamePathMapperImpl.getOakPath(NamePathMapperImpl.java:100) [org.apache.jackrabbit.oak-core:1.54.0.T20230817132355-3800a65]
> at org.apache.jackrabbit.oak.jcr.session.SessionContext.getOakPath(SessionContext.java:361) [org.apache.jackrabbit.oak-jcr:1.54.0.T20230817132355-3800a65]
> at org.apache.jackrabbit.oak.jcr.session.SessionContext.getOakPathOrThrowNotFound(SessionContext.java:398) [org.apache.jackrabbit.oak-jcr:1.54.0.T20230817132355-3800a65]
> at org.apache.jackrabbit.oak.jcr.session.ItemImpl.getOakPathOrThrowNotFound(ItemImpl.java:333) [org.apache.jackrabbit.oak-jcr:1.54.0.T20230817132355-3800a65]
> at org.apache.jackrabbit.oak.jcr.session.NodeImpl.getNodeOrNull(NodeImpl.java:1681) [org.apache.jackrabbit.oak-jcr:1.54.0.T20230817132355-3800a65]
> at org.apache.sling.jcr.resource.internal.NodeUtil.getNodeOrNull(NodeUtil.java:136) [org.apache.sling.jcr.resource:3.2.4]
> at org.apache.sling.jcr.resource.internal.helper.jcr.JcrItemResourceFactory.getSubitem(JcrItemResourceFactory.java:152) [org.apache.sling.jcr.resource:3.2.4]
> at org.apache.sling.jcr.resource.internal.helper.jcr.JcrItemResourceFactory.getItem(JcrItemResourceFactory.java:117) [org.apache.sling.jcr.resource:3.2.4]
> at org.apache.sling.jcr.resource.internal.helper.jcr.JcrItemResourceFactory.createResource(JcrItemResourceFactory.java:84) [org.apache.sling.jcr.resource:3.2.4]
> at org.apache.sling.jcr.resource.internal.helper.jcr.JcrResourceProvider.getResource(JcrResourceProvider.java:342) [org.apache.sling.jcr.resource:3.2.4]
> at org.apache.sling.resourceresolver.impl.providers.stateful.AuthenticatedResourceProvider.getResource(AuthenticatedResourceProvider.java:154) [org.apache.sling.resourceresolver:1.10.1.SNAPSHOT]
> {noformat}
> This exception should be caught within Oak and be treated as "this item does not exist", as higher layers (Sling here) cannot handle this exception well.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)