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

Robert Munteanu commented on SLING-5463:
----------------------------------------

For the record, my 'fix' for continuing to test locally is

{code}diff --git 
a/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/jcr/JcrItemResourceFactory.java
 
b/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/jcr/JcrItemResourceFactory.java
index d2b7f8d..b6cea63 100644
--- 
a/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/jcr/JcrItemResourceFactory.java
+++ 
b/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/jcr/JcrItemResourceFactory.java
@@ -174,7 +174,7 @@ public class JcrItemResourceFactory {
         Item item;
         // Check first if the path is absolute. If it isn't, then we return 
null because the previous itemExists method,
         // which was replaced by this method, would have returned null as well 
(instead of throwing an exception).
-        if (path.isEmpty() || path.charAt(0) != '/') {
+        if (path.isEmpty() || path.charAt(0) != '/' || path.contains("/*")) { 
// TODO hack-just for testing
             item = null;
         }
         // Use fast getItemOrNull if session is a JackrabbitSession
{code}

But we definitely need something else, this extra check does not really belong 
here.

> GetStarTest fails with "Invalid name or path"
> ---------------------------------------------
>
>                 Key: SLING-5463
>                 URL: https://issues.apache.org/jira/browse/SLING-5463
>             Project: Sling
>          Issue Type: Bug
>          Components: Testing
>            Reporter: Bertrand Delacretaz
>            Assignee: Robert Munteanu
>            Priority: Minor
>              Labels: sling-IT
>
> The GetStarTest from launchpad/integration-tests recently started failing, 
> for example at [1]:
> {code}
> javax.jcr.RepositoryException: Invalid name or path: 
> /GetStarTest1453972215267/* 
>  at 
> org.apache.jackrabbit.oak.jcr.session.SessionContext.getOakPathOrThrow(SessionContext.java:347)
> ...
>  at 
> org.apache.jackrabbit.oak.jcr.session.SessionImpl.getItemOrNull(SessionImpl.java:225)
>  at 
> org.apache.sling.jcr.resource.internal.helper.jcr.JcrItemResourceFactory.getItemOrNull(JcrItemResourceFactory.java:182)
>  at 
> org.apache.sling.jcr.resource.internal.helper.jcr.JcrItemResourceFactory.createResource(JcrItemResourceFactory.java:96)
>  at 
> org.apache.sling.jcr.resource.internal.helper.jcr.JcrResourceProvider.listChildren(JcrResourceProvider.java:293)
>  at 
> org.apache.sling.resourceresolver.impl.providers.stateful.AuthenticatedResourceProvider.listChildren(AuthenticatedResourceProvider.java:175)
>  at 
> org.apache.sling.resourceresolver.impl.providers.stateful.CombinedResourceProvider.listChildren(CombinedResourceProvider.java:205)
>  at 
> org.apache.sling.resourceresolver.impl.ResourceResolverImpl.listChildren(ResourceResolverImpl.java:719)
>  at 
> org.apache.sling.api.resource.ResourceUtil.listChildren(ResourceUtil.java:360)
> ...
>  at 
> org.apache.sling.servlets.get.impl.helpers.JsonRendererServlet.doGet(JsonRendererServlet.java:100)
> {code}
> [1] 
> https://builds.apache.org/view/S-Z/view/Sling/job/sling-trunk-1.7/org.apache.sling$org.apache.sling.launchpad.testing/3252/testReport/junit/org.apache.sling.launchpad.webapp.integrationtest/GetStarTest/testGetStarJson/



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to