-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 John,
On 4/13/2009 6:24 PM, John Cartwright wrote: > I have what should be a simple problem, but can't seem to resolve it. > Basic JSP using a non-pooled connection: > > <sql:setDataSource var="myDS" > url="jdbc:oracle:thin:@host.example.com:1521:ORACLE" > driver="oracle.jdbc.driver.OracleDriver" > user="username" > password="password" > /> > > > I'm getting the exception: > javax.servlet.ServletException: javax.servlet.jsp.JspException: Unable > to get connection, DataSource invalid: "java.sql.SQLException: No > suitable driver found for ${myDS}" Hmm... does it say "${myDS}"? Maybe you get that exception when you try to /use/ the connection. Is "sql:setDataSource" part of the JSTL? > I've confirmed that the host, user, password are correct. Of course it > looks like a classpath problem, but WEB-INF/lib contains: jstl-1.2.jar > ojdbc14.jar standard.jar You might try putting your JDBC driver in Tomcat's top-level lib directory (lib/ for TC6, common/lib for TC5) and trying that. Just remember that there should only be one copy of your JDBC driver available on the CLASSPATH (which you should NOT set yourself... Tomcat takes care of all of this for you). Definitely don't downgrade to classes12.jar as Martin suggests. Generally speaking, there are no JDK version-specific JDBC drivers. You should get the more up-to-date driver that makes sense for you. Also don't downgrade the JSTL (if that's what you are using): you should use the most up-to-date version you can get for that, too. FWIW, you should consider using a pooled datasource at some point. Maybe setting that up, now, wouldn't be a bad idea. - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAknj7qUACgkQ9CaO5/Lv0PAjvACfSHcnbIj4Icsg4B8fiEzhTho4 EGcAnR3dMwiUBrThNBzyavDskaZVN2Jk =h7Mi -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org