cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Wells <websyst...@gmail.com>
Subject JNDI DS under JBoss 5
Date Fri, 09 Apr 2010 04:02:10 GMT
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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message