Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using MySQL Connector/J 6.x warns about JDBC driver class name #1299

Closed
cowwoc opened this issue Apr 27, 2016 · 5 comments
Closed

Using MySQL Connector/J 6.x warns about JDBC driver class name #1299

cowwoc opened this issue Apr 27, 2016 · 5 comments

Comments

@cowwoc
Copy link

@cowwoc cowwoc commented Apr 27, 2016

What version of Flyway are you using?

4.0

What database are you using (type & version)?

AWS Aurora (equivalent to MySQL 5.6)

What operating system are you using?

Windows 7, 64-bit

What did you do?

Included the following lines in the Maven pom.xml:

            <plugin>
                <groupId>org.flywaydb</groupId>
                <artifactId>flyway-maven-plugin</artifactId>
                <version>4.0</version>
                <executions>
                    <execution>
                        <id>migrate-db</id>
                        <goals>
                            <goal>migrate</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <url>jdbc:mysql://someHostname/someDatabase</url>
                    <user>someUser</user>
                    <password>somePassword</password>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>mysql</groupId>
                        <artifactId>mysql-connector-java</artifactId>
                        <version>6.0.2</version>
                    </dependency>
                </dependencies>
            </plugin>
What did you expect to see?

No warning messages

What did you see instead?
--- flyway-maven-plugin:4.0:migrate (migrate-db) @ pandemic-web-service ---
Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver'. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary.
Unknown configuration property: flyway.version
@cowwoc
Copy link
Author

@cowwoc cowwoc commented Apr 27, 2016

The first warning is caused by https://dev.mysql.com/doc/connector-j/6.0/en/connector-j-api-changes.html. You can work around it using: <driver>com.mysql.cj.jdbc.Driver</driver>

I have no idea what is causing (or how to workaround) the second warning: Unknown configuration property: flyway.version

@axelfontaine axelfontaine added this to the Flyway 4.0.1 milestone May 5, 2016
@axelfontaine axelfontaine changed the title Warnings when migrating Aurora database Using MySQL Connector/J 6.x warns about JDBC driver class name May 5, 2016
@axelfontaine
Copy link
Contributor

@axelfontaine axelfontaine commented May 5, 2016

Fixed the first warning. The second one is to due to logic that warns for accidental Flyway config argument name misspellings by issuing a message for all unknown flyway.XXX properties. Rename to version.flyway or anything else that doesn't start with flyway. to eliminate the warning.

axelfontaine added a commit to flyway/flywaydb.org that referenced this issue May 5, 2016
@cowwoc
Copy link
Author

@cowwoc cowwoc commented May 5, 2016

@axelfontaine We don't actually have a flyway.version property anywhere in our pom, so I have no idea why we are getting this warning.

@axelfontaine
Copy link
Contributor

@axelfontaine axelfontaine commented May 5, 2016

It must be set from somewhere. Can you run your build with debug output and check?

@cowwoc
Copy link
Author

@cowwoc cowwoc commented May 5, 2016

@axelfontaine Nevermind. Another team member redid our entire pom so I can no longer reproduce the problem. I'll let you know if I ever see it again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants