Solved

org.apache.commons.dbcp.DbcpException: java.sql.SQLException: Io exception: The Network Adapter could not establish the connection

Posted on 2010-11-18
3
1,707 Views
Last Modified: 2012-05-10


I'm having this error msg while starting the app server

DBCP borrowObject failed: java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
org.apache.commons.dbcp.DbcpException: java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
      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:816)
      at org.apache.commons.dbcp.AbandonedObjectPool.borrowObject(AbandonedObjectPool.java:117)
      at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:110)
      at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:312)
      at com.newbreed.enbrace.fx.dao.Dao.getDbConnection(Dao.java:136)
      at com.newbreed.enbrace.fx.dao.session.SessionDAOImpl.sweep(SessionDAOImpl.java:169)
      at com.newbreed.enbrace.fx.security.SessionSweeperServlet.timerAction(SessionSweeperServlet.java:72)
      at com.newbreed.enbrace.fx.util.CronTimer.timerAction(CronTimer.java:142)
      at com.newbreed.enbrace.fx.util.TimerThread.run(Timer.java:36)
Caused by: java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
      at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:114)
      at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:156)
      at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:269)
      at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:210)
      at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:251)
      at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:224)
      at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:83)

I can log in to the server but it gives

HTTP Status 500 -

--------------------------------------------------------------------------------

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

org.apache.commons.dbcp.DbcpException: java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
      org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:85)
      org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:184)
      org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:816)
      org.apache.commons.dbcp.AbandonedObjectPool.borrowObject(AbandonedObjectPool.java:117)
      org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:110)
      org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:312)
      com.newbreed.enbrace.fx.dao.Dao.getExternalDbConnection(Dao.java:86)
      com.newbreed.enbrace.fx.security.login.LoginAction.perform(LoginAction.java:86)
      org.apache.struts.action.ActionServlet.processActionPerform(ActionServlet.java:1787)
      org.apache.struts.action.ActionServlet.process(ActionServlet.java:1586)
      org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:810)


note The full stack trace of the root cause is available in the Apache Tomcat/5.0.25 logs.


--------------------------------------------------------------------------------

Apache Tomcat/5.0.25

Please give the solution, its very urgent.

thanks in advance
0
Comment
Question by:nbuser
  • 2
3 Comments
 
LVL 2

Accepted Solution

by:
ckiral earned 500 total points
Comment Utility
It looks like a connection pool problem.
Apparently you are using oracle as backend db.
Please check if you have nework connectivity to db server from application server.
You may also check if oracle listener is accepting connections from your app server.

0
 

Author Comment

by:nbuser
Comment Utility
Thank you very much.  I resolved the problem.  

Thanks
0
 
LVL 2

Expert Comment

by:ckiral
Comment Utility
Happy hear that. Was it a connectivity issue?
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Join & Write a Comment

Creating an OSPF network that automatically (dynamically) reroutes network traffic over other connections to prevent network downtime.
ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
Viewers will learn how to properly install and use Secure Shell (SSH) to work on projects or homework remotely. Download Secure Shell: Follow basic installation instructions: Open Secure Shell and use "Quick Connect" to enter credentials includi…
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now