wood burning stoves 2.0*
The moose likes JDBC and the fly likes ClassCastException with Connection Pooling Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "ClassCastException with Connection Pooling" Watch "ClassCastException with Connection Pooling" New topic
Author

ClassCastException with Connection Pooling

Graeme Byers
Ranch Hand

Joined: Apr 16, 2004
Posts: 127
ClassCastException with Connection Pooling
============================

This one may belong in Beginner's Java , however ...
I'm following Gregg Lagnese "How to Setup Global Mapping for Oracle JDBC Connection Pooling with Tomcat")
http://www.microdeveloper.com/html/JNDI_Orcl_Tomcat1p.html

Thank you for any help.

Environment : Apache-Tomcat 6.0.18 , Oracle XE 10.2.0

The JSP :

The JSP output (neatly arranged) :

The program :







Madhan Sundararajan Devaki
Ranch Hand

Joined: Mar 18, 2011
Posts: 312

I observed the following.
* Why do you get a connection pool in JSP?!
* Lines 25 & 28 : Why do you get the resource twice?
* If an exception is thrown on-or-before line 30, NullPointerException will be thrown, when the finally block executes !


S.D. MADHAN
Not many get the right opportunity !
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: ClassCastException with Connection Pooling