DTStack/chunjun

[Bug] [SqlserverDynamicTableFactory.java ] there is a bug in getDialect function, this function will init driver with Microsoft JDBC driver.

Open

#1,087 创建于 2022年7月24日

在 GitHub 查看
 (2 评论) (0 反应) (1 负责人)Java (3,752 star) (1,668 fork)batch import
buggood first issue

描述

Search before asking

  • I had searched in the issues and found no similar issues.

What happened

I am using sql job to get data from sqlserver. After config the job, I got error "No suitable driver found for jdbc:jtds:sqlserve".

After checking the init way of sqlserver-x, I found the getDialect function with some bugs.

    @Override
    protected JdbcDialect getDialect() {
        return new SqlserverDialect(); 
    }

What you expected to happen

this function should init SqlserverDialect with jtds driver base on config. for example:

       new SqlserverDialect(
                        jdbcConf.isWithNoLock(),
                        jdbcConf.getJdbcUrl().startsWith("jdbc:jtds:sqlserver"));

How to reproduce

just use a sql config for sqlserver

Anything else

No response

Version

1.12_release

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

贡献者指南

[Bug] [SqlserverDynamicTableFactory.java ] there is a bug in getDialect function, this function will init driver with Microsoft JDBC driver. · DTStack/chunjun#1087 | Good First Issue