This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes JSP and the fly likes unable to connect to oracle db through jstl Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "unable to connect to oracle db through jstl" Watch "unable to connect to oracle db through jstl" New topic
Author

unable to connect to oracle db through jstl

yo nara
Ranch Hand

Joined: Apr 03, 2002
Posts: 35
<sql:setDataSource url="jdbc racle:thin:@smssv01:1521 rcl"driver="oracle.jdbc.driver.OracleDriver" user="yogesh" password="yogesh"
var="dataSource"
--------------------------------------------------
gives following error:
---------------------------------------------
javax.servlet.ServletException: In <driver>, invalid driver class name: "oracle/jdbc/driver/OracleDriver"
jawwad ahmed
Ranch Hand

Joined: Dec 01, 2001
Posts: 179
Hi;
Well make sure that u have import the driver in your tag handler class.And giving correct sid.
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

A common problem with Oracle drivers is that they are contained in a .zip rather than a .jar file and don't get loaded. (and therefore aren't available)
Make sure the driver file ends with .jar and is somewhere your app can see it (note this does not necessarily mean the classpath)
ClassPath issues may be separate and would depend on the app server you are using.
Dave
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

"yogi",
The Java Ranch has thousands of visitors every week, many with surprisingly similar names. To avoid confusion we have a naming convention, described at http://www.javaranch.com/name.jsp.
We require names to have at least two words, separated by a space, and strongly recommend that you use your full real name. Please edit your profile and select a new name which meets the requirements.
Thanks.
Dave
Shawn Bayern
Author
Ranch Hand

Joined: May 06, 2002
Posts: 160
Originally posted by jawwad ahmed:
Hi;
Well make sure that u have import the driver in your tag handler class.And giving correct sid.

There isn't a need to import the driver in your JSP page using JSTL; JSTL takes care of this automatically. (It's not the original poster's tag handler but JSTL's, in this case.)
You will, however, need to ensure that Oracle's drivers (e.g., classes12.zip) are present in your web application's WEB-INF/lib. You may need to rename this file to a JAR file in order for Tomcat to recognize it.


Shawn Bayern<br />"JSTL in Action" <a href="http://www.jstlbook.com" target="_blank" rel="nofollow">http://www.jstlbook.com</a>
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

"yogi programmer",
Your name is still not valid.
yogi, yogi programmer and yogeshnaravane are all invalid.
It must be two words and must not be obviously ficticious.
A suggestion:
yogi naravane would be valid (I'm not sure what your last name is, this is just an option)
Thanks.
Dave
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: unable to connect to oracle db through jstl