getting Error while set up the connection pool in jboss
Posted
by Yashwant Chavan
on Stack Overflow
See other posts from Stack Overflow
or by Yashwant Chavan
Published on 2010-03-19T06:53:08Z
Indexed on
2010/03/20
10:01 UTC
Read the original article
Hit count: 440
jboss
|connection-pooling
Hi as per following Connection pool configuration facing some issue.
Place a copy of
mysql-connector-java-[version]-bin.jar
in$JBOSS_HOME/server/all/lib
. Then, follow the example configuration file namedmysql-ds.xml
in the$JBOSS_HOME/docs/examples/jca
directory that comes with a JBoss binary installation. To activate your DataSource, place an xml file that follows the format ofmysql-ds.xml
in the deploy subdirectory in either$JBOSS_HOME/server/all
,$JBOSS_HOME/server/default
, or$JBOSS_HOME/server/[yourconfig]
as appropriate.
I am getting following error
resource-ref: jdbc/buinessCaliberDb has no valid JNDI binding. Check the jboss-web/resource-ref.
This is my mysql-ds.xml
<datasources>
<local-tx-datasource>
<jndi-name>jdbc/buinessCaliberDb</jndi-name>
<connection-url>jdbc:mysql:///BUSINESS</connection-url>
<driver-class>com.mysql.jdbc.Driver</driver-class>
<user-name>root</user-name>
<password>password</password>
<exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter</exception-sorter-class-name>
<!-- should only be used on drivers after 3.22.1 with "ping" support
<valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLValidConnectionChecker</valid-connection-checker-class-name>
-->
<!-- sql to call when connection is created
<new-connection-sql>some arbitrary sql</new-connection-sql>
-->
<!-- sql to call on an existing pooled connection when it is obtained from pool - MySQLValidConnectionChecker is preferred for newer drivers
<check-valid-connection-sql>some arbitrary sql</check-valid-connection-sql>
-->
<!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
<metadata>
<type-mapping>mySQL</type-mapping>
</metadata>
</local-tx-datasource>
</datasources>
and this my web.xml entry
<resource-ref>
<description>DB Connection</description>
<res-ref-name>jdbc/buinessCaliberDb</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
and this jboss-web.xml entry
<jboss-web>
<resource-ref>
<description>DB Connection</description>
<res-ref-name>jdbc/buinessCaliberDb</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
</jboss-web>
Please help
© Stack Overflow or respective owner