You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Bertrand Delacretaz (JIRA)" <ji...@apache.org> on 2013/04/09 17:02:15 UTC

[jira] [Created] (SLING-2819) NPE in ResourceResolverImpl.mangleNamespaces when attempting to map http://example.com

Bertrand Delacretaz created SLING-2819:
------------------------------------------

             Summary: NPE in ResourceResolverImpl.mangleNamespaces when attempting to map http://example.com
                 Key: SLING-2819
                 URL: https://issues.apache.org/jira/browse/SLING-2819
             Project: Sling
          Issue Type: Bug
          Components: JCR
    Affects Versions: Resource Resolver 1.0.4
            Reporter: Bertrand Delacretaz
            Assignee: Bertrand Delacretaz
            Priority: Minor


The following JSP script (used as foo.jsp in the below example) throws an NPE with the current launchpad/builder which uses org.apache.sling.resourceresolver 1.0.5.SNAPSHOT:

<%@taglib prefix="sling" uri="http://sling.apache.org/taglibs/sling/1.0"%>
<sling:defineObjects/>
<%= resource.getResourceResolver().map(request, "http://example.com") %>

Full failure scenario:

export P=8080
curl -u admin:admin -Fsling:resourceType=foo http://localhost:$P/tmp/foo
curl -u admin:admin -XMKCOL http://localhost:$P/apps/foo
curl -u admin:admin -T foo.jsp http://localhost:$P/apps/foo/foo.jsp
curl -u admin:admin http://localhost:$P/tmp/foo.html

The last request causes java.lang.NullPointerException
	at org.apache.sling.resourceresolver.impl.ResourceResolverImpl.mangleNamespaces(ResourceResolverImpl.java:969)
	at org.apache.sling.resourceresolver.impl.ResourceResolverImpl.map(ResourceResolverImpl.java:524)
	at org.apache.jsp.apps.foo.foo_jsp._jspService(foo_jsp.java:90)

 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira