JBOSS错误尝试获取新连接时可抛出:null Io异常:连接重置

时间:2012-05-26 00:10:21

标签: oracle jboss5.x java-6

jboss工作一周后,它崩溃,发送下一个异常: 软件jboss5.0 jdk1.6 ojdbc14.jar

    WARN [JBossManagedConnectionPool] Throwable while attempting to get a new connection: null
    org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (java.sql.SQLException: Io exception: Connection reset)
    at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.getLocalManagedConnection(LocalManagedConnectionFactory.java:225)
    at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:195)
    at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.createConnectionEventListener(InternalManagedConnectionPool.java:633)
    at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:267)
    at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.java:622)
    at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:404)
    at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:381)
    at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:496)
    at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:941)
    at org.jboss.resource.adapter.jdbc
.WrapperDataSource.getConnection(WrapperDataSource.java:89)
    at com.genexus.db.driver.GXConnection.connectJDBCDataSource(Unknown Source)
........   
    Caused by: java.sql.SQLException: Io exception: Connection reset
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:255)
    at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:387)
    at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:420)
    at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:165)
    at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:35)
    at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:801)
    at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.getLocalManagedConnection(LocalManagedConnectionFactory.java:207)
    ... 58 more

2 个答案:

答案 0 :(得分:1)

目前运行SAS 9.3和Oracle 11.2.0.2,获得与NEFTALY相同的错误。在此之前,由于Red Hat Linux 6.3中进程/线程数量的限制而导致错误 - 内存不足。通过将限制从40000增加到90000(!)

来解决这个问题

答案 1 :(得分:0)

错误的IP地址可能会发生此异常。 因此,请检查DATABASE的绑定IP地址和连接属性。

<local-tx-datasource>
    <jndi-name>JNDI_NAME</jndi-name>
    <connection-url>jdbc:mysql://localhost:3306/DATABASE_NAME</connection-url>
    <driver-class>com.mysql.jdbc.Driver</driver-class>
    <user-name>root</user-name>
    <password>root</password>
    <min-pool-size>1</min-pool-size>
    <max-pool-size>10</max-pool-size>
    <idle-timeout-minutes>1</idle-timeout-minutes>
        <metadata>
         <type-mapping>mySQL</type-mapping>
      </metadata>
  </local-tx-datasource>