• Post Reply Bookmark Topic Watch Topic
  • New Topic

sql:query error "No suitable driver"  RSS feed

 
liliya woland
Ranch Hand
Posts: 134
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a database test code that I made months ago, based on instructions at http://tomcat.apache.org/tomcat-5.0-doc/jndi-datasource-examples-howto.html - it used to work.
When I run it now I get error
org.apache.jasper.JasperException: Unable to get connection, DataSource invalid: "No suitable driver"
I do have all the drivers and classpaths set; have modified server.xml and my web.xml files. The database has the data I'm attempting to query.

Could anyone please tell me what produces the error and maybe how to fix or test for it? Thank you in advance.
This is my test file located in webapps/jsps/ folder
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by liliya woland:

I do have all the drivers and classpaths set; have modified server.xml and my web.xml files.


This doesn't give us much to work with.
Maybe you could take a minute to actually copy and past the relevant parts of these files into this thread so we can see them?

Also where did you put your JDBC driver?
 
liliya woland
Ranch Hand
Posts: 134
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, the test file runs fine now - the problem had to do with server.xml Resource tag. I edded up copying url,driverClassName,username and password from parameters into Resource tag and now there is no problem for some reason.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!