[CONJ-188] Default pool framework initialisation Created: 2015-08-31 Updated: 2015-09-02 Resolved: 2015-09-02 |
|
| Status: | Closed |
| Project: | MariaDB Connector/J |
| Component/s: | Other |
| Affects Version/s: | 1.2.0 |
| Fix Version/s: | 1.2.2 |
| Type: | Task | Priority: | Minor |
| Reporter: | Diego Dupin | Assignee: | Diego Dupin |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
(report from github https://github.com/MariaDB/mariadb-connector-j/issues/35 from ocafebabe) Some database connection pool like the one I use (Oracle UCP) will set default values for the serverName and port properties (in this case: null and 0) in org.mariadb.jdbc.MySQLDataSource. So even though the URL I set is valid, the connection will fail because the two properties were overridden and the generated URL by the datasource implementation is then invalid: jdbc:mysql://address=(host=null)(port=0)(type=master)
java.sql.SQLException: Exception occurred while getting connection: oracle.ucp.UniversalConnectionPoolException: Cannot get Connection from Datasource: java.lang.IllegalArgumentException: hostname can't be null
These validation checks are pretty generic and I don't think it would be harmful under other circumstances! |