Hi Patrick, Thanks for your response. My mistake actually, while going to edit the file I realsied it was no longer in the folder...I had a number of -ds.xml files and had actually failed to copy that particular one. The next error was "org.jboss.resource.JBossResourceException: Apparently wrong driver class specified for URL:" which was fixed by copying the correct JDBC driver to "server\default\lib". All fixed...thanks.
Cheers, Steve On 9 April 2010 14:45, <[email protected]> wrote: > Hi Steve, > try adding > <use-java-context>false</use-java-context> > to the *-ds.xml file. > Regards, > Patrick > > > > > Steve Wells <[email protected]> > 09.04.2010 06:02 > Bitte antworten an > [email protected] > > > An > [email protected] > Kopie > > Thema > JNDI DS under JBoss 5 > > > > > > > Hi, > > I am wondering if anyone has successfully setup JNDI Datasource under > JBoss > 5.1.0 with Cayenne 3.0RC2. Under tomcat it is very simple but JBoss is > continuing to give me trouble. > > Error: > org.apache.cayenne.ConfigurationException: [v.3.0RC2 Feb 03 2010 13:38:54] > Error during Configuration initialization. [v > .3.0RC2 Feb 03 2010 13:38:54] Load failures. Main configuration class: > org.apache.cayenne.conf.DefaultConfiguration, det > ails: > domain.node.name=BREDomainNode, > domain.node.datasource=jdbc/BREDomain, reason: DataSource load failed - > jdbc > not > bound > at > > org.apache.cayenne.conf.Configuration.initializeSharedConfiguration(Configuration.java:168) > at > > org.apache.cayenne.conf.ServletUtil.initializeSharedConfiguration(ServletUtil.java:83) > at > > org.apache.click.extras.cayenne.DataContextFilter.init(DataContextFilter.java:224) > at > > org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:234) > at > > org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:332) > at > > org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:90) > at > > org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3783) > at > org.apache.catalina.core.StandardContext.start(StandardContext.java:4413) > at > > org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:310) > at > > org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:142) > at > > org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:461) > at > org.jboss.web.deployers.WebModule.startModule(WebModule.java:118) > > Config: > Cayenne modeller jar is under WEB-INF/lib (excluding openmvc and jgoodies) > > Using cayenne modeller select JNDIDataSourceFactory and set location to > "jdbc/BREDomain" > > web.xml: > <resource-ref> > <res-ref-name>jdbc/BREDomain</res-ref-name> > <res-type>javax.sql.DataSource</res-type> > <res-auth>Container</res-auth> > </resource-ref> > > jboss-web.xml: > <jboss-web> > <resource-ref> > <res-ref-name>jdbc/BREDomain</res-ref-name> > <res-type>javax.sql.DataSource</res-type> > <jndi-name>java:/BREDomain</jndi-name> > </resource-ref> > > Under ${jboss-home}\server\default\deploy create a *-ds.xml file: > <datasources> > <local-tx-datasource> > <jndi-name>BREDomain</jndi-name> > <connection-url>jdbc:jtds:sqlserver://xxxxxxxxxx</connection-url> > <driver-class>net.sourceforge.jtds.jdbc.Driver</driver-class> > <user-name>jboss</user-name> > <password>xxxxxxxxx</password> > </local-tx-datasource> > </datasources> > > Thanks, > > Steve > >
