tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anjib Mulepati <anji...@hotmail.com>
Subject Re: DB Connection error
Date Mon, 09 Jan 2012 17:21:23 GMT
I have following log
com.anjib.exceptions.DAOException: Error in your database.
     at com.anjib.actions.GetMyListAction.execute(GetMyListAction.java:71)
     at 
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:425)
     at 
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:228)
     at 
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
     at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
     at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
     at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
     at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
     at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
     at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
     at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
     at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
     at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
     at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
     at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
     at 
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
     at java.lang.Thread.run(Thread.java:662)
Caused by: com.anjib.exceptions.DAOException: Cannot create 
PoolableConnectionFactory (IO Error: The Network Adapter could not 
establish the connection)
     at com.anjib.dao.DAOFactory.createConnection(DAOFactory.java:118)
     at com.anjib.dao.oracle.Table1DAO.getAll(Table1DAO.java:195)
     at com.anjib.actions.GetMyListAction.execute(GetMyListAction.java:65)
     ... 18 more
Caused by: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create 
PoolableConnectionFactory (IO Error: The Network Adapter could not 
establish the connection)
     at 
org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1225)
     at 
org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)
     at com.anjib.dao.DAOFactory.createConnection(DAOFactory.java:116)
     ... 20 more
Caused by: java.sql.SQLRecoverableException: IO Error: The Network 
Adapter could not establish the connection
     at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:419)
     at oracle.jdbc.driver.PhysicalConnection.(PhysicalConnection.java:536)
     at oracle.jdbc.driver.T4CConnection.(T4CConnection.java:228)
     at 
oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
     at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:521)
     at 
org.apache.tomcat.dbcp.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)
     at 
org.apache.tomcat.dbcp.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:294)
     at 
org.apache.tomcat.dbcp.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1247)
     at 
org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1221)
     ... 22 more
Caused by: oracle.net.ns.NetException: The Network Adapter could not 
establish the connection
     at oracle.net.nt.ConnStrategy.execute(ConnStrategy.java:375)
     at 
oracle.net.resolver.AddrResolution.resolveAndExecute(AddrResolution.java:422)
     at oracle.net.ns.NSProtocol.establishConnection(NSProtocol.java:678)
     at oracle.net.ns.NSProtocol.connect(NSProtocol.java:238)
     at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:1054)
     at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:308)
     ... 30 more
Caused by: java.net.ConnectException: Connection refused: connect
     at java.net.PlainSocketImpl.socketConnect(Native Method)
     at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351)
     at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213)
     at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200)
     at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
     at java.net.Socket.connect(Socket.java:529)
     at oracle.net.nt.TcpNTAdapter.connect(TcpNTAdapter.java:209)
     at oracle.net.nt.ConnOption.connect(ConnOption.java:123)
     at oracle.net.nt.ConnStrategy.execute(ConnStrategy.java:353)
     ... 35 more
On 1/9/2012 12:03 PM, Propes, Barry L wrote:
> Are you getting any kind of error in the logs?
>
>
> -----Original Message-----
> From: Anjib Mulepati [mailto:anjibcs@hotmail.com]
> Sent: Monday, January 09, 2012 9:22 AM
> To: Tomcat Users List
> Subject: Re: DB Connection error
>
> I did change my config.xml to
>
> <Context antiJARLocking="true" path="/myApp">
> <Resource auth="Container"
>               driverClassName="oracle.jdbc.driver.OracleDriver"
>               maxActive="20"
>               maxIdle="10"
>               maxWait="-1"
>               name="jdbc/myName"
>               password="myPassword"
>               testOnBorrow="true"
>               type="javax.sql.DataSource"
>               url="jdbc:oracle:thin:@//localhost:8080/MYDBS"
>               username="myUsername"
>               validationQuery="SELECT 1 FROM DUAL" />
> </Context>
>
> And this morning when DB restart I had to restart the tomcat to get
> connection. What can be other solutions?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message