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

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.3.4
    • 2.4.0, 3.0.1, 2.3.5, 4.0.0.M3
    • None
    • None

    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

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

            Dates

              Created:
              Updated:
              Resolved: