aspose file tools*
The moose likes JDBC and the fly likes Connection Polling in Oracle 10g Using NetBeans ID Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Connection Polling in Oracle 10g Using NetBeans ID" Watch "Connection Polling in Oracle 10g Using NetBeans ID" New topic
Author

Connection Polling in Oracle 10g Using NetBeans ID

Satyajeet Kadam
Ranch Hand

Joined: Oct 19, 2006
Posts: 215
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

Joined: Oct 19, 2006
Posts: 215
PLease let me know if a anybody knows the solution
Ireneusz Kordal
Ranch Hand

Joined: Jun 21, 2008
Posts: 423
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.

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Connection Polling in Oracle 10g Using NetBeans ID