commons-dev mailing list archives

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

     [ 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):
> <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: 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


Mime
View raw message