2008/5/14 Christopher Schultz <[EMAIL PROTECTED]>:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> John,
>
> John Pedersen wrote:
> | Cannot create JDBC driver of class '' for connect URL 'null'
>
> This comes up quite often. Unfortunately, any number of bad
> configuration options can result in this message.


You 're - it is a common error. Shame the message isn't more specific about
what is causing it.

>
>
> |    <Resource name="compatMYSQL" auth="Container"
> type="javax.sql.DataSource"
>
> The resource name is usually of the form "jdbc/compatMYSQL".


I had that at one stage.  But without the jdbc/ seems to work as well.

>
>
> |     factory="org.apache.commons.dbcp.BasicDataSourceFactory"
>
> You should not need to specify this, though it shouldn't hurt.
>
> | This arrangement works on my local machine, but it throws the error on my
> | hosting server ( private JVM, Tomcat 6, on *nix *Virtual* Private
> *Server )
>
> Where is mysql-connector-x.y.z.jar installed on your local server? On
> the hosting server? Make sure that your JDBC library exists only in a
> single place on the server. For our projects, we put it in common/lib
> (on TC 5.5... I think it's just /lib for TC 6).


Yep, in /lib, it is TC 6

>
>
> | To fix it, I had to delete *META-INF/context.xml, and put the context
> info
> | in server.xml ( which the Tomcat documentation recommends NOT doing).
>
> Yeah, put it back into context.xml... it should work if everything else
> is okay.


This is the point! It should work, but it doesn't. It ONLY works with the
config info in server.xml

>
>
> | After spending so long resolving this, I am curious as to why it
> happened.
>
> These things usually get resolved when the configuration is re-written.
> Some little tiny thing was typo'd or mis-copied or whatever and the
> re-write fixes everything. Nobody keeps the old config and bothers to do
> a diff, so the exact cause usually remains a mystery. :)
>

I've spent SOOO long on it, it is hard to let go! I am curious why it might
work only with server.xml, and not in META-INF/context.xml.

Reply via email to