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

Postgres 插件方式运行 Failed to bind properties under 'db.pool.config' to com.zaxxer.hikari.HikariDataSource #29

Open
renjiangyang opened this issue Sep 14, 2023 · 2 comments

Comments

@renjiangyang
Copy link

renjiangyang commented Sep 14, 2023

版本: nacos-server v2.2.1

参考 https://github.com/wuchubuzai2018/nacos-datasource-extend-plugins
测试windows/linux 基于官方的pg配置都可以使用, 但是制作成的nacos镜像始终在报错,配置如下

nacos.core.auth.system.type=nacos
nacos.core.auth.enabled=true 
nacos.core.auth.plugin.nacos.token.secret.key=SecretKey012345678901234567890123456789012345678901234567890123456789
nacos.core.auth.server.identity.key=test
nacos.core.auth.server.identity.value=test

spring.datasource.platform=postgresql
db.url.0=jdbc:postgresql://xxx:xxx/xxx?tcpKeepAlive=true&reWriteBatchedInserts=true&ApplicationName=nacos_java
db.num=1
db.user=postgres
db.password=123456
db.pool.config.driverClassName=org.postgresql.Driver
2023-09-14 03:24:22,306 ERROR

***************************
APPLICATION FAILED TO START
***************************

Description:


Failed to bind properties under 'db.pool.config' to com.zaxxer.hikari.HikariDataSource:

    Property: db.pool.config.driver-class-name
    Value: "org.postgresql.Driver"
    Origin: InputStream resource [resource loaded through InputStream] - 284:32
    Reason: java.lang.RuntimeException: Failed to load driver class org.postgresql.Driver in either of HikariConfig class loader or Thread context classloader

Action:

Update your application's configuration


2023-09-14 03:24:22,308 WARN [ThreadPoolManager] Start destroying ThreadPool

2023-09-14 03:24:22,308 WARN [ThreadPoolManager] Destruction of the end

image
image
image
image

参考 issues 做过一些排查发现没用 wuchubuzai2018/nacos-datasource-extend-plugins#2
目前是否有相关的解决方案?

@renjiangyang renjiangyang changed the title Failed to bind properties under 'db.pool.config' to com.zaxxer.hikari.HikariDataSource Postgres 插件方式运行 Failed to bind properties under 'db.pool.config' to com.zaxxer.hikari.HikariDataSource Sep 14, 2023
@renjiangyang
Copy link
Author

由于目前还未了解插件的实现原理, 尝试在nacos-server中增加postgres的驱动源, 仍无法运行, 可能存在隔离机制

@one-two-my-gad
Copy link

由于目前尚未了解插件的实现原理,尝试在nacos-server中增加postgres的驱动源,仍无法运行,可能存在隔离机制
您好 想咨询下现在有解决么

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

No branches or pull requests

2 participants