[jboss-dev-forums] [JBoss AS 7 Development] - Datasource configuration from Tomcat
Julien Pardons
do-not-reply at jboss.com
Mon Sep 17 05:39:28 EDT 2012
Julien Pardons [https://community.jboss.org/people/jpardons] created the discussion
"Datasource configuration from Tomcat"
To view the discussion, visit: https://community.jboss.org/message/759834#759834
--------------------------------------------------------------
Hello,
I'm importing .war package in JBoss 7 and I have some problem with the JNDI Name.
In Tomcat, I have this configuration:
<Resource
name="jdbc/EPCISDB"
type="javax.sql.DataSource"
auth="Container"
username="epcis"
password="******"
driverClassName="com.mysql.jdbc.Driver"
defaultAutoCommit="false"
url="jdbc:mysql://localhost:3306/epcis?autoReconnect=true">
</Resource>
I tried a lot of solution, but I still get an error on the deployment:
{"Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"Services with missing/unavailable dependencies" => ["jboss.naming.context.java.module.\"epcis-repository-0.5.1-SNAPSHOT\".\"epcis-repository-0.5.1-SNAPSHOT\".env.jdbc.EPCISDB missing [ jboss.naming.context.java.jboss.resources.jdbc.EPCISDB ]"]}}}
<datasource jndi-name="java:jboss/datasources/env/jdbc/EPCISDB" pool-name="comp/env/jdbc/EPCISDB" enabled="true" jta="true" use-java-context="true" use-ccm="true">
<connection-url>
jdbc:mysql://localhost:3306/epcis?autoReconnect=true
</connection-url>
<driver>
mysql
</driver>
<security>
<user-name>
epcis
</user-name>
<password>
******
</password>
</security>
</datasource>
I have tries this name:
java:jboss/datasources/env/jdbc/EPCISDB
java:jboss/datasources/comp/env/jdbc/EPCISDB
java:jboss/datasources/jdbc/EPCISDB
I the config file, I found many different name too:
# the name of the JNDI datasource holding the connection to the database
jndi.datasource.name=java:comp/env/jdbc/EPCISDB
<property name="jndiName" value="jdbc/EPCISDB" />
<resource-ref>
<res-ref-name>jdbc/EPCISDB</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
Somebody got a solution for me ?
Thanks !
Julien
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/759834#759834]
Start a new discussion in JBoss AS 7 Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2225]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-dev-forums/attachments/20120917/11a91d60/attachment.html
More information about the jboss-dev-forums
mailing list