DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=41428>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ· INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=41428 Summary: org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory URL Parsing Bug Product: Tomcat 5 Version: 5.5.20 Platform: Other OS/Version: other Status: NEW Severity: normal Priority: P2 Component: Catalina:Modules AssignedTo: tomcat-dev@jakarta.apache.org ReportedBy: [EMAIL PROTECTED] Hello, I think there's a bug at the org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory at the time of parsing a certain MySQL url. When the connection url contains the "sessionVariables" property alone, everything works ok. However, when other properties are specified in addition to "sessionVariables", then an Exception is thrown when trying to establish a new connection. If the same url is specified using a Connection object inside my code, then NO error is thrown. It only happens when that same url is set at the Resource config of the server.xml file. I include some examples to reproduce the error: Everything goes fine when this is the config of the resource (note that the important part is the url): <Resource name="jdbc/starnum" auth="Container" type="javax.sql.DataSource" factory="org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory" maxActive="15" maxIdle="5" validationQuery="SELECT 1" testOnBorrow="false" testWhileIdle="true" timeBetweenEvictionRunsMillis="10000" minEvictableIdleTimeMillis="60000" username="user" password="pass" driverClassName="com.mysql.jdbc.Driver" url="jdbc:mysql://localhost:3316/db? [EMAIL PROTECTED]'0',@version='1.0';" /> However, if we set this other url, an error will be printed on the tomcat's log file: jdbc:mysql://localhost:3316/db? transformedBitIsBoolean=true&[EMAIL PROTECTED] te='0',@version='1.0'; It seems to be a bug when sessionVariables is specified in addition to other properties, like transformedBitIsBoolean in the previous example. As I mentioned above, when this same url is set using a Connection object inside my application, no Exception is thrown, so I think the bug is located at the BasicDataSourceFactory class. Thank you! -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]