• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JDBC fails with Tomcat

 
Ranch Hand
Posts: 430
Android VI Editor Debian
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am trying to send an array to a pl/sql module but for some reason i am unable to get the connection object.

Here is the line of code that fails



Here is the stack trace



And here is my connection config

Struts Web.xml file



Metainf/context.xml


[ September 26, 2008: Message edited by: O. Ziggy ]
[ September 26, 2008: Message edited by: Bear Bibeault ]
 
author
Posts: 4335
39
jQuery Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
For starters, Oracle and your driver are the culprit, not JDBC. This is one of the reasons I strongly recommend against Oracle-specific implementations of JDBC. You should be using interface classes like Statement/Callable, and not relying on Oracle classes lest you never want to be able to port your code to a new database.

As for the error, since you're getting a ClassCastException exception its most likely your class path. Are you 100% its not failing on this line? The exception makes more sense if this is the bad line:

 
Scott Selikoff
author
Posts: 4335
39
jQuery Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Btw thanks O Ziggy, you helped inspired #4 in my recent blog post 5 Tips to be a Good JDBC Programmer
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic