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

Ian Boston commented on SLING-1181:
-----------------------------------

When Install the bundle it does not install the file. 
(http://localhost:8080/apps.tidy.5.json does not show any trace of the Servlet)

When I upload the esp file using webdav, it is reported by the resolver, eg
curl -XMKCOL http://admin:ad...@localhost:8080/apps/testtype
cat << EOF > sel.esp
This is the node at <%=currentNode.path%>
EOF
curl -F"[email protected];type=text/plain" 
http://admin:ad...@localhost:8080/apps/testtype
curl http://localhost:8080/apps/testtype.tidy.2.json
curl -Fsling:resourceType=testtype http://admin:ad...@localhost:8080/testnode
curl http://localhost:8080/testnode.json
curl http://localhost:8080/testnode.sel
curl http://localhost:8080/testnode.sel.html


The last 3 lines give 
</html>x43543-2:tmp ieb$ curl http://localhost:8080/testnode.json
{"sling:resourceType":"testtype","jcr:primaryType":"nt:unstructured"}x43543-2:tmp
 ieb$ 
x43543-2:tmp ieb$ curl http://localhost:8080/testnode.sel
This is the node at /testnode
x43543-2:tmp ieb$ curl http://localhost:8080/testnode.sel.html
This is the node at /testnode
x43543-2:tmp ieb$ 


So, AFAICT, the resolution of Servlets under apps is working correctly,

What does not appear to be working is the loading of content, so a

mvn clean install
mvn org.apache.sling:maven-sling-plugin:install

generates 

11.11.2009 14:50:06.319 *INFO* [FelixDispatchQueue] 
org.apache.sling.bundleresource.impl Service [Provider of bundle based 
resources,94] ServiceEvent UNREGISTERING
11.11.2009 14:50:06.321 *INFO* [FelixDispatchQueue] 
SlingBundleResourceTestBundle BundleEvent STOPPED
11.11.2009 14:50:06.321 *INFO* [FelixDispatchQueue] 
SlingBundleResourceTestBundle BundleEvent UNRESOLVED
11.11.2009 14:50:06.321 *INFO* [FelixDispatchQueue] 
SlingBundleResourceTestBundle BundleEvent UPDATED
11.11.2009 14:50:06.321 *INFO* [FelixDispatchQueue] org.apache.felix.framework 
FrameworkEvent PACKAGES REFRESHED
11.11.2009 14:50:06.321 *INFO* [FelixDispatchQueue] 
SlingBundleResourceTestBundle BundleEvent RESOLVED
11.11.2009 14:50:06.325 *INFO* [FelixDispatchQueue] 
org.apache.sling.bundleresource.impl Service [Provider of bundle based 
resources,95] ServiceEvent REGISTERED
11.11.2009 14:50:06.325 *INFO* [FelixDispatchQueue] 
SlingBundleResourceTestBundle BundleEvent STARTED
11.11.2009 14:50:08.326 *INFO* [FelixDispatchQueue] 
org.apache.sling.bundleresource.impl Service [Provider of bundle based 
resources,95] ServiceEvent UNREGISTERING
11.11.2009 14:50:08.326 *INFO* [FelixDispatchQueue] 
SlingBundleResourceTestBundle BundleEvent STOPPED
11.11.2009 14:50:08.326 *INFO* [FelixDispatchQueue] 
SlingBundleResourceTestBundle BundleEvent RESOLVED
11.11.2009 14:50:08.329 *INFO* [FelixDispatchQueue] 
org.apache.sling.bundleresource.impl Service [Provider of bundle based 
resources,96] ServiceEvent REGISTERED
11.11.2009 14:50:08.329 *INFO* [FelixDispatchQueue] 
SlingBundleResourceTestBundle BundleEvent STARTED
11.11.2009 14:50:08.330 *INFO* [FelixDispatchQueue] org.apache.felix.framework 
FrameworkEvent PACKAGES REFRESHED


Indicating that the bundle content didnt get installed.

I will investigate further.

> Scripts loaded by Bundle Resource Provider are not found in script resolution
> -----------------------------------------------------------------------------
>
>                 Key: SLING-1181
>                 URL: https://issues.apache.org/jira/browse/SLING-1181
>             Project: Sling
>          Issue Type: Bug
>            Reporter: Vidar S. Ramdal
>            Assignee: Ian Boston
>            Priority: Critical
>         Attachments: SLING-1181-test-bundle-source-and-jar.zip
>
>
> When a script file is loaded as a bundle resource (using 
> Sling-Bundle-Resources directive), it is not picked up during script 
> resolution.
> The bundle resource IS listed at /system/console/bundleresources, and the 
> script source is available at its URL under /apps.
> I can reproduce this problem using the latest trunk build (rev #834413), but 
> not in builds prior to rev#825679. I will try to narrow it down, to find the 
> actual change causing this.
> To reproduce:
> 1. Run a fresh Sling build
> 2. Upload a bundle with a 
> <Sling-Bundle-Resources>/apps</Sling-Bundle-Resources> directive, containing 
> a file at /apps/someResourceType/bundleresource.esp. The script file could 
> contain the code:
>     "BundleResource script, <%=currentNode.path%>"
> 3. Using WebDAV, create a script at /apps/someResourceType/webdav.esp. The 
> script file could contain the code:
>    "WebDAV-uploaded script, <%=currentNode.path%>"
> 4. Create a node /test, with sling:resourceType=someResourceType
> 5. Browse to http://localhost:8080/apps/someResourceType/bundleresource.esp, 
> and assert that the source code of the script file is displayed
> 6. Browse to http://localhost:8080/system/console/bundleresources, and assert 
> that the /apps resource is listed
> 7. Browse to http://localhost:8080/test.webdav, and assert that the 
> WebDAV-uploaded script is used to render the node (displaying 
> "WebDAV-uploaded script, /test")
> 8. Browse to http://localhost:8080/test.bundleresource
> Expected result:
> - The bundleresource-provided script is used to render the node, displaying 
> "BundleResource script, /test"
> Actual result:
> - 403 Forbidden

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to