Uploaded image for project: 'Karaf'
  1. Karaf
  2. KARAF-2819

datasource-xxx.xml contains wrong password after jdbc:create

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.3.4
    • Fix Version/s: 2.4.0, 3.0.1, 2.3.5, 4.0.0.M3
    • Component/s: None
    • Labels:
      None
    • Environment:

      Description

      I can execute the jdbc commands, but I am experiencing a problem creating a datasource:

      karaf@trun> jdbc:create -url jdbc:mysql://localhost:3306/sample -u sample -p sample -t MySQL sample
      karaf@trun> jdbc:tables jdbc/sample 
      Error executing command: Access denied for user 'sample'@'localhost' (using password: YES)

      It looks like the 'password' of the datasource configuration file is created wrong '${test}' instead of 'sample'

          <bean id="dataSource" class="com.mysql.jdbc.jdbc2.optional.MysqlDataSource">
              <property name="url" value="jdbc:mysql://localhost:3306/sample"/>
              <property name="user" value="sample"/>
              <property name="password" value="${test}"/>
          </bean>

      I know I can edit the datasource-sample.xml file as a workaround and provide the real password.

        Attachments

          Activity

            People

            • Assignee:
              jbonofre Jean-Baptiste Onofré
              Reporter:
              lwerzinger Lothar Werzinger
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: