[ 
https://issues.apache.org/jira/browse/SLING-396?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Bertrand Delacretaz updated SLING-396:
--------------------------------------

    Attachment: SLING-396.patch

The cause was a missing jcr-client.properties in the launchpad war file, that 
file has moved to

  jcrapp/target/classes/WEB-INF/jcr-client.properties

and needs to be copied under WEB-INF for the bootdelegation to work: that file 
defines classes (including the jcr Repository interface) that must be loaded 
from the boot classloader, and it was missing.

Will apply the patch as soon as svn is writeable again

> RepositoryAccessor cannot cast to Repository anymore
> ----------------------------------------------------
>
>                 Key: SLING-396
>                 URL: https://issues.apache.org/jira/browse/SLING-396
>             Project: Sling
>          Issue Type: Bug
>          Components: Repository
>            Reporter: Bertrand Delacretaz
>         Attachments: SLING-396.patch
>
>
> My custom Sling webaapp gets a Repository via JNDI from another webapp, and 
> up to Sling revision 651211 that works fine - I have added jcr.jar to the 
> global libraries of my web container, so that both webapps get the same 
> Repository interface definition and the cast works.
> If I rebuild my app against the current Sling revision 652071, and load the 
> resulting webapp in my web container without changing anything else (without 
> even restarting the web container), the cast of repoObject to Repository in 
> RepositoryAccessor.getRepository() fails:
>   Object repoObject = initialContext.lookup(repositoryName);
>   if (repoObject instanceof Repository) {
> As repoObject is the same in both cases, this seems to be caused by a Sling 
> change that causes the Repository interface to come from a different 
> ClassLoader than before.

-- 
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