From: francan on 7 Jun 2010 19:00 I am using JNDI Database Connection Pool in Tomcat 6.0.20 to connect to Oracle RAC: <Resource name="jdbc/myoracle" auth="Container" type="javax.sql.DataSource" driverClassName="oracle.jdbc.OracleDriver" url="jdbc:oracle:thin:@myserver:1521:mysid" username="joness" password="mypasswrd" maxActive="20" maxIdle="10" maxWait="-1"/> It works great except after Tomcat container is restarted. The first time I view a page after the restart, the web page with JNDI DB connection pool comes back with message: "Cannot create PoolableConnectionFactory(IO exception: The network adaptor could not establish the connection". The next time I view the page and all other times it works great. Please advise.
From: Lew on 7 Jun 2010 19:15 On 06/07/2010 07:00 PM, francan wrote: > I am using JNDI Database Connection Pool in Tomcat 6.0.20 to connect > to Oracle RAC: > <Resource name="jdbc/myoracle" auth="Container" > type="javax.sql.DataSource" driverClassName="oracle.jdbc.OracleDriver" > url="jdbc:oracle:thin:@myserver:1521:mysid" > username="joness" password="mypasswrd" maxActive="20" maxIdle="10" > maxWait="-1"/> > > It works great except after Tomcat container is restarted. The first How are you starting, stopping and restarting Tomcat? > time I view a page after the restart, the web page with JNDI DB > connection pool comes back with message: > "Cannot create PoolableConnectionFactory(IO exception: The network > adaptor could not establish the connection". Are you using the default pooling (tomcat-dbcp.jar)? > The next time I view the page and all other times it works great. > Please advise. Perhaps the restart doesn't reset the dbcp pool state the first time? Maybe the OS didn't release the connection the first time, and the attempt to reconnect or the reaction to its failure tells the OS to kill the old connection? A few minutes with Google didn't turn up anything that seems relevant. -- Lew
From: Tom Anderson on 8 Jun 2010 13:11 On Mon, 7 Jun 2010, francan wrote: > I am using JNDI Database Connection Pool in Tomcat 6.0.20 to connect > to Oracle RAC: > <Resource name="jdbc/myoracle" auth="Container" > type="javax.sql.DataSource" driverClassName="oracle.jdbc.OracleDriver" > url="jdbc:oracle:thin:@myserver:1521:mysid" > username="joness" password="mypasswrd" maxActive="20" maxIdle="10" > maxWait="-1"/> > > It works great except after Tomcat container is restarted. The first > time I view a page after the restart, the web page with JNDI DB > connection pool comes back with message: > "Cannot create PoolableConnectionFactory(IO exception: The network > adaptor could not establish the connection". > > The next time I view the page and all other times it works great. > Please advise. Check the Oracle logs. I wonder if when Tomcat shuts down, the connections aren't being properly closed on the Oracle side, so it doesn't have any free listeners to hand out to the new Tomcat instance. Seems a bit unlikely, though. How are you shutting down Tomcat? tom -- With a face like this I won't break any hearts and thinking like that I won't make any friends
|
Pages: 1 Prev: Windows priorities with runtime.exec Next: Making JavaMail work |