Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@www.apache.org Received: (qmail 16766 invoked from network); 21 Jan 2007 22:12:56 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 21 Jan 2007 22:12:56 -0000 Received: (qmail 20657 invoked by uid 500); 21 Jan 2007 22:12:57 -0000 Delivered-To: apmail-jakarta-commons-dev-archive@jakarta.apache.org Received: (qmail 20584 invoked by uid 500); 21 Jan 2007 22:12:57 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 20525 invoked by uid 99); 21 Jan 2007 22:12:57 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 21 Jan 2007 14:12:57 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 21 Jan 2007 14:12:50 -0800 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 3AD277142D4 for ; Sun, 21 Jan 2007 14:12:30 -0800 (PST) Message-ID: <31247640.1169417550238.JavaMail.jira@brutus> Date: Sun, 21 Jan 2007 14:12:30 -0800 (PST) From: "Phil Steitz (JIRA)" To: commons-dev@jakarta.apache.org Subject: [jira] Updated: (DBCP-208) URL Parsing Bug In-Reply-To: <12523355.1169411429954.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/DBCP-208?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Phil Steitz updated DBCP-208: ----------------------------- Fix Version/s: 1.3 > URL Parsing Bug > --------------- > > Key: DBCP-208 > URL: https://issues.apache.org/jira/browse/DBCP-208 > Project: Commons Dbcp > Issue Type: Bug > Environment: Tomcat DBCP > Reporter: Ricotta > Priority: Minor > Fix For: 1.3 > > > 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): > 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?sessionVariables=@date='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&sessionVariables=@date='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! -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-dev-help@jakarta.apache.org