【问题标题】:Getting Oracle 11.2 Unsupported Error when using Spring Cloud Data Flow 2.0.1使用 Spring Cloud Data Flow 2.0.1 时出现 Oracle 11.2 不支持的错误
【发布时间】:2019-08-19 08:35:55
【问题描述】:

我正在尝试设置 SCDF 2.x (Spring Cloud Data Flow) 服务器,以注册 Spring Boot 应用程序(例如任务类型),以利用开箱即用的管理和其他功能。

在设置 SCDF 2.x 时,试图连接到 Oracle 11.2 上的新 'dataflow' 架构(用于作业注册表),但在从命令行启动 dataflow 服务器时(在类路径中使用 Oracle JDBC),得到以下错误。任何建议都将有助于解决(因为我们与 Oracle 绑定为企业支持。

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.internal.license.FlywayEnterpriseUpgradeRequiredException: Flyway Enterprise Edition or Oracle upgrade required: Oracle 11.2 is past regular support by Oracle and no longer supported by Flyway Community Edition, but still supported by Flyway Enterprise Edition. at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1762) ~[spring-beans-5.1.5.RELEASE.jar:5.1.5.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:593) ~[spring-beans-5.1.5.RELEASE.jar:5.1.5.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515) ~[spring-beans-5.1.5.RELEASE.jar:5.1.5.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320) ~[spring-beans-5.1.5.RELEASE.jar:5.1.5.RELEASE] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.1.5.RELEASE.jar:5.1.5.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318) ~[spring-beans-5.1.5.RELEASE.jar:5.1.5.RELEASE]

我们的 oracle 版本是 11.2

尝试在项目 pom 中覆盖 flyway 依赖,但小于 5.x 是给NoMethodFoundError

【问题讨论】:

  • 请有人可以提出任何建议,包括 Spring 开发人员,因为这是我们迁移到 Spring Cloud Dataflow 的主要障碍
  • 你找到解决这个问题的办法了吗?

标签: spring-cloud spring-cloud-task


【解决方案1】:

最后我在这个问题上取得了进展,在我的情况下,删除飞行路径自动配置并加载一个名为 FluentConfiguration 的 bean 就足够了。我已经用 spring cloud dataflow 的依赖项创建了一个项目,然后使用此配置创建了一个 SpringBootApplication 类:

import org.flywaydb.core.api.configuration.FluentConfiguration;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration;
import org.springframework.cloud.dataflow.server.EnableDataFlowServer;
import org.springframework.context.annotation.Import;

@SpringBootApplication(exclude = FlywayAutoConfiguration.class)
@EnableDataFlowServer
@Import(FluentConfiguration.class)
public class MyCompanySpringCloudDataflowApplication {

    public static void main(String[] args) {
        SpringApplication.run(MyCompanySpringCloudDataflowApplication .class, args);
    }

}

我知道这不是一个巧妙的解决方案,但这是我需要推进的。

当然,数据库架构不会自动创建,您必须在运行应用程序之前创建它。

希望对你有所帮助。

【讨论】:

猜你喜欢
  • 2023-03-24
  • 2021-11-26
  • 2018-07-17
  • 2017-02-08
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多