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:[email protected]] Sent: Thursday, November 12, 2009 7:14 PM To: [email protected] 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
