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

Bertrand Delacretaz resolved SLING-396.
---------------------------------------

    Resolution: Fixed

Patch applied in revision 652267

> 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