0

I'm migrating some projects from JBoss 6.4 to JBoss 7.2, these projects needs different datasources to configurate DB connections. I added the datasources to the JBoss server config file (standalone.xml):

<datasources>
    <datasource jndi-name="java:jboss/datasources/ExampleDS" pool-name="ExampleDS" enabled="true" use-java-context="true">
        <connection-url>jdbc:h2:mem:test;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE</connection-url>
        <driver>h2</driver>
        <security>
            <user-name>sa</user-name>
            <password>sa</password>
        </security>
    </datasource>
    <datasource jndi-name="java:/jdbc/SCL" pool-name="SCL" enabled="true">
        <connection-url>jdbc:oracle:thin:@someIP:somePort:RCBDDES</connection-url>
        <driver>oracle</driver>
        <pool>
            <min-pool-size>1</min-pool-size>
            <max-pool-size>5</max-pool-size>
            <prefill>true</prefill>
        </pool>
        <security>
            <user-name>user</user-name>
            <password>pass</password>
        </security>
    </datasource>
    <datasource jta="true" jndi-name="java:/jdbc/Oracle" pool-name="jdbc/dsOracle" enabled="true" use-ccm="true" statistics-enabled="false">
        <connection-url>jdbc:oracle:thin:@someIP:somePort:RCBDDES</connection-url>
        <driver-class>oracle.jdbc.OracleDriver</driver-class>
        <driver>oracle</driver>
        <pool>
            <min-pool-size>25</min-pool-size>
            <max-pool-size>35</max-pool-size>
            <prefill>true</prefill>
        </pool>
        <security>
            <user-name>user</user-name>
            <password>pass</password>
        </security>
        <validation>
            <check-valid-connection-sql>SELECT 1 FROM DUAL</check-valid-connection-sql>
            <validate-on-match>false</validate-on-match>
            <background-validation>true</background-validation>
            <exception-sorter class-name="org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter"/>
        </validation>
        <timeout>
            <set-tx-query-timeout>false</set-tx-query-timeout>
            <blocking-timeout-millis>6000</blocking-timeout-millis>
            <idle-timeout-minutes>1</idle-timeout-minutes>
            <query-timeout>60</query-timeout>
            <use-try-lock>0</use-try-lock>
            <allocation-retry>0</allocation-retry>
            <allocation-retry-wait-millis>0</allocation-retry-wait-millis>
        </timeout>
        <statement>
            <track-statements>true</track-statements>
            <prepared-statement-cache-size>100</prepared-statement-cache-size>
            <share-prepared-statements>false</share-prepared-statements>
        </statement>
    </datasource>
    <datasource jta="true" jndi-name="java:/jdbc/dsSQLServer" pool-name="jdbc/dsSQLServer" enabled="true" use-ccm="true">
        <connection-url>jdbc:sqlserver://someIP:somePort;DatabaseName=name</connection-url>
        <driver-class>com.microsoft.sqlserver.jdbc.SQLServerDriver</driver-class>
        <driver>sqlserver</driver>
        <pool>
            <min-pool-size>25</min-pool-size>
            <max-pool-size>35</max-pool-size>
        </pool>
        <security>
            <user-name>user</user-name>
            <password>pass</password>
        </security>
        <timeout>
            <idle-timeout-minutes>1</idle-timeout-minutes>
        </timeout>
        <statement>
            <track-statements>true</track-statements>
            <prepared-statement-cache-size>100</prepared-statement-cache-size>
            <share-prepared-statements>false</share-prepared-statements>
        </statement>
    </datasource>
    <datasource jta="true" jndi-name="java:/jdbc/dsSQLServerHH" pool-name="jdbc/dsSQLServerHH" enabled="true" use-ccm="true">
        <connection-url>jdbc:sqlserver://someIP:somePort;DatabaseName=name</connection-url>
        <driver-class>com.microsoft.sqlserver.jdbc.SQLServerDriver</driver-class>
        <driver>sqlserver</driver>
        <pool>
            <min-pool-size>25</min-pool-size>
            <max-pool-size>35</max-pool-size>
        </pool>
        <security>
            <user-name>user</user-name>
            <password>pass</password>
        </security>
        <timeout>
            <idle-timeout-minutes>1</idle-timeout-minutes>
        </timeout>
        <statement>
            <track-statements>true</track-statements>
            <prepared-statement-cache-size>100</prepared-statement-cache-size>
            <share-prepared-statements>false</share-prepared-statements>
        </statement>
    </datasource>
    <drivers>
        <driver name="h2" module="com.h2database.h2">
            <xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>
        </driver>
        <driver name="oracle" module="oracle.jdbc">
            <driver-class>oracle.jdbc.OracleDriver</driver-class>
        </driver>
        <driver name="sqlserver" module="com.microsoft">
            <driver-class>com.microsoft.sqlserver.jdbc.SQLServerDriver</driver-class>
        </driver>
    </drivers>
</datasources>

The server starts without problems and I can execute store procedures used in the project, but I'm receiving constantly the following warning in the server console [ORA-12519] (even without making a request, only starting the server):

[#2020-05-21 17:25:12,983 WARN  [org.jboss.jca.core.connectionmanager.pool.strategy.OnePool] (JCA PoolFiller) IJ000610: Unable to fill pool: java:/jdbc/Oracle: javax.resource.ResourceException: IJ031084: Unable to create connection
    at org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory.createLocalManagedConnection(LocalManagedConnectionFactory.java:345)
    at org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory.getLocalManagedConnection(LocalManagedConnectionFactory.java:352)
    at org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:287)
    at org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreConcurrentLinkedDequeManagedConnectionPool.createConnectionEventListener(SemaphoreConcurrentLinkedDequeManagedConnectionPool.java:1326) [ironjacamar-core-impl-1.4.11.Final-redhat-00001.jar:1.4.11.Final-redhat-00001]
    at org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreConcurrentLinkedDequeManagedConnectionPool.fillTo(SemaphoreConcurrentLinkedDequeManagedConnectionPool.java:1138) [ironjacamar-core-impl-1.4.11.Final-redhat-00001.jar:1.4.11.Final-redhat-00001]
    at org.jboss.jca.core.connectionmanager.pool.mcp.PoolFiller.run(PoolFiller.java:97) [ironjacamar-core-impl-1.4.11.Final-redhat-00001.jar:1.4.11.Final-redhat-00001]
    at java.lang.Thread.run(Thread.java:748) [rt.jar:1.8.0_191]
Caused by: java.sql.SQLException: Listener refused the connection with the following error:
ORA-12519, TNS:no appropriate service handler found

    at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:419)
    at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:536)
    at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:228)
    at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
    at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:521)
    at org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory.createLocalManagedConnection(LocalManagedConnectionFactory.java:321)
    ... 6 more
Caused by: oracle.net.ns.NetException: Listener refused the connection with the following error:
ORA-12519, TNS:no appropriate service handler found

    at oracle.net.ns.NSProtocol.connect(NSProtocol.java:386)
    at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:1054)
    at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:308)
    ... 11 more
#]

Can someone give me and advice?

4

1 回答 1

0

很明显是监听器不接受连接造成的,能不能通过sqlplus连接你的数据库?此外,您可以在默认情况下浏览 Jboss 管理控制台/localhost:9990/,然后单击测试连接按钮来检查您的配置。可能你的数据库客户端版本和数据库版本不兼容。您可能有连接泄漏,这意味着相应数据源或数据库的池大小没有空间。并查看此链接http://www.dba-oracle.com/sf_ora_12519_tns_no_appropriate_service_handler_found.htm

于 2020-05-22T04:17:24.250 回答