• 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

Connection Polling in Oracle 10g Using NetBeans ID

 
Ranch Hand
Posts: 224
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am facing the problem while connecting to oracle10g using DataSource approach.I am using classes12.jar in my classpath. I am able to connect to database if i harcode the values in JSP.

I am getting error as follows


Source code

Index.jsp

I am able to get connection and retrive the results properly if i hadcode the values.I have commented this code.




Web.xml





context.xml




Please help me
 
Satyajeet Kadam
Ranch Hand
Posts: 224
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
PLease let me know if a anybody knows the solution
 
Ranch Hand
Posts: 423
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

your code uses this driver:
// Class.forName("oracle.jdbc.driver.OracleDriver");// driver

But Tomcat tries to load this driver:
java.lang.ClassNotFoundException: oracle.jdbc.OracleDriver

There is a subtle difference

Either install proper driver file somewhere in the classpath (the best place is $CATALINA/lib) , or change the driver name in context.xml.

As described here:
http://tomcat.apache.org/tomcat-6.0-doc/jndi-datasource-examples-howto.html

For Oracle 9i onwards you should use oracle.jdbc.OracleDriver rather than oracle.jdbc.driver.OracleDriver as Oracle have stated that oracle.jdbc.driver.OracleDriver is deprecated and support for this driver class will be discontinued in the next major release.


 
What's wrong? Where are you going? Stop! Read this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic