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

Radu Cotescu commented on SLING-6740:
-------------------------------------

[~auniverseaway], the code you submitted doesn't seem to work. I always get 
this error whenever I try to access the app:
{noformat}
java.lang.IllegalStateException: Resource resolver is already closed.
        at 
org.apache.sling.resourceresolver.impl.ResourceResolverImpl.checkClosed(ResourceResolverImpl.java:162)
        at 
org.apache.sling.resourceresolver.impl.ResourceResolverImpl.adaptTo(ResourceResolverImpl.java:770)
        at 
org.apache.sling.jcr.resource.internal.scripting.JcrObjectsBindingsValuesProvider.addBindings(JcrObjectsBindingsValuesProvider.java:55)
        at 
org.apache.sling.scripting.core.impl.DefaultSlingScript.verifySlingBindings(DefaultSlingScript.java:725)
        at 
org.apache.sling.scripting.core.impl.DefaultSlingScript.call(DefaultSlingScript.java:201)
        at 
org.apache.sling.scripting.core.impl.DefaultSlingScript.eval(DefaultSlingScript.java:185)
        at 
org.apache.sling.scripting.core.impl.DefaultSlingScript.service(DefaultSlingScript.java:492)
        at 
org.apache.sling.scripting.sightly.impl.engine.extension.IncludeRuntimeExtension.includeScript(IncludeRuntimeExtension.java:107)
        at 
org.apache.sling.scripting.sightly.impl.engine.extension.IncludeRuntimeExtension.call(IncludeRuntimeExtension.java:70)
        at 
org.apache.sling.scripting.sightly.impl.engine.runtime.RenderContextImpl.call(RenderContextImpl.java:66)
        at 
apps.htlblog._public.list.SightlyJava_body.render(SightlyJava_body.java:44)
{noformat}

It might be caused by the following lines of code:
{noformat}
./src/main/java/org/apache/sling/samples/htlblog/models/Author.java:43:        
resourceResolver.close();
./src/main/java/org/apache/sling/samples/htlblog/models/Edit.java:58:        
resourceResolver.close();
./src/main/java/org/apache/sling/samples/htlblog/models/List.java:49:        
resourceResolver.close();
{noformat}

However, I don't have enough time to debug the app. Could you please check 
what's wrong?

> HTL Blog Sample
> ---------------
>
>                 Key: SLING-6740
>                 URL: https://issues.apache.org/jira/browse/SLING-6740
>             Project: Sling
>          Issue Type: Improvement
>          Components: Samples
>            Reporter: Chris Millar
>            Assignee: Radu Cotescu
>            Priority: Minor
>
> The ESP blog sample is a little long in tooth. It should either be updated or 
> replaced by an HTL blog sample.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to