geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jesper Louis Andersen (JIRA)" <>
Subject [jira] Commented: (GERONIMO-3596) Unintuitive workings of the MySQL DBPool deployment wizard
Date Sat, 17 Nov 2007 15:02:43 GMT


Jesper Louis Andersen commented on GERONIMO-3596:

Sorry for letting it hang for so long.

Yes, I am in a position to test it, but I need some general directions on how to obtain it

Regarding the URL construction, it seems it is of the form:


Thus, I thought it would be easy to assemble if a user enters the hostname, the port and the
database name. Alternatively, one could run with the connection URL alone and not have fields
for the other things. Or one could select, via a radio button or similar, what part of the
data is to be used. Anyway, I am just doing brain-dump here. I think we may have misunderstood
each other a bit on the URL construction.

> Unintuitive workings of the MySQL DBPool deployment wizard
> ----------------------------------------------------------
>                 Key: GERONIMO-3596
>                 URL:
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: connector, databases, deployment
>    Affects Versions: 2.0.2
>         Environment: ogre% uname -a
> FreeBSD ogre 7.0-BETA2 FreeBSD 7.0-BETA2 #4: Sat Nov 10 15:29:36 CET 2007     root@ogre:/usr/obj/usr/src/sys/OGRE
> ogre% java -version
> java version "1.6.0_02-p2"
> Java(TM) SE Runtime Environment (build 1.6.0_02-p2-root_04_nov_2007_14_03-b00)
> Java HotSpot(TM) 64-Bit Server VM (build 1.6.0_02-p2-root_04_nov_2007_14_03-b00, mixed
> Nothing else. I don't think it matters at all for this bug report anyway.
>            Reporter: Jesper Louis Andersen
> There is an unintuitive gotcha hidden in the DBPool wizard for the MySQL (and probably
also the MySQL-XA) driver. It manifests itself
> with a NullPointerException when trying to connect to a database. See for instance the
following mail:
> The reason is that if you DON'T fill out the URL field, you get the following deployment
> ++++++++++++++++++++++++++++++++
> <?xml version="1.0" encoding="UTF-8"?>
> <connector xmlns="">
>     <dep:environment xmlns:dep="">
>         <dep:moduleId>
>             <dep:groupId>console.dbpool</dep:groupId>
>             <dep:artifactId>cxnet</dep:artifactId>
>             <dep:version>1.0</dep:version>
>             <dep:type>rar</dep:type>
>         </dep:moduleId>
>         <dep:dependencies>
>             <dep:dependency>
>                 <dep:groupId>mysql</dep:groupId>
>                 <dep:artifactId>mysql-connector-java</dep:artifactId>
>                 <dep:version>5.1.5</dep:version>
>                 <dep:type>jar</dep:type>
>             </dep:dependency>
>         </dep:dependencies>
>     </dep:environment>
>     <resourceadapter>
>         <outbound-resourceadapter>
>             <connection-definition>
>                 <connectionfactory-interface>javax.sql.DataSource</connectionfactory-interface>
>                 <connectiondefinition-instance>
>                     <name>cxnet</name>
>                     <config-property-setting name="DatabaseName">foo</config-property-setting>
>                     <config-property-setting name="Password">foo</config-property-setting>
>                     <config-property-setting name="UserName">foo</config-property-setting>
>                     <config-property-setting name="URL"/>
>                     <connectionmanager>
>                         <no-transaction/>
>                         <single-pool>
>                             <max-size>10</max-size>
>                             <min-size>0</min-size>
>                             <match-one/>
>                         </single-pool>
>                     </connectionmanager>
>                 </connectiondefinition-instance>
>             </connection-definition>
>         </outbound-resourceadapter>
>     </resourceadapter>
> </connector>
> +++++++++++++++++++++++++++++++++++++
> Notice the Empty URL parameter. Quick workaround: Supply the URL parameter or use the
'show plan' feature and add the URL in
> the plan.
> Steps to reproduce:
> 1. Add a mysql-connector-java JAR to the library section. I used 5.1.5 as a version,
but it also fails with 5.0.8 and 3.1.14.
> 2. Click Database Pools -> Wizard -> choose 'foo' and MySQL as driver
> 3. Enter the fields: pool name, database driver, port number, user name, server name,
database name, password and confirm password 
> take care NOT to enter the URL. 
> 4. Now click 'show plan'. It this point it should be obvious that we are trying to deploy
a plan without an URL.
> The idea for a fix:
> 1. Gather fields from input.
> 2. If URL is empty, stitch together one from the other parameters.
> 3. Use the constructed URL.
> And do take care to report this back to the guy in the linked mail above ;)

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message