ydb-java-sdk icon indicating copy to clipboard operation
ydb-java-sdk copied to clipboard

How to use JDBC driver in IDEA

Open vladd11 opened this issue 2 years ago • 0 comments

Hello. I want to use YDB (serverless) console inside IntelliJ IDEA so I added new driver (ydb-sdk-jdbc-uberjar-1.8.0.jar) there and select "com.yandex.ydb.jdbc.YdbDriver" class.

I take IAM token: yc iam create-token > token.txt

Then I create new data source with this URL: jdbc:ydb:ydb.serverless.yandexcloud.net:2135?database=/ru-central1/b1gnjh1pn5tbeqdb2lqt/etn4ge82u3bfv9qldrbk&token=~/token.txt

And I receive this:

[401050] Error{message=cannot acquire session from pool, cause=java.util.concurrent.CompletionException: com.yandex.ydb.core.UnexpectedResultException: cannot create session, code: TRANSPORT_UNAVAILABLE, issues: [gRPC error: (UNAVAILABLE) Network closed for unknown reason (S_ERROR)]}.

vladd11 avatar May 03 '22 11:05 vladd11