jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Phukan, Anit" <Anit_Phu...@intuit.com>
Subject RE: JNDI datasource config help
Date Fri, 13 Nov 2009 05:56:18 GMT
OK, I do need to specify the JDBC parameters at some location though. I
can't do it in the repository.xml. 
 Please let me know your suggestions.

Thanks
Anit

-----Original Message-----
From: Rakesh Vidyadharan [mailto:rakesh@sptci.com] 
Sent: Thursday, November 12, 2009 7:14 PM
To: users@jackrabbit.apache.org
Subject: Re: JNDI datasource config help


On 12 Nov 2009, at 6:32:07 PM, Phukan, Anit wrote:

> Thanks Rakesh,
> 
> You are right about jboss having issues with "java:comp/env" prefix
> while accessing the jndi resource. 
> 
> After resolving that I get a different exception:
> 
> Caused by: java.lang.ClassCastException:
> org.jboss.resource.adapter.jdbc.WrapperDataSource cannot be cast to
> javax.jcr.Repository
> 
> 
> This is how I have configured the datasource in my property file from
> where the resource is being read:
> 
> <local-tx-datasource>
>    <jndi-name>PsEdiObjectStoreDS</jndi-name>
> 
>
<connection-url>jdbc:jtds:sqlserver://dev4sql1.qhg.local:1433/ObjStore</
> connection-url>
>    <driver-class>net.sourceforge.jtds.jdbc.Driver</driver-class>
>    <user-name>qhg_obs_user</user-name>
>    <password>obs_user_pass</password>
>  </local-tx-datasource> 

This is a pure JDBC configuration, hence the error.  You should be
trying to get a reference to your repository configuration, not the JDBC
connection.

Rakesh

Mime
View raw message