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,727 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
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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

Suggested Solutions

The article explains the protocols and technology which is involved when two computers on different TCP/IP networks communicate with each other. In the diagram, a router is used to segregate two networks. The networks are 192.168.1.0/24 and 192…
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…

803 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