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

Should add SCRAM client to vertx-sql-client dependency list #944

Closed
ghost opened this issue Apr 24, 2021 · 1 comment · May be fixed by #1481
Closed

Should add SCRAM client to vertx-sql-client dependency list #944

ghost opened this issue Apr 24, 2021 · 1 comment · May be fixed by #1481

Comments

@ghost
Copy link

ghost commented Apr 24, 2021

pg_hba.conf

host    all             all             192.168.20.72/32        scram-sha-256

Error Log

java.lang.NoClassDefFoundError: com/ongres/scram/common/stringprep/StringPreparation
        at io.vertx.pgclient.impl.codec.InitCommandCodec.handleAuthenticationSasl(InitCommandCodec.java:60)
        at io.vertx.pgclient.impl.codec.PgDecoder.decodeAuthentication(PgDecoder.java:357)
        at io.vertx.pgclient.impl.codec.PgDecoder.decodeMessage(PgDecoder.java:139)
        at io.vertx.pgclient.impl.codec.PgDecoder.channelRead(PgDecoder.java:111)
        at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:251)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
        at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
        at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919)
        at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166)
        at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:719)
        at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:655)
        at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:581)
        at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493)
        at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
        at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
        at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
        at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.ClassNotFoundException: com.ongres.scram.common.stringprep.StringPreparation
        at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
        at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
        ... 21 more

Solution: pom.xml

    <dependency>
      <groupId>com.ongres.scram</groupId>
      <artifactId>client</artifactId>
      <version>2.1</version>
    </dependency>
    <dependency>
      <groupId>io.vertx</groupId>
      <artifactId>vertx-pg-client</artifactId>
      <version>4.0.3</version>
    </dependency>
@ghost ghost added the enhancement label Apr 24, 2021
@ghost
Copy link
Author

ghost commented Apr 24, 2021

Sorry, It's my mistake.

https://github.com/eclipse-vertx/vertx-sql-client/blob/master/vertx-pg-client/pom.xml

    <!-- sasl scram authentication -->
    <dependency>
      <groupId>com.ongres.scram</groupId>
      <artifactId>client</artifactId>
      <version>2.1</version>
      <optional>true</optional>
    </dependency>

@ghost ghost closed this as completed Apr 24, 2021
julianladisch added a commit to julianladisch/vertx-sql-client that referenced this issue Jan 7, 2025
Remove `<optional>true</optional>` from com.ongres.scram:scram-client dependency.

Since PostgreSQL 14+ the default value for password_encryption is scram-sha-256.

Explain the migration from Vert.x 4 to Vert.x 5 in index.adoc - the client has been
changed from `client` to `scram-client`:
https://github.com/eclipse-vertx/vertx-sql-client/pull/1431/files

Fixes eclipse-vertx#944, eclipse-vertx#1059, eclipse-vertx#1189, eclipse-vertx#1249, eclipse-vertx#1266, eclipse-vertx#1398, eclipse-vertx#1466
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

0 participants