• 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

unable to connect to oracle db through jstl

 
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
<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"
 
Ranch Hand
Posts: 179
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi;
Well make sure that u have import the driver in your tag handler class.And giving correct sid.
 
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"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
 
Author
Posts: 160
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"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
 
reply
    Bookmark Topic Watch Topic
  • New Topic