commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Phil Steitz (JIRA)" <>
Subject [jira] Updated: (DBCP-208) URL Parsing Bug
Date Sun, 21 Jan 2007 22:12:30 GMT


Phil Steitz updated DBCP-208:

    Fix Version/s: 1.3

> URL Parsing Bug
> ---------------
>                 Key: DBCP-208
>                 URL:
>             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):
> <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?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:
For more information on JIRA, see:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message