Created attachment 22949 [details] Check returned connection for null in JDBCRealm.open() Per the Driver.connect(String, Properties) docs: > The driver should return "null" if it realizes it is the wrong kind of driver to connect to the given URL. I ran into this when I fat-fingered the JDBC URL's prefix (jdbc:msql: instead of jdbc:mysql: with the MySQL driver). The offending code calls Driver.connect and immediately calls setAutoCommit(false) on the resulting driver without checking that the connect returned a connection. I've attached a patch based from TOMCAT_6_0_18 that addresses the issue.
Thanks for the patch. I have applied a variation to trunk and will propose it for 6.0.x The changes I made were: - test dbConnection for null rather than driver (which is always non-null) - use the StringManager to provide i18n for the exception message
Thanks for catching the typo in the patch! Clearly, I fat-finger a lot of things. I18n is also a nice touch.
This has been fixed in 6.0.x and will be included in 6.0.19 onwards.