It could be (i'm trying several configurations - i'm new to jackrabbit -
so...),
now I check for sure and I'll answer you asap.
Thanks a lot.
Thomas Mueller-6 wrote:
>
> Hi,
>
> As far as I know, JCARepositoryHandle implements javax.jcr.Repository.
> So casting to Repository should be possible. I'm not sure, maybe it is
> a class loader problem. This can happen if the the JCR API jar file is
> in multiple directories (for example app server class path, and
> application class path). Then there are multiple incompatible
> Repository interfaces (because they are loaded by different class
> loaders). But this is just a guess. Could you check that there is only
> one JCR API jar file?
>
> Thomas
>
> On 1/17/07, Andrea K. <[EMAIL PROTECTED]> wrote:
>>
>> Hi Thomas,
>> I tryied also with tis snippet found in an other post but the same error:
>>
>> ClientAdapterFactory adapter = new ClientAdapterFactory();
>> RemoteRepository remote = (RemoteRepository)
>> context.lookup("jcr/GlobalRepository");
>> Repository repo = adapter.getRepository(remote);
>>
>> The class i can see in my Object is:
>> org.apache.jackrabbit.jca.JCARepositoryHandle
>>
>> ...
>>
>>
>> Thomas Mueller-6 wrote:
>> >
>> > Hi,
>> >
>> > What kind of object did you get (what class)?
>> > An easy way to find out is add System.out.println(...)
>> >
>> > Thomas
>> >
>> > On 1/17/07, Andrea K. <[EMAIL PROTECTED]> wrote:
>> >>
>> >> I configured my server (OC4J) to user jca connector. The jndi name is
>> >> jcr/GlobalRepository, but when i try to bind it i get a
>> >> classcastexception
>> >> casting to Repository. Can you explain where i go wrong?
>> >>
>> >> To connect I use code like this:
>> >> ...
>> >> Repository rep=(Repository) new
>> >> InitialContext().lookup("jcr/globalRepository");
>> >> Session session=rep.login();
>> >> session.close();
>> >> ...
>> >>
>> >> Thanks.
>> >> --
>> >> View this message in context:
>> >> http://www.nabble.com/Jca-Connector-tf3028162.html#a8413232
>> >> Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
>> >>
>> >>
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Jca-Connector-tf3028162.html#a8413508
>> Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
>>
>>
>
>
--
View this message in context:
http://www.nabble.com/Jca-Connector-tf3028162.html#a8413911
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.