https://issues.apache.org/bugzilla/show_bug.cgi?id=46298
Summary: JDBCRealm.open() throws NullPointerException if the specified driver doesn't handle the specified JDBC URL Product: Tomcat 6 Version: unspecified Platform: All OS/Version: All Status: NEW Severity: minor Priority: P2 Component: Catalina AssignedTo: dev@tomcat.apache.org ReportedBy: [EMAIL PROTECTED] Created an attachment (id=22949) --> (https://issues.apache.org/bugzilla/attachment.cgi?id=22949) 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. -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]