<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">
<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>
                                <td>
                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="https://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>
                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px; -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
How to use reportsevice.xml in place of reportds.xml
</h3>
<span style="margin-bottom: 10px;">
created by <a href="https://community.jboss.org/people/venu7239">venu gopal</a> in <i>JBoss Tools</i> - <a href="https://community.jboss.org/message/782540#782540">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">
<div class="jive-rendered-content"><p>Hi i am using Jboss as 4.3 server ,up to now i am using ds.xml to connect my DB where i mention database connection details,it is working fine</p><p>but i want to use service.xml to connect with DB ,but i am not able to connect DB ,i am getting the following exceptions.i have no idea where to change JBoss server to look my service.xml for DB connections</p><p>This is my reportds.xml</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><?xml version="1.0" encoding="UTF-8"?></p><p><!DOCTYPE datasources</p><p>    PUBLIC "-//JBoss//DTD JBOSS JCA Config 1.5//EN"</p><p><span>    "</span><a class="jive-link-external-small" href="http://www.jboss.org/j2ee/dtd/jboss-ds_1_5.dtd" target="_blank">http://www.jboss.org/j2ee/dtd/jboss-ds_1_5.dtd</a><span>"></span></p><p><datasources></p><p>     <local-tx-datasource></p><p>      <jndi-name>mobeereportDatasource</jndi-name></p><p>      <connection-url>jdbc:oracle:thin:@localhost:1521:mobee</connection-url></p><p>      <driver-class>oracle.jdbc.driver.OracleDriver</driver-class></p><p>      <user-name>reportuser</user-name></p><p>      <password>reportpasswd</password></p><p>   </local-tx-datasource></p><p> </datasources></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>This is the reportservice.xml which now i want use</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><?xml version="1.0" encoding="UTF-8"?> </p><p><!DOCTYPE server> </p><p><server> </p><p><mbean code="com.mchange.v2.c3p0.jboss.C3P0PooledDataSource" name="jboss:service=C3P0PooledDataSource"> </p><p><attribute name="JndiName">java:mobeereportDatasource</attribute> </p><p><attribute name="JdbcUrl">jdbc:oracle:thin:@localhost:1521:mobee</attribute> </p><p><attribute name="DriverClass">oracle.jdbc.driver.OracleDriver</attribute> </p><p><attribute name="User">reportuser</attribute></p><p><attribute name="Password">reportpasswd</attribute> </p><p><attribute name="MinPoolSize">0</attribute></p><p><attribute name="MaxPoolSize">10</attribute></p><p><attribute name="AcquireIncrement">3</attribute></p><p><depends>jboss:service=Naming</depends> </p><p></mbean> </p><p></server></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>This is the stacktrace:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Caused by: org.quartz.JobPersistenceException: Failed to obtain DB connection from data source 'springNonTxDataSource.ReportScheduler': java.sql.SQLException: Connections could not be acquired from the underlying database! [See nested exception: java.sql.SQLException: Connections could not be acquired from the underlying database!]</p><p>    at org.quartz.impl.jdbcjobstore.JobStoreCMT.getNonManagedTXConnection(JobStoreCMT.java:167)</p><p>    at org.quartz.impl.jdbcjobstore.JobStoreSupport.executeInNonManagedTXLock(JobStoreSupport.java:3652)</p><p>    at org.quartz.impl.jdbcjobstore.JobStoreSupport.executeInNonManagedTXLock(JobStoreSupport.java:3624)</p><p>    at org.quartz.impl.jdbcjobstore.JobStoreSupport.cleanVolatileTriggerAndJobs(JobStoreSupport.java:693)</p><p>    at org.quartz.impl.jdbcjobstore.JobStoreSupport.initialize(JobStoreSupport.java:555)</p><p>    ... 181 more</p><p>Caused by: java.sql.SQLException: Connections could not be acquired from the underlying database!</p><p>    at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:104)</p><p>    at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:236)</p><p>    at com.mchange.v2.c3p0.PoolBackedDataSource.getConnection(PoolBackedDataSource.java:94)</p><p>    at com.mchange.v2.c3p0.ComboPooledDataSource.getConnection(ComboPooledDataSource.java:521)</p><p>    at org.springframework.scheduling.quartz.LocalDataSourceJobStore$2.getConnection(LocalDataSourceJobStore.java:125)</p><p>    at org.quartz.utils.DBConnectionManager.getConnection(DBConnectionManager.java:112)</p><p>    at org.quartz.impl.jdbcjobstore.JobStoreCMT.getNonManagedTXConnection(JobStoreCMT.java:164)</p><p>    ... 185 more</p><p>Caused by: com.mchange.v2.resourcepool.CannotAcquireResourceException: A ResourcePool could not acquire a resource from its primary factory or source.</p><p>    at com.mchange.v2.resourcepool.BasicResourcePool.awaitAcquire(BasicResourcePool.java:970)</p><p>    at com.mchange.v2.resourcepool.BasicResourcePool.checkoutResource(BasicResourcePool.java:208)</p><p>    at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:232)</p><p>    ... 190 more</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Can anyone please help me where and which file i have to change in Jboss server.</p><p>thanks in advance</p><p>venu</p></div>
<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
<p style="margin: 0;">Reply to this message by <a href="https://community.jboss.org/message/782540#782540">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in JBoss Tools at <a href="https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2128">Community</a></p>
</div></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>