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

driver fails to initialize when running as a bundle in an OSGi environment #25328

Open
zyanbingchn opened this issue Apr 10, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@zyanbingchn
Copy link

zyanbingchn commented Apr 10, 2024

Bug Description
在正常的Java程序中使用taos的JDBC驱动没有问题。
但是在OSGI环境下,以Bundle形式运行的程序中,taos的JDBC驱动在类加载的过程中失败。

原因分析:
在AbstractDatabaseMetaData初始化过程中,要读取jar包根目录下的taos-jdbc-version.properties文件,
在OSGI环境下调试变量值如下,导致if分支无法进入:
屏幕截图 2024-04-10 173029

最终报错:
屏幕截图 2024-04-10 172818

请看看是否可以调整读取配置文件的方式,可以同时支持OSGI Bundle运行场景。

JDBC驱动:
com.taosdata.jdbc
taos-jdbcdriver
3.2.9

TDengine版本:3.2.3.0

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Type in '....'
  3. See error

Expected Behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

  • OS: [e.g. CentOS 7.0]
  • Memory, CPU, current Disk Space
  • TDengine Version [3.2.3.0]

Additional Context
Add any other context about the problem here.

@zyanbingchn zyanbingchn added the bug Something isn't working label Apr 10, 2024
@danielclow danielclow changed the title 在OSGI环境下以Bundle形式运行中的程序中,驱动程序初始化时报错 driver fails to initialize when running as a bundle in an OSGi environment Apr 26, 2024
@yu285
Copy link
Contributor

yu285 commented May 6, 2024

我们看下

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants