服务器异常信息如下:
[2011-02-09 08:49:41,609] ERROR [sweep] (?:?) - Prototype
java.sql.SQLException: Listener refused the connection with the following error:
ORA-12528, TNS:listener: all appropriate instances are blocking new connections
The Connection descriptor used by the client was:
192.168.10.22:1521:air
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:261)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:387)
at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:439)
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 java.sql.DriverManager.getConnection(DriverManager.java:582)
at java.sql.DriverManager.getConnection(DriverManager.java:154)
at org.logicalcobwebs.proxool.DefaultConnectionBuilder.buildConnection(Unknown Source)
at org.logicalcobwebs.proxool.Prototyper.buildConnection(Unknown Source)
at org.logicalcobwebs.proxool.Prototyper.sweep(Unknown Source)
at org.logicalcobwebs.proxool.PrototyperThread.run(Unknown Source)
[2011-02-09 09:36:21,898] ERROR [invoke] (ServiceLocatorPhaser.java:242) - java.lang.NullPointerException
[2011-02-09 09:36:26,367] ERROR [invoke] (ServiceLocatorPhaser.java:242) - java.lang.NullPointerException
[2011-02-09 09:36:42,413] ERROR [invoke] (ServiceLocatorPhaser.java:242) - java.lang.NullPointerException
[2011-02-09 09:36:45,945] ERROR [invoke] (ServiceLocatorPhaser.java:242) - java.lang.NullPointerException
[2011-02-09 09:37:28,304] ERROR [invoke] (ServiceLocatorPhaser.java:242) - java.lang.NullPointerException
[2011-02-09 09:37:36,117] ERROR [invoke] (ServiceLocatorPhaser.java:242) - java.lang.NullPointerException
[2011-02-09 09:37:39,773] ERROR [invoke] (ServiceLocatorPhaser.java:242) - java.lang.NullPointerException
[2011-02-09 09:37:49,757] ERROR [invoke] (ServiceLocatorPhaser.java:242) - java.lang.NullPointerException
[2011-02-09 14:23:14,007] ERROR [invoke] (ServiceLocatorPhaser.java:242) - java.lang.NullPointerException
[2011-02-09 16:36:44,489] ERROR [invoke] (ServiceLocatorPhaser.java:242) - java.lang.NullPointerException
在网上找了很多解决方案,但是大部分是说超出数据库最大连接数,但实际上数据库设计的最大连接是300个,当时的总连接数是27,不是这个问题引起的。
经过其他人员的查看,是因为oracle数据库服务后启动造成的,也就是说tomcat应用服务器早于oracle服务启动,造成无法连接数据库。一般这种问题出现在机器重新启动时。
解决方案就是把tomcat重新启动下就好了。