<!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;">&#160;</p><p>&lt;?xml version="1.0" encoding="UTF-8"?&gt;</p><p>&lt;!DOCTYPE datasources</p><p>&#160;&#160;&#160; PUBLIC "-//JBoss//DTD JBOSS JCA Config 1.5//EN"</p><p><span>&#160;&#160;&#160; "</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>"&gt;</span></p><p>&lt;datasources&gt;</p><p>&#160;&#160;&#160;&#160; &lt;local-tx-datasource&gt;</p><p>&#160;&#160;&#160;&#160;&#160; &lt;jndi-name&gt;mobeereportDatasource&lt;/jndi-name&gt;</p><p>&#160;&#160;&#160;&#160;&#160; &lt;connection-url&gt;jdbc:oracle:thin:@localhost:1521:mobee&lt;/connection-url&gt;</p><p>&#160;&#160;&#160;&#160;&#160; &lt;driver-class&gt;oracle.jdbc.driver.OracleDriver&lt;/driver-class&gt;</p><p>&#160;&#160;&#160;&#160;&#160; &lt;user-name&gt;reportuser&lt;/user-name&gt;</p><p>&#160;&#160;&#160;&#160;&#160; &lt;password&gt;reportpasswd&lt;/password&gt;</p><p>&#160;&#160; &lt;/local-tx-datasource&gt;</p><p> &lt;/datasources&gt;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>This is the reportservice.xml which now i want use</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>&lt;?xml version="1.0" encoding="UTF-8"?&gt; </p><p>&lt;!DOCTYPE server&gt; </p><p>&lt;server&gt; </p><p>&lt;mbean code="com.mchange.v2.c3p0.jboss.C3P0PooledDataSource" name="jboss:service=C3P0PooledDataSource"&gt; </p><p>&lt;attribute name="JndiName"&gt;java:mobeereportDatasource&lt;/attribute&gt; </p><p>&lt;attribute name="JdbcUrl"&gt;jdbc:oracle:thin:@localhost:1521:mobee&lt;/attribute&gt; </p><p>&lt;attribute name="DriverClass"&gt;oracle.jdbc.driver.OracleDriver&lt;/attribute&gt; </p><p>&lt;attribute name="User"&gt;reportuser&lt;/attribute&gt;</p><p>&lt;attribute name="Password"&gt;reportpasswd&lt;/attribute&gt; </p><p>&lt;attribute name="MinPoolSize"&gt;0&lt;/attribute&gt;</p><p>&lt;attribute name="MaxPoolSize"&gt;10&lt;/attribute&gt;</p><p>&lt;attribute name="AcquireIncrement"&gt;3&lt;/attribute&gt;</p><p>&lt;depends&gt;jboss:service=Naming&lt;/depends&gt; </p><p>&lt;/mbean&gt; </p><p>&lt;/server&gt;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>This is the stacktrace:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</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>&#160;&#160;&#160; at org.quartz.impl.jdbcjobstore.JobStoreCMT.getNonManagedTXConnection(JobStoreCMT.java:167)</p><p>&#160;&#160;&#160; at org.quartz.impl.jdbcjobstore.JobStoreSupport.executeInNonManagedTXLock(JobStoreSupport.java:3652)</p><p>&#160;&#160;&#160; at org.quartz.impl.jdbcjobstore.JobStoreSupport.executeInNonManagedTXLock(JobStoreSupport.java:3624)</p><p>&#160;&#160;&#160; at org.quartz.impl.jdbcjobstore.JobStoreSupport.cleanVolatileTriggerAndJobs(JobStoreSupport.java:693)</p><p>&#160;&#160;&#160; at org.quartz.impl.jdbcjobstore.JobStoreSupport.initialize(JobStoreSupport.java:555)</p><p>&#160;&#160;&#160; ... 181 more</p><p>Caused by: java.sql.SQLException: Connections could not be acquired from the underlying database!</p><p>&#160;&#160;&#160; at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:104)</p><p>&#160;&#160;&#160; at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:236)</p><p>&#160;&#160;&#160; at com.mchange.v2.c3p0.PoolBackedDataSource.getConnection(PoolBackedDataSource.java:94)</p><p>&#160;&#160;&#160; at com.mchange.v2.c3p0.ComboPooledDataSource.getConnection(ComboPooledDataSource.java:521)</p><p>&#160;&#160;&#160; at org.springframework.scheduling.quartz.LocalDataSourceJobStore$2.getConnection(LocalDataSourceJobStore.java:125)</p><p>&#160;&#160;&#160; at org.quartz.utils.DBConnectionManager.getConnection(DBConnectionManager.java:112)</p><p>&#160;&#160;&#160; at org.quartz.impl.jdbcjobstore.JobStoreCMT.getNonManagedTXConnection(JobStoreCMT.java:164)</p><p>&#160;&#160;&#160; ... 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>&#160;&#160;&#160; at com.mchange.v2.resourcepool.BasicResourcePool.awaitAcquire(BasicResourcePool.java:970)</p><p>&#160;&#160;&#160; at com.mchange.v2.resourcepool.BasicResourcePool.checkoutResource(BasicResourcePool.java:208)</p><p>&#160;&#160;&#160; at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:232)</p><p>&#160;&#160;&#160; ... 190 more</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</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>