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

Support for MariaDB enterprise version numbering #2626

Closed
nicholasfechner opened this issue Jan 15, 2020 · 4 comments
Closed

Support for MariaDB enterprise version numbering #2626

nicholasfechner opened this issue Jan 15, 2020 · 4 comments

Comments

@nicholasfechner
Copy link
Contributor

@nicholasfechner nicholasfechner commented Jan 15, 2020

Which version and edition of Flyway are you using?

Flyway 6.0.8 (linked by Spring Boot 2.2.2)

If this is not the latest version, can you reproduce the issue with the latest one as well?

(Many bugs are fixed in newer releases and upgrading will often resolve the issue)
Yes.

Which client are you using? (Command-line, Java API, Maven plugin, Gradle plugin)

org.mariadb.jdbc:mariadb-java-client:2.4.4 (also via Spring Boot)

Which database are you using (type & version)?

MariaDB 10.4 Enterprise version.

Which operating system are you using?

Red Hat Enterprise Linux 7

What did you do?

Starting the application with Flyway active runs into an error:

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flywayInitializer' defined in class path resource [org/springframework/boot/autoconfigure/flyway/FlywayAutoConfiguration$FlywayConfiguration.class]: Invocation of init method failed; nested exception is org.flywaydb.core.api.FlywayException: Unable to determine version from '10.4.10-4-MariaDB-log'
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1796)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:595)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517)
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:310)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
	at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1108)
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:868)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:550)
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141)
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747)
	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:315)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1215)
	at de.telekom.iptv.IptvrmdAppApplication.main(IptvrmdAppApplication.java:21)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48)
	at org.springframework.boot.loader.Launcher.launch(Launcher.java:87)
	at org.springframework.boot.loader.Launcher.launch(Launcher.java:51)
	at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:52)
Caused by: org.flywaydb.core.api.FlywayException: Unable to determine version from '10.4.10-4-MariaDB-log'
	at org.flywaydb.core.internal.database.mysql.MySQLDatabase.extractVersionFromString(MySQLDatabase.java:215)
	at org.flywaydb.core.internal.database.mysql.MySQLDatabase.correctForAzureMariaDB(MySQLDatabase.java:206)
	at org.flywaydb.core.internal.database.mysql.MySQLDatabase.determineVersion(MySQLDatabase.java:171)
	at org.flywaydb.core.internal.database.base.Database.getVersion(Database.java:143)
	at org.flywaydb.core.internal.database.base.Database.ensureDatabaseIsRecentEnough(Database.java:149)
	at org.flywaydb.core.internal.database.mysql.MySQLDatabase.ensureSupported(MySQLDatabase.java:242)
	at org.flywaydb.core.Flyway.execute(Flyway.java:495)
	at org.flywaydb.core.Flyway.migrate(Flyway.java:149)
	at org.springframework.boot.autoconfigure.flyway.FlywayMigrationInitializer.afterPropertiesSet(FlywayMigrationInitializer.java:65)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1855)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1792)
	... 26 common frames omitted
@nicholasfechner
Copy link
Contributor Author

@nicholasfechner nicholasfechner commented Jan 15, 2020

As a workaround, we have set the version string in the config: https://mariadb.com/kb/en/server-system-variables/#version

nicholasfechner added a commit to nicholasfechner/flyway that referenced this issue Jan 15, 2020
nicholasfechner added a commit to nicholasfechner/flyway that referenced this issue Jan 15, 2020
@nicholasfechner
Copy link
Contributor Author

@nicholasfechner nicholasfechner commented Jan 15, 2020

I've added a pull request with a potential fix: #2627

juliahayward added a commit that referenced this issue Jan 16, 2020
…nterprise

#2626 Support for MariaDB enterprise version numbering
@juliahayward
Copy link
Member

@juliahayward juliahayward commented Jan 16, 2020

That's great, thankyou!

@juliahayward juliahayward added this to the Flyway 6.2 milestone Jan 16, 2020
@juliahayward
Copy link
Member

@juliahayward juliahayward commented Jan 16, 2020

Will be released in 6.2 very shortly.

dohrayme pushed a commit to dohrayme/flyway that referenced this issue Feb 3, 2020
dohrayme pushed a commit to dohrayme/flyway that referenced this issue Feb 3, 2020
…a-db-enterprise

flyway#2626 Support for MariaDB enterprise version numbering
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants