gpt4 book ai didi

java - Spring boot 应用程序错误日志显示尝试在 FanManager 中配置 ONS 失败,并出现 oracle.ons.NoServersAvailable

转载 作者:行者123 更新时间:2023-11-30 05:24:47 25 4
gpt4 key购买 nike

我正在使用 spring-boot-starter-jdbccom.oracle.ojdbc:ojdbc8 运行 Spring Boot 应用程序 (v2.2.0-RELEASE) :19.3.0.0 驱动程序。

当我尝试使用 JdbcTemplate 查询数据库时,我在控制台日志中看到以下错误:

2019-11-15 14:07:51.154 ERROR 23436 --- [main] oracle.simplefan.FanManager: attempt to configure ONS in FanManager failed with oracle.ons.NoServersAvailable: Subscription time out

即使数据库连接成功且查询结果正确,我也不知道为什么会看到此错误。

有什么办法可以消除这个错误或者直接忽略吗?

最佳答案

您可以在启动应用程序时设置系统属性:

-Doracle.jdbc.fanEnabled=false

或者从类路径中删除 simplefan 和ons jar。对于 Maven,它可能看起来像这样:

<dependency>
<groupId>com.oracle.database.jdbc</groupId>
<artifactId>ojdbc10</artifactId>
<version>${oracle.version}</version>
<exclusions>
<exclusion>
<groupId>com.oracle.database.ha</groupId>
<artifactId>simplefan</artifactId>
</exclusion>
<exclusion>
<groupId>com.oracle.database.ha</groupId>
<artifactId>ons</artifactId>
</exclusion>
</exclusions>
</dependency>

更多详细信息请参见Section 29.3 of the Oracle's JDBC Developer's guide “安装和配置 Oracle JDBC 驱动程序以支持 FAN 事件”。

关于java - Spring boot 应用程序错误日志显示尝试在 FanManager 中配置 ONS 失败,并出现 oracle.ons.NoServersAvailable,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58873384/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com