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 <bd...@apache.org> on 2008/04/28 17:21:34 UTC
Repository classloading problem with RepositoryAccessor, any hints?
Hi,
I'm currently hunting a bug where the
org.apache.sling.jcr.base.util.RepositoryAccessor cannot cast an
object acquired via JNDI to Repository, although the object does
implement the Repository interface. That Repository object is
initialized in a different webapp than the one which runs Sling.
The javax.jcr.Repository interface is loaded via my web container's
lib directory, so in theory both webapps should see the same interface
and the cast should work.
It did work in a previous version of my app which uses Sling SVN
revision 651211, so I'm wondering if the new behavior is caused by
changes in Sling (I haven't tried going back to that version yet).
Does anyone know what might have changed in Sling to cause this problem?
-Bertrand
Re: Repository classloading problem with RepositoryAccessor, any
hints?
Posted by Carsten Ziegeler <cz...@apache.org>.
Bertrand Delacretaz wrote:
> On Mon, Apr 28, 2008 at 5:25 PM, Carsten Ziegeler <cz...@apache.org> wrote:
>
>> ... I'm not 100% sure, but I don't think that this is caused by a change in
>> Sling. It might be caused by changes in the repository implementation you
>> use? Perhaps some other classes are missing in the global class loader now?...
>
> See https://issues.apache.org/jira/browse/SLING-396, seems like this
> is indeed caused by a change in Sling. I'll have a look at what has
> changed since that worked, see SLING-396 for details.
>
Ah it might be due to my changes in the launchpad stuff by introducing
the new base module.
It might be that the jcr-client.properties file is not in WEB-INF anymore.
Carsten
--
Carsten Ziegeler
cziegeler@apache.org
Re: Repository classloading problem with RepositoryAccessor, any hints?
Posted by Bertrand Delacretaz <bd...@apache.org>.
On Mon, Apr 28, 2008 at 5:25 PM, Carsten Ziegeler <cz...@apache.org> wrote:
> ... I'm not 100% sure, but I don't think that this is caused by a change in
> Sling. It might be caused by changes in the repository implementation you
> use? Perhaps some other classes are missing in the global class loader now?...
See https://issues.apache.org/jira/browse/SLING-396, seems like this
is indeed caused by a change in Sling. I'll have a look at what has
changed since that worked, see SLING-396 for details.
-Bertrand
Re: Repository classloading problem with RepositoryAccessor, any
hints?
Posted by Carsten Ziegeler <cz...@apache.org>.
Bertrand Delacretaz wrote:
> Hi,
>
> I'm currently hunting a bug where the
> org.apache.sling.jcr.base.util.RepositoryAccessor cannot cast an
> object acquired via JNDI to Repository, although the object does
> implement the Repository interface. That Repository object is
> initialized in a different webapp than the one which runs Sling.
>
> The javax.jcr.Repository interface is loaded via my web container's
> lib directory, so in theory both webapps should see the same interface
> and the cast should work.
>
> It did work in a previous version of my app which uses Sling SVN
> revision 651211, so I'm wondering if the new behavior is caused by
> changes in Sling (I haven't tried going back to that version yet).
>
> Does anyone know what might have changed in Sling to cause this problem?
>
I'm not 100% sure, but I don't think that this is caused by a change in
Sling. It might be caused by changes in the repository implementation
you use? Perhaps some other classes are missing in the global class
loader now?
Carsten
--
Carsten Ziegeler
cziegeler@apache.org