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,743 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 2

Accepted Solution

by:
ckiral earned 500 total points
ID: 34167528
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
ID: 34168408
Thank you very much.  I resolved the problem.  

Thanks
0
 
LVL 2

Expert Comment

by:ckiral
ID: 34168482
Happy hear that. Was it a connectivity issue?
0

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Periodically we have to update or add SSL certificates for customers. Depending upon your hosting plan you may be responsible for the installation and/or key generation. In the wake of Heartbleed many sites were forced to re-key. We will concen…
Creating an OSPF network that automatically (dynamically) reroutes network traffic over other connections to prevent network downtime.
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…
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…

730 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