Hello,
We are using Flyway
Enterprise 9.0.0 with the Flyway Maven Plugin and trying to use it with
MongoDB:
- Flyway Enterprise
Core (org.flywaydb.enterprise/flyway-core/9.0.0)
- Flyway Maven Plugin
(org.flywaydb.enterprise/flyway-maven-plugin/9.0.0)
- MongoDB
(org.flywaydb/flyway-database-mongodb/10.17.1).
Our project builds
fine, but when executing a Flyway Migrate we see the error:
[ERROR] Failed to execute goal
org.flywaydb.enterprise:flyway-maven-plugin:9.0.0:migrate (default-cli) on
project rental20_flyway_mongodb_testing: Execution default-cli of goal
org.flywaydb.enterprise:flyway-maven-plugin:9.0.0:migrate failed: An API
incompatibility was encountered while executing
org.flywaydb.enterprise:flyway-maven-plugin:9.0.0:migrate:
java.lang.UnsupportedClassVersionError: org/flywaydb/database/mongodb/MongoDBDatabaseType
has been compiled by a more recent version of the Java Runtime (class file
version 61.0), this version of the Java Runtime only recognizes class file
versions up to 52.0
Our build server is running Java 8.
Relevant
POM entries:
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<flyway.version>9.0.0</flyway.version>
<flyway.validateOnMigrate>false</flyway.validateOnMigrate>
<flyway.sqlMigrationPrefix>R1V</flyway.sqlMigrationPrefix>
<flyway.baselineOnMigrate>true</flyway.baselineOnMigrate>
<flyway.outOfOrder>true</flyway.outOfOrder>
<database.driver>com.dbschema.MongoJdbcDriver</database.driver>
<database.schema>userdb</database.schema>
</properties>
<dependencies>
<dependency>
<groupId>org.flywaydb</groupId>
<artifactId>flyway-database-mongodb</artifactId>
<version>10.17.1</version>
</dependency>
<dependency>
<groupId>org.flywaydb.enterprise</groupId>
<artifactId>flyway-core</artifactId>
<version>${flyway.version}</version>
</dependency>
<dependency>
<groupId>org.flywaydb.enterprise</groupId>
<artifactId>flyway-maven-plugin</artifactId>
<version>${flyway.version}</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.flywaydb.enterprise</groupId>
<artifactId>flyway-maven-plugin</artifactId>
<version>${flyway.version}</version>
<configuration>
<driver>${database.driver}</driver>
<schemas>
<schema>${database.schema}</schema>
</schemas>
</configuration>
</plugin>
</plugins>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
</build>
Hello,
We are using Flyway Enterprise 9.0.0 with the Flyway Maven Plugin and trying to use it with MongoDB:
Our project builds fine, but when executing a Flyway Migrate we see the error:
[ERROR] Failed to execute goal org.flywaydb.enterprise:flyway-maven-plugin:9.0.0:migrate (default-cli) on project rental20_flyway_mongodb_testing: Execution default-cli of goal org.flywaydb.enterprise:flyway-maven-plugin:9.0.0:migrate failed: An API incompatibility was encountered while executing org.flywaydb.enterprise:flyway-maven-plugin:9.0.0:migrate: java.lang.UnsupportedClassVersionError: org/flywaydb/database/mongodb/MongoDBDatabaseType has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 52.0
Our build server is running Java 8.
Relevant POM entries: