I was trying to connect to daml sandbox using DamlLedgerClient.
DamlLedgerClient client = DamlLedgerClient.newBuilder(host,port).build();
But getting following error:
Exception in thread "main" java.lang.NoSuchMethodError: com.google.common.base.Preconditions.checkArgument(ZLjava/lang/String;CLjava/lang/Object;)V
at io.grpc.Metadata$Key.validateName(Metadata.java:629)
at io.grpc.Metadata$Key.<init>(Metadata.java:637)
at io.grpc.Metadata$Key.<init>(Metadata.java:567)
at io.grpc.Metadata$AsciiKey.<init>(Metadata.java:742)
at io.grpc.Metadata$AsciiKey.<init>(Metadata.java:737)
at io.grpc.Metadata$Key.of(Metadata.java:593)
at io.grpc.Metadata$Key.of(Metadata.java:589)
at io.grpc.internal.GrpcUtil.<clinit>(GrpcUtil.java:86)
at io.grpc.internal.AbstractManagedChannelImplBuilder.<clinit>(AbstractManagedChannelImplBuilder.java:84)
at com.daml.ledger.rxjava.DamlLedgerClient.newBuilder(DamlLedgerClient.java:80)
In my pom.xml file I am using following dependancy:
<dependency>
<groupId>com.daml</groupId>
<artifactId>bindings-rxjava</artifactId>
<version>1.6.0</version>
</dependency>
<dependency>
<groupId>com.daml</groupId>
<artifactId>daml-lf-1.8-archive-java-proto</artifactId>
<version>1.6.0</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.2.3</version>
</dependency>