Uploaded image for project: 'Grails'
  1. Grails
  2. GRAILS-11112

setting dbProperties in dataSource groovy doesn't work for non-String property values

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.3.6
    • Component/s: None
    • Labels:
      None

      Description

      It should be possible to configure the "dbProperties" property of Tomcat JDBC Pool in dataSource groovy.
      This causes NPEs for non-String properties.

      The problem is invalid implementation of PropertiesEditor in Spring itself.
      The keys and values of java.util.Properties should be java.lang.String values when a java.util.Map is converted to a java.util.Properties value.

        Issue Links

          Activity

          Hide
          J. David Beutel added a comment -

          This fix in 2.3.6 did not work for me. In my debugger, the MySQL driver is configured from the DataSource dbProperties (and the Spring Security plugins are configured) before CustomEditorConfigurer.setCustomEditors() is called with the new PropertiesEditor.

          But, I guess I can work around this issue by making all my dbProperties values Strings.

          Show
          J. David Beutel added a comment - This fix in 2.3.6 did not work for me. In my debugger, the MySQL driver is configured from the DataSource dbProperties (and the Spring Security plugins are configured) before CustomEditorConfigurer.setCustomEditors() is called with the new PropertiesEditor. But, I guess I can work around this issue by making all my dbProperties values Strings.

            People

            • Assignee:
              Lari Hotari
              Reporter:
              Lari Hotari
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development