DBCP borrowObject failed: java.sql.SQLException: Io 异常: The Network Adapter could not establish the connectionError creating bean with name 'tbp.sys.SessionFactory' defined in ServletContext resource [/WEB-INF/conf/spring/springDataSource.xml]: Invocation of init method failed; nested exception is org.apache.commons.dbcp.DbcpException: java.sql.SQLException: Io 异常: The Network Adapter could not establish the connection

解决方案 »

  1.   

    at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:85)
    at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:184)
    at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:722)
    at org.apache.commons.dbcp.AbandonedObjectPool.borrowObject(AbandonedObjectPool.java:117)
    at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:108)
    at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:312)
      

  2.   

    The Network Adapter could not establish the connection
    不能建立链接,检查jar包,URL,帐号,密码。 以及SQL服务是否开启。
      

  3.   

    oracle数据库已经开启了,用户名密码确认无误,jar包在web-INf下的lib下面,url不知道有没有错
    创建完数据库后的数据如下:Enterprise Manager Database Control URL - (orcl) :http://asus-PC:1158/em数据库配置文件已经安装到 D:\oracle\product\10.2.0,同时其他选定的安装组件也已经安装到 D:\oracle\product\10.2.0\db_1。iSQL*Plus URL 为:http://asus-PC:5561/isqlplusiSQL*Plus DBA URL 为:http://asus-PC:5561/isqlplus/dba
    用户:platform
    密码:platform
    用户:system
    密码:platform
      

  4.   

    我说的url是驱动的URLClass.forName( "oracle.jdbc.driver.OracleDriver" );
    Connection cn = DriverManager.getConnection( "jdbc:oracle:thin:@MyDbComputerNameOrIP:1521:ORCL", sUsr, sPwd );
      

  5.   

    那个url没错jdbc:oracle:thin:@localhost:1521:orcl。我确信,而且重启电脑后就可以启动tomcat了,一切正常了,我什么都没改。郁闷中。
    还是顶你。
      

  6.   

    不知道,现在又是IO异常,重启后又正常了,神马情况?tomcat中的work目录都删了,还是这样
      

  7.   

    看看你的DBCP配置文件的占位符中的内容是不是有误