概述
在tomcat 中将这几个参数扩大后,
maxActive=“300”
initialSize=“100”
maxIdle=“500”
minIdle=“300”
maxWait=“10000”
发布到服务器后,服务起来正常运行,但在本地服务起不来,如下:
Caused by: java.sql.SQLException: Error preloading the connection pool
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1525)
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getLogWriter(BasicDataSource.java:1160)
at org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory.createDataSource(BasicDataSourceFactory.java:363)
at org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory.getObjectInstance(BasicDataSourceFactory.java:160)
at org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFactory.java:141)
at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:321)
at org.apache.naming.NamingContext.lookup(NamingContext.java:848)
… 40 more
Caused by: java.sql.SQLException: Io 异常: Got minus one from a read call
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.(PhysicalConnection.java:414)
at oracle.jdbc.driver.T4CConnection.(T4CConnection.java:165)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:35)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:801)
at org.apache.tomcat.dbcp.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)
at org.apache.tomcat.dbcp.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:599)
at org.apache.tomcat.dbcp.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:41)
at org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.addObject(GenericObjectPool.java:1706)
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1521)
… 46 more
操作如下:
可先将以下几个参数注释掉,再次运行,最后再依次改其中的值即可,亲测有效
maxActive=“300”
initialSize=“100”
maxIdle=“500”
minIdle=“300”
maxWait=“10000”
以下收集了网上此问题的相关解决方法如下:
https://www.iteye.com/blog/quicker-1740690
http://www.iteye.com/topic/1126453
http://blog.sina.com.cn/s/blog_529aacbd0100t22b.html
http://hi.baidu.com/xjieni/item/1afbff62dab025167cdecc21
最后
以上就是美好花生为你收集整理的本地起服务报错:Caused by: java.sql.SQLException: Io 异常: Got minus one from a read call的全部内容,希望文章能够帮你解决本地起服务报错:Caused by: java.sql.SQLException: Io 异常: Got minus one from a read call所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复