hi Digby,
the problem is, that the classloader that creates the repository uses
another jcr-1.0.jar than the classloader that looks up the repository.
make sure that the jcr-1.0.jar is located in the
$CATALINA_HOME/shared/lib. then all classloaders should use this one.
cheers, tobi
On 8/25/05, lists <[EMAIL PROTECTED]> wrote:
> Hi,
>
> Another query:
>
> I've set up Jackrabbit to run in Tomcat 5.5 and have set up the resource
> in server.xml and context.xml. All looks good. I can get the
> BindableRepository back from the context, but I can't cast it to a
> javax.jcr.Repository.
>
> The weird thing is, if I cast to an object, I can see that is is a
> BindableRepository, I can see that one of the interfaces it implements
> is Repository, i.e.
>
> InitialContext context = new InitialContext();
> Context environment = (Context) context.lookup("java:comp/env");
> Object repository = (Object) environment.lookup("jcr/repository");
> out.println(repository.getClass().getGenericInterfaces()[0]);
>
> gives "interface javax.jcr.Repository"
>
> But
>
> out.println(repository instanceof javax.jcr.Repository);
>
> gives false
>
> And the cast causes a ClassCastException. Can anyone shed any light on
> this? Is it something to do with the BindableRepository having default
> access?
>
> Many thanks,
>
> Digby
>
>
--
-----------------------------------------< [EMAIL PROTECTED] >---
Tobias Bocanegra, Day Management AG, Barfuesserplatz 6, CH - 4001 Basel
T +41 61 226 98 98, F +41 61 226 98 97
-----------------------------------------------< http://www.day.com >---