Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ClassCastException with Connection Pooling

 
Graeme Byers
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 312
Java MS IE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 !
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic