• 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

xalan extensions "Invalid driver" error

 
Ranch Hand
Posts: 192
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I am using Xalan 2 extensions.
I want to connect to Oracle and query database and select few values and
display it through XSL.
I am trying to run the samples program that is coming along with xalan
download. (inside extensions\sql\basic-connection directory).
I am using the oracle driver, oracle.jdbc.driver.OracleDriver. I have
changed the parameters(datasource, driver, username, pwd) inside dbtest.xsl.
When I use this driver to connect to database through xsl, I am getting the
error,
"No Suitable Driver".
The driver is in the classpath(classes12.zip)
When I tried the same program with a different
driver(sun.jdbc.odbc.JdbcOdbcDriver), it works fine.
Is Xalan doesnt support this Oracle driver??
please help
here is my parameters:
<xsl :p aram name="driver" select="'oracle.jdbc.driver.OracleDriver'"/>
<xsl :p aram name="datasource"
select="'jdbc racle:thin:@172.22.1.44:1521 bn009'"/>
<xsl :p aram name="query" select="'select * from TBL_Document_type'"/>
<xsl :p aram name="username" select="'uid'"/>
<xsl :p aram name="passwd" select="'pwd'"/>
regards
s.arun prasath
[ December 04, 2003: Message edited by: Arun Prasath ]
 
author and deputy
Posts: 3150
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sounds like a classpath problem, check again the oracle drivers were available at runtime.
you can also explicitly specify the location by using
java -cp "C:\OracleDB\Classes.jar" org.apache.xslt.xalan.Process - xsl - XML - OUT etc.,
 
Arun Prasath
Ranch Hand
Posts: 192
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks balaji,
I have checked that again, too by keeping classes12.zip in the classpath.
still it is not working. what else might be the error. I couldnt think of any..
 
Balaji Loganathan
author and deputy
Posts: 3150
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Did you tried this option ??
java -cp "C:\OracleDB\Classes.jar" org.apache.xslt.xalan.Process - xsl - XML - OUT etc.,
if that doesn't work then try to UNZIP classes.zip and add them to ur classpath and try again.
 
Arun Prasath
Ranch Hand
Posts: 192
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
yes, balaji,
I have exactly tried this option.
java -cp %CLASSPATH%;C:\OracleDB\Classes12.zip org.apache.xslt.xalan.Process - xsl - XML - OUT
as that also didnt worked out, I have extracted classes12.zip into a temporary folder. Set the classpath for that folder.
I ran that program, and still getting the same error.
 
Ranch Hand
Posts: 170
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
URL problem. Check your url to the database.
 
Arun Prasath
Ranch Hand
Posts: 192
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks tony,
I am sure that the URL which I am using is the right one. I have checked that by writing another simple jdbc program, to connect to the database and fetch results.
I have find people facing similar problems in xsl-dev lists. But I couldnt find any solution to this problem.
 
reply
    Bookmark Topic Watch Topic
  • New Topic