sling-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Munteanu (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SLING-7483) Performance: JackrabbitSession#getItemOrNull still leads to Exception
Date Fri, 09 Feb 2018 10:57:02 GMT

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

Robert Munteanu commented on SLING-7483:
----------------------------------------

[~Tobias Barth] - by looking at the code from Oak I think this is thrown due to an invalid
path, not a non-existing one. Can you intercept the error and add it to this ticket?

> Performance: JackrabbitSession#getItemOrNull still leads to Exception
> ---------------------------------------------------------------------
>
>                 Key: SLING-7483
>                 URL: https://issues.apache.org/jira/browse/SLING-7483
>             Project: Sling
>          Issue Type: Improvement
>          Components: JCR, ResourceResolver
>    Affects Versions: Resource Resolver 1.4.16
>         Environment: Windows 7 64 bit, Java 1.8.131
>            Reporter: Tobias Barth
>            Priority: Major
>
> In SLING-4585, it was planned to make use of the method "JackrabbitSession#getItemOrNull",
so that no Exception is thrown when a non existing Resource is looked up. Now, With Sling
Resource Resolver 1.4.16 and Jackrabbit OAK 1.4.13, I get the following stacktrace:
> {noformat}
> at java.lang.Throwable.fillInStackTrace(Native Method)
> at java.lang.Throwable.fillInStackTrace(Throwable.java:783)
> - locked <0x7ce7422f> (a javax.jcr.RepositoryException)
> at java.lang.Throwable.<init>(Throwable.java:265)
> at java.lang.Exception.<init>(Exception.java:66)
> at javax.jcr.RepositoryException.<init>(RepositoryException.java:28)
> at org.apache.jackrabbit.oak.jcr.session.SessionContext.getOakPathOrThrow(SessionContext.java:359)
> at org.apache.jackrabbit.oak.jcr.session.SessionImpl.getOakPathOrThrow(SessionImpl.java:149)
> at org.apache.jackrabbit.oak.jcr.session.SessionImpl.access$100(SessionImpl.java:81)
> at org.apache.jackrabbit.oak.jcr.session.SessionImpl$3.performNullable(SessionImpl.java:228)
> at org.apache.jackrabbit.oak.jcr.session.SessionImpl$3.performNullable(SessionImpl.java:225)
> at org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate.performNullable(SessionDelegate.java:243)
> at org.apache.jackrabbit.oak.jcr.session.SessionImpl.getItemOrNull(SessionImpl.java:225)
> at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at org.apache.sling.jcr.base.SessionProxyHandler$SessionProxyInvocationHandler.invoke(SessionProxyHandler.java:116)
> at com.sun.proxy.$Proxy7.getItemOrNull(Unknown Source)
> at org.apache.sling.jcr.resource.internal.helper.jcr.JcrItemResourceFactory.getItemOrNull(JcrItemResourceFactory.java:184)
> at org.apache.sling.jcr.resource.internal.helper.jcr.JcrItemResourceFactory.createResource(JcrItemResourceFactory.java:96)
> at org.apache.sling.jcr.resource.internal.helper.jcr.JcrResourceProvider.getResource(JcrResourceProvider.java:283)
> at org.apache.sling.resourceresolver.impl.providers.stateful.AuthenticatedResourceProvider.getResource(AuthenticatedResourceProvider.java:135)
> at org.apache.sling.resourceresolver.impl.helper.ResourceResolverControl.getResource(ResourceResolverControl.java:218)
> at org.apache.sling.resourceresolver.impl.ResourceResolverImpl.getAbsoluteResourceInternal(ResourceResolverImpl.java:1067)
> at org.apache.sling.resourceresolver.impl.ResourceResolverImpl.resolveInternal(ResourceResolverImpl.java:899)
> at org.apache.sling.resourceresolver.impl.ResourceResolverImpl.resolveInternal(ResourceResolverImpl.java:371)
> at org.apache.sling.resourceresolver.impl.ResourceResolverImpl.resolve(ResourceResolverImpl.java:267){noformat}
> Seems like the JCR implementation still throws Exceptions on non existing paths. What
is going wrong there?



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message