使用Quarkus与Vert.x JDBC客户端连接到Sybase时遇到问题

发布于 2025-02-01 18:04:49 字数 1078 浏览 2 评论 0原文

最后,我开始将一些整体代码迁移到Quarkus/vert.x反应性服务。

我开始简单地使用与Exting DB连接的小型服务。目前,我们的数据库是Sybase(ASA,是一个关系的智商,这是基于列的DB)。

我正在尝试与Vert.x Reactive JDBC客户端合作,我了解这对所有支持DBS的JDBC都是一般的(因为Quarkus内置了反应性JDBC不支持Sybase)。 到目前为止,我一直没有运气,但是当对数据库执行查询时,只有在表中有数据时,我会收到以下错误:

java.lang.AbstractMethodError: Receiver class com.sybase.jdbc3.jdbc.SybResultSet does not define or inherit an implementation of the resolved method 'abstract java.lang.Object getObject(int, java.lang.Class)' of interface java.sql.ResultSet.
    at com.mchange.v2.c3p0.impl.NewProxyResultSet.getObject(NewProxyResultSet.java:217)
    at io.vertx.ext.jdbc.spi.impl.JDBCDecoderImpl.lambda$parse$0(JDBCDecoderImpl.java:60)

搜索此错误并没有太大帮助。 请注意,我绝不形成我refer的任何堆栈中的专家。这几乎是我在这类事情中的第一次尝试。 感谢有关此事的任何帮助... 谢谢!

顺便说一句,我在Quarkus项目中相关的Gradle依赖项是:

    implementation 'io.vertx:vertx-jdbc-client'
implementation 'io.agroal:agroal-pool:1.16'
implementation files('lib/jconn3.jar')

我在Quarkus服务中注入Vert.x,并使用它来创建连接池。 另外,我尝试了Vert.x JDBC客户端批准(SQLClient和JDBC客户端),并且它们最终都在同一例外

finally I am starting to migrate some monolith code to quarkus/vert.x reactive services.

I am starting simple with a small service connecting to an exsiting DB. our DB currently is sybase (asa which is a relational one and IQ which is a column based DB).

I am trying to work with vert.x reactive jdbc client which I understand is generic to all jdbc supporting DBs (as quarkus built in reactive jdbc does not support sybase).
no luck until now, I mange to get a connection but when executing a query against the DB and ONLY if there is data in the table I get the following error:

java.lang.AbstractMethodError: Receiver class com.sybase.jdbc3.jdbc.SybResultSet does not define or inherit an implementation of the resolved method 'abstract java.lang.Object getObject(int, java.lang.Class)' of interface java.sql.ResultSet.
    at com.mchange.v2.c3p0.impl.NewProxyResultSet.getObject(NewProxyResultSet.java:217)
    at io.vertx.ext.jdbc.spi.impl.JDBCDecoderImpl.lambda$parse$0(JDBCDecoderImpl.java:60)

googling this error did not help much.
please note I am in no way shape of form an expert in any of the stacks I reffer to. this is almost my first try in these type of things.
I would appreciate any help regarding this matter...
thanks!

BTW, my related gradle dependencies in my quarkus projects are:

    implementation 'io.vertx:vertx-jdbc-client'
implementation 'io.agroal:agroal-pool:1.16'
implementation files('lib/jconn3.jar')

I inject vert.x in my quarkus service and use it to create the connection pool.
Also, I tried both vert.x jdbc client approches (sqlclient and jdbc client) and they both end up in the same exception

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

天荒地未老 2025-02-08 18:04:49

似乎从JCONN3驱动程序升级到JCONN4驱动程序,并且仅使用JDBC客户端方法(现已脱颖而出)对我有用...
谢谢

更新:有一个JCONN42.JAR驱动程序,该驱动程序是JDBC4.2实现。
logutils类内部调用JBOSS记录系统不允许使用的方法,因此Quarkus/Wildfly将使用此较新驱动程序立即失败。

方法调用是“ logger.setparent(sybdriver.getlogger());'在JBOSS日志记录系统中,它引发了一个安全例外...

分解并评论了有问题的行后,该驱动程序将起作用,但仅使用Legacy JDBCCLIENT abreach,而不是新的SQL客户端方法...
希望这将帮助某些人坚持使用Sybase数据库...

it seems like upgrade from jconn3 driver to jconn4 driver AND only using the jdbc client approach (now depracated) worked for me...
thanks

update: there's a jconn42.jar driver which is a jdbc4.2 implementation.
the LogUtils class inside calls a method that is not allowed by the jboss logging system so quarkus/wildfly will fail right away using this newer driver.

the method call is to 'logger.setParent(SybDriver.getLogger());' and in the jboss logging system it throws a security exception...

after decompiling and commenting out the problematic line the driver will work but still, only with the legacy jdbcclient aproach and not the new sql client approach...
hope this will help some people stuck with sybase databases...

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文