MyException - 我的异常网
当前位置:我的异常网» Java Web开发 » org.apache.commons.dbcp.SQLNestedException,该怎

org.apache.commons.dbcp.SQLNestedException,该怎么解决(3)

www.MyException.Cn  网友分享于:2013-01-24  浏览:363次


  at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443
)
  at org.apache.catalina.core.StandardService.start(StandardService.java:4
48)
  at org.apache.catalina.core.StandardServer.start(StandardServer.java:700
)
  at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
  at java.lang.reflect.Method.invoke(Method.java:324)
  at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
  at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
Caused by: java.sql.SQLException: Io 异常: The Network Adapter could not establi
sh the connection
  at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
  at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
  at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:333)
  at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:404)

  at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.ja
va:468)
  at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:314)
  at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(Driv
erConnectionFactory.java:37)
  at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(Poolable
ConnectionFactory.java:290)
  at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(Bas
icDataSource.java:877)
  at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSou
rce.java:851)
  ... 40 more
[EAM2004] 2011-9-19 11:29:50 connection is null.

------解决方案--------------------
我想可能有几种原因造成
1.数据库的JDBC驱动没有放到tomcat的lib文件夹当中
2.数据库的用户名和密码不对
2.数据源配置的URL地址有问题
楼主查查
------解决方案--------------------
Caused by: java.sql.SQLException: Io 异常: The Network Adapter could not establi
sh the connection

1. 数据库配置错误,其中有可能是url中的IP或者端口错误
2.防火墙设置造成的错误。(可能是未设置启用端口)
3.Oracle的监听服务未开启

文章评论

软件开发程序错误异常ExceptionCopyright © 2009-2015 MyException 版权所有