Skip to content
Discussions/App Development/Java Binding: RunTime Exception, Uncaught exception in the SynchronizationContext. Panic!Forum ↗

Java Binding: RunTime Exception, Uncaught exception in the SynchronizationContext. Panic!

App Development21 posts3,649 views24 likesLast activity Jun 2021
TE
tejashree_parabOP
Jun 2021

I was trying to access the Daml ledger from the Java maven service (MVC pattern).
Whenever we hit the request from the postman the exception occurs as shown in below stack trace.

Any suggestions?

[ERROR] [Channel<1>: (localhost:7600)] Uncaught exception in the SynchronizationContext. Panic!
java.lang.NoSuchMethodError: io.netty.buffer.PooledByteBufAllocator.<init>(ZIIIIIIZ)V
	at io.grpc.netty.Utils.createByteBufAllocator(Utils.java:172)
	at io.grpc.netty.Utils.access$000(Utils.java:71)
	at io.grpc.netty.Utils$ByteBufAllocatorPreferDirectHolder.<clinit>(Utils.java:93)
	at io.grpc.netty.Utils.getByteBufAllocator(Utils.java:140)
	at io.grpc.netty.NettyClientTransport.start(NettyClientTransport.java:245)
	at io.grpc.internal.ForwardingConnectionClientTransport.start(ForwardingConnectionClientTransport.java:33)
	at io.grpc.internal.ForwardingConnectionClientTransport.start(ForwardingConnectionClientTransport.java:33)
	at io.grpc.internal.InternalSubchannel.startNewTransport(InternalSubchannel.java:258)
	at io.grpc.internal.InternalSubchannel.access$400(InternalSubchannel.java:65)
	at io.grpc.internal.InternalSubchannel$2.run(InternalSubchannel.java:200)
	at io.grpc.SynchronizationContext.drain(SynchronizationContext.java:95)
	at io.grpc.SynchronizationContext.execute(SynchronizationContext.java:127)
	at io.grpc.internal.ManagedChannelImpl$NameResolverListener.onResult(ManagedChannelImpl.java:1790)
	at io.grpc.internal.DnsNameResolver$Resolve.run(DnsNameResolver.java:333)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
io.grpc.StatusRuntimeException: INTERNAL: Panic! This is a bug!
	at io.grpc.stub.ClientCalls.toStatusRuntimeException(ClientCalls.java:262)
	at io.grpc.stub.ClientCalls.getUnchecked(ClientCalls.java:243)
	at io.grpc.stub.ClientCalls.blockingUnaryCall(ClientCalls.java:156)
	at com.daml.ledger.api.v1.PackageServiceGrpc$PackageServiceBlockingStub.listPackages(PackageServiceGrpc.java:323)
	at com.blockchain.daml.utilities.DetectData.detectPackageId(DetectData.java:35)
	at com.blockchain.daml.serviceImpl.InvitationServiceImpl.invitation(InvitationServiceImpl.java:93)
	at com.blockchain.daml.controllers.InvitationController.invitation(InvitationController.java:30)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:209)
	at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:136)
	at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:102)
	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:891)
	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:797)
	at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:991)
	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:925)
	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:974)
	at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:877)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:661)
	at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:851)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:109)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:93)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:493)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:800)
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:806)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1498)
	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NoSuchMethodError: io.netty.buffer.PooledByteBufAllocator.<init>(ZIIIIIIZ)V
	at io.grpc.netty.Utils.createByteBufAllocator(Utils.java:172)
	at io.grpc.netty.Utils.access$000(Utils.java:71)
	at io.grpc.netty.Utils$ByteBufAllocatorPreferDirectHolder.<clinit>(Utils.java:93)
	at io.grpc.netty.Utils.getByteBufAllocator(Utils.java:140)
	at io.grpc.netty.NettyClientTransport.start(NettyClientTransport.java:245)
	at io.grpc.internal.ForwardingConnectionClientTransport.start(ForwardingConnectionClientTransport.java:33)
	at io.grpc.internal.ForwardingConnectionClientTransport.start(ForwardingConnectionClientTransport.java:33)
	at io.grpc.internal.InternalSubchannel.startNewTransport(InternalSubchannel.java:258)
	at io.grpc.internal.InternalSubchannel.access$400(InternalSubchannel.java:65)
	at io.grpc.internal.InternalSubchannel$2.run(InternalSubchannel.java:200)
	at io.grpc.SynchronizationContext.drain(SynchronizationContext.java:95)
	at io.grpc.SynchronizationContext.execute(SynchronizationContext.java:127)
	at io.grpc.internal.ManagedChannelImpl$NameResolverListener.onResult(ManagedChannelImpl.java:1790)
	at io.grpc.internal.DnsNameResolver$Resolve.run(DnsNameResolver.java:333)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	... 1 more
BE
bernhard
Jun 2021

My best guess is that you ended up with two versions. of the netty dependency in your project, and the one needed by the Daml bindings is being shaded.

If your project is a maven project, you can use mvn dependency:tree to output all dependencies of your project. Search for netty within that and see whether any non-Daml dependency is pulling in a different version of netty to the one Daml pulls in. If so, you’ll need to change some versions or use manual shading to resolve the dependency clash.

TE
tejashree_parab
Jun 2021

The only Daml related netty is available in the dependency section, which comes from the library

com.daml:bindings-rxjava:jar:1.13.1:compile

Java version: 1.8
Daml sdk: 1.13.1

BE
bernhard
Jun 2021

Are there no other netty dependencies? Eg by Spring which you seem to be using?

BE
bernhard
Jun 2021

If there’s nothing sensitive in there, you could just post the output of mvn dependency:tree here.

TE
tejashree_parab
Jun 2021

o/p of mvn dependency: tree

[INFO] --- maven-dependency-plugin:3.1.1:tree (default-cli) @ Blockchain-DAML-App ---
[INFO] com.blockchain.daml:Blockchain-DAML-App:jar:0.0.1-SNAPSHOT
[INFO] +- org.springframework.boot:spring-boot-starter-web:jar:2.0.5.RELEASE:compile
[INFO] |  +- org.springframework.boot:spring-boot-starter-json:jar:2.0.5.RELEASE:compile
[INFO] |  |  +- com.fasterxml.jackson.core:jackson-databind:jar:2.9.6:compile
[INFO] |  |  |  +- com.fasterxml.jackson.core:jackson-annotations:jar:2.9.0:compile
[INFO] |  |  |  \- com.fasterxml.jackson.core:jackson-core:jar:2.9.6:compile
[INFO] |  |  +- com.fasterxml.jackson.datatype:jackson-datatype-jdk8:jar:2.9.6:compile
[INFO] |  |  +- com.fasterxml.jackson.datatype:jackson-datatype-jsr310:jar:2.9.6:compile
[INFO] |  |  \- com.fasterxml.jackson.module:jackson-module-parameter-names:jar:2.9.6:compile
[INFO] |  +- org.springframework.boot:spring-boot-starter-tomcat:jar:2.0.5.RELEASE:compile
[INFO] |  |  +- org.apache.tomcat.embed:tomcat-embed-core:jar:8.5.34:compile
[INFO] |  |  +- org.apache.tomcat.embed:tomcat-embed-el:jar:8.5.34:compile
[INFO] |  |  \- org.apache.tomcat.embed:tomcat-embed-websocket:jar:8.5.34:compile
[INFO] |  +- org.hibernate.validator:hibernate-validator:jar:6.0.12.Final:compile
[INFO] |  |  +- javax.validation:validation-api:jar:2.0.1.Final:compile
[INFO] |  |  +- org.jboss.logging:jboss-logging:jar:3.3.2.Final:compile
[INFO] |  |  \- com.fasterxml:classmate:jar:1.3.4:compile
[INFO] |  +- org.springframework:spring-web:jar:5.0.9.RELEASE:compile
[INFO] |  \- org.springframework:spring-webmvc:jar:5.0.9.RELEASE:compile
[INFO] |     \- org.springframework:spring-expression:jar:5.0.9.RELEASE:compile
[INFO] +- org.springframework.boot:spring-boot-starter:jar:2.0.5.RELEASE:compile
[INFO] |  +- org.springframework.boot:spring-boot:jar:2.0.5.RELEASE:compile
[INFO] |  +- org.springframework.boot:spring-boot-autoconfigure:jar:2.0.5.RELEASE:compile
[INFO] |  +- org.springframework.boot:spring-boot-starter-logging:jar:2.0.5.RELEASE:compile
[INFO] |  |  +- org.apache.logging.log4j:log4j-to-slf4j:jar:2.10.0:compile
[INFO] |  |  |  \- org.apache.logging.log4j:log4j-api:jar:2.10.0:compile
[INFO] |  |  \- org.slf4j:jul-to-slf4j:jar:1.7.25:compile
[INFO] |  +- javax.annotation:javax.annotation-api:jar:1.3.2:compile
[INFO] |  +- org.springframework:spring-core:jar:5.0.9.RELEASE:compile
[INFO] |  |  \- org.springframework:spring-jcl:jar:5.0.9.RELEASE:compile
[INFO] |  \- org.yaml:snakeyaml:jar:1.19:runtime
[INFO] +- com.daml:codegen-java:jar:1.13.1:compile
[INFO] +- com.daml:bindings-rxjava:jar:1.13.1:compile
[INFO] |  +- com.daml:bindings-java:jar:1.13.1:compile
[INFO] |  |  +- com.google.code.findbugs:jsr305:jar:3.0.2:compile
[INFO] |  |  \- com.google.guava:guava:jar:29.0-jre:compile
[INFO] |  |     +- com.google.guava:failureaccess:jar:1.0.1:compile
[INFO] |  |     +- com.google.guava:listenablefuture:jar:9999.0-empty-to-avoid-conflict-with-guava:compile
[INFO] |  |     +- org.checkerframework:checker-qual:jar:2.11.1:compile
[INFO] |  |     \- com.google.j2objc:j2objc-annotations:jar:1.3:compile
[INFO] |  +- com.daml:ledger-api-auth-client:jar:1.13.1:compile
[INFO] |  +- com.daml:rs-grpc-bridge:jar:1.13.1:compile
[INFO] |  |  \- org.reactivestreams:reactive-streams:jar:1.0.2:compile
[INFO] |  +- com.google.api.grpc:proto-google-common-protos:jar:2.0.1:compile
[INFO] |  +- com.google.protobuf:protobuf-java:jar:3.14.0:compile
[INFO] |  +- io.grpc:grpc-api:jar:1.35.0:compile
[INFO] |  |  +- io.grpc:grpc-context:jar:1.35.0:compile
[INFO] |  |  +- com.google.errorprone:error_prone_annotations:jar:2.4.0:compile
[INFO] |  |  \- org.codehaus.mojo:animal-sniffer-annotations:jar:1.19:runtime
[INFO] |  +- io.grpc:grpc-core:jar:1.35.0:compile
[INFO] |  |  +- com.google.code.gson:gson:jar:2.8.5:runtime
[INFO] |  |  +- com.google.android:annotations:jar:4.1.1.4:runtime
[INFO] |  |  \- io.perfmark:perfmark-api:jar:0.23.0:runtime
[INFO] |  +- io.grpc:grpc-netty:jar:1.35.0:compile
[INFO] |  |  +- io.netty:netty-codec-http2:jar:4.1.29.Final:compile
[INFO] |  |  |  \- io.netty:netty-codec-http:jar:4.1.29.Final:compile
[INFO] |  |  \- io.netty:netty-handler-proxy:jar:4.1.29.Final:runtime
[INFO] |  |     \- io.netty:netty-codec-socks:jar:4.1.29.Final:runtime
[INFO] |  +- io.grpc:grpc-protobuf:jar:1.35.0:compile
[INFO] |  |  \- io.grpc:grpc-protobuf-lite:jar:1.35.0:compile
[INFO] |  +- io.grpc:grpc-stub:jar:1.35.0:compile
[INFO] |  +- io.netty:netty-handler:jar:4.1.29.Final:compile
[INFO] |  |  +- io.netty:netty-buffer:jar:4.1.29.Final:compile
[INFO] |  |  |  \- io.netty:netty-common:jar:4.1.29.Final:compile
[INFO] |  |  +- io.netty:netty-transport:jar:4.1.29.Final:compile
[INFO] |  |  |  \- io.netty:netty-resolver:jar:4.1.29.Final:compile
[INFO] |  |  \- io.netty:netty-codec:jar:4.1.29.Final:compile
[INFO] |  +- io.reactivex.rxjava2:rxjava:jar:2.1.17:compile
[INFO] |  +- org.checkerframework:checker:jar:2.5.4:compile
[INFO] |  +- org.pcollections:pcollections:jar:2.1.3:compile
[INFO] |  \- org.slf4j:slf4j-api:jar:1.7.25:compile
[INFO] +- com.daml:daml-lf-1.8-archive-java-proto:jar:1.13.1:compile
[INFO] +- ch.qos.logback:logback-classic:jar:1.2.3:compile
[INFO] |  \- ch.qos.logback:logback-core:jar:1.2.3:compile
[INFO] +- com.sparkjava:spark-core:jar:2.7.2:compile
[INFO] |  +- org.eclipse.jetty:jetty-server:jar:9.4.12.v20180830:compile
[INFO] |  |  +- javax.servlet:javax.servlet-api:jar:3.1.0:compile
[INFO] |  |  +- org.eclipse.jetty:jetty-http:jar:9.4.12.v20180830:compile
[INFO] |  |  |  \- org.eclipse.jetty:jetty-util:jar:9.4.12.v20180830:compile
[INFO] |  |  \- org.eclipse.jetty:jetty-io:jar:9.4.12.v20180830:compile
[INFO] |  +- org.eclipse.jetty:jetty-webapp:jar:9.4.12.v20180830:compile
[INFO] |  |  +- org.eclipse.jetty:jetty-xml:jar:9.4.12.v20180830:compile
[INFO] |  |  \- org.eclipse.jetty:jetty-servlet:jar:9.4.12.v20180830:compile
[INFO] |  |     \- org.eclipse.jetty:jetty-security:jar:9.4.12.v20180830:compile
[INFO] |  +- org.eclipse.jetty.websocket:websocket-server:jar:9.4.12.v20180830:compile
[INFO] |  |  +- org.eclipse.jetty.websocket:websocket-common:jar:9.4.12.v20180830:compile
[INFO] |  |  \- org.eclipse.jetty.websocket:websocket-client:jar:9.4.12.v20180830:compile
[INFO] |  |     \- org.eclipse.jetty:jetty-client:jar:9.4.12.v20180830:compile
[INFO] |  \- org.eclipse.jetty.websocket:websocket-servlet:jar:9.4.12.v20180830:compile
[INFO] |     \- org.eclipse.jetty.websocket:websocket-api:jar:9.4.12.v20180830:compile
[INFO] +- com.googlecode.json-simple:json-simple:jar:1.1.1:compile
[INFO] +- org.springframework.plugin:spring-plugin-core:jar:2.0.0.RELEASE:compile
[INFO] |  +- org.springframework:spring-beans:jar:5.0.9.RELEASE:compile
[INFO] |  +- org.springframework:spring-context:jar:5.0.9.RELEASE:compile
[INFO] |  \- org.springframework:spring-aop:jar:5.0.9.RELEASE:compile
[INFO] +- junit:junit:jar:4.13.1:test
[INFO] |  \- org.hamcrest:hamcrest-core:jar:1.3:test
[INFO] \- org.apache.tomcat:tomcat-catalina:jar:10.0.6:compile
[INFO]    +- org.apache.tomcat:tomcat-servlet-api:jar:10.0.6:compile
[INFO]    +- org.apache.tomcat:tomcat-jsp-api:jar:8.5.34:compile
[INFO]    |  \- org.apache.tomcat:tomcat-el-api:jar:8.5.34:compile
[INFO]    +- org.apache.tomcat:tomcat-juli:jar:10.0.6:compile
[INFO]    +- org.apache.tomcat:tomcat-annotations-api:jar:8.5.34:compile
[INFO]    +- org.apache.tomcat:tomcat-api:jar:10.0.6:compile
[INFO]    +- org.apache.tomcat:tomcat-jni:jar:10.0.6:compile
[INFO]    +- org.apache.tomcat:tomcat-coyote:jar:10.0.6:compile
[INFO]    +- org.apache.tomcat:tomcat-util:jar:10.0.6:compile
[INFO]    +- org.apache.tomcat:tomcat-util-scan:jar:10.0.6:compile
[INFO]    \- org.apache.tomcat:tomcat-jaspic-api:jar:10.0.6:compile
BE
bernhard
Jun 2021

Hmm, that refutes my initial hypothesis, but I’m surprised by the versions there. You have ended up with netty 4.1.29, not 4.1.52 which GRPC 1.35.0 expects (see Maven Central Repository Search). I feel like I’ve seen that issue once before and it was down to a maven dependency resolution oddity, but I can’t recall what caused it…

BE
bernhard
Jun 2021

What version of maven are you running?

BE
bernhard
Jun 2021

One thing you could maybe try is to force maven’s hand. Add this before your dependencies block in pom.xml:

      <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>io.netty</groupId>
                <artifactId>netty-codec-http2</artifactId>
                <version>4.1.52.Final</version>
                <scope>compile</scope>
            </dependency>
            <dependency>
                <groupId>io.netty</groupId>
                <artifactId>netty-handler-proxy</artifactId>
                <version>4.1.52.Final</version>
                <scope>compile</scope>
            </dependency>
            <dependency>
                <groupId>io.netty</groupId>
                <artifactId>netty-handler</artifactId>
                <version>4.1.58.Final</version>
                <scope>compile</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

Not much of a solution as it’ll need manual maintenance, but at least it’ll confirm that the netty version resolution is the problem.

TE
tejashree_parab
Jun 2021

I tried your above solution and the version were corrected as you mentioned but still, problem exists

pom.xml

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>
	<parent>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-starter-parent</artifactId>
		<version>2.0.5.RELEASE</version>
		<relativePath/> <!-- lookup parent from repository -->
	</parent>
	<groupId>com.blockchain.daml</groupId>
	<artifactId>Blockchain-DAML-App</artifactId>
	<version>0.0.1-SNAPSHOT</version>
	<name>Blockchain-DAML-Application</name>
	<description>Demo project for Blockchain-DAML-App</description>
	<properties>
		<java.version>1.8</java.version>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<maven.compiler.source>1.8</maven.compiler.source>
		<maven.compiler.target>1.8</maven.compiler.target>
		<!--<sdk-version>1.9.0</sdk-version>-->
		<sdk-version>1.13.1</sdk-version>
		<daml-plugin.version>0.1.5</daml-plugin.version>
		<junit.version>4.13.1</junit.version>
	</properties>

	<dependencies>

		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-web</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter</artifactId>
		</dependency>
		<dependency>
			<groupId>com.daml</groupId>
			<artifactId>codegen-java</artifactId>
			<version>${sdk-version}</version>
		</dependency>
		<dependency>
			<groupId>com.daml</groupId>
			<artifactId>bindings-rxjava</artifactId>
			<version>${sdk-version}</version>
		</dependency>
		<dependency>
			<groupId>com.daml</groupId>
			<artifactId>daml-lf-1.8-archive-java-proto</artifactId>
			<version>${sdk-version}</version>
		</dependency>
		<dependency>
			<groupId>ch.qos.logback</groupId>
			<artifactId>logback-classic</artifactId>
			<version>1.2.3</version>
		</dependency>
		<dependency>
			<groupId>com.sparkjava</groupId>
			<artifactId>spark-core</artifactId>
			<version>2.7.2</version>
		</dependency>
		<dependency>
			<groupId>com.googlecode.json-simple</groupId>
			<artifactId>json-simple</artifactId>
			<version>1.1.1</version>
		</dependency>
		<dependency>
			<groupId>org.springframework.plugin</groupId>
			<artifactId>spring-plugin-core</artifactId>
			<version>2.0.0.RELEASE</version>
		</dependency>
		<!-- https://mvnrepository.com/artifact/junit/junit -->
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>${junit.version}</version>
			<scope>test</scope>
		</dependency>
		<!-- https://mvnrepository.com/artifact/org.apache.tomcat/tomcat-catalina -->
		<dependency>
			<groupId>org.apache.tomcat</groupId>
			<artifactId>tomcat-catalina</artifactId>
			<version>10.0.6</version>
		</dependency>
	</dependencies>
	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>io.netty</groupId>
				<artifactId>netty-codec-http2</artifactId>
				<version>4.1.52.Final</version>
				<scope>compile</scope>
			</dependency>
			<dependency>
				<groupId>io.netty</groupId>
				<artifactId>netty-handler-proxy</artifactId>
				<version>4.1.52.Final</version>
				<scope>compile</scope>
			</dependency>
			<dependency>
				<groupId>io.netty</groupId>
				<artifactId>netty-handler</artifactId>
				<version>4.1.58.Final</version>
				<scope>compile</scope>
			</dependency>
		</dependencies>
	</dependencyManagement>
	<build>
		<plugins>
			<plugin>
				<groupId>org.springframework.boot</groupId>
				<artifactId>spring-boot-maven-plugin</artifactId>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>2.19.1</version>
				<configuration>
					<testFailureIgnore>true</testFailureIgnore>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.5.1</version>
				<configuration>
					<source>1.8</source>
					<target>1.8</target>
				</configuration>
			</plugin>
<!--added now-->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-failsafe-plugin</artifactId>
				<version>3.0.0-M3</version>
				<executions>
					<execution>
						<goals>
							<goal>integration-test</goal>
							<goal>verify</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-dependency-plugin</artifactId>
				<version>3.1.1</version>
				<executions>
					<execution>
						<id>copy-dependencies</id>
						<phase>package</phase>
						<goals>
							<goal>copy-dependencies</goal>
						</goals>
						<configuration>
						<outputDirectory>${project.build.directory}/lib</outputDirectory>
							<overWriteReleases>false</overWriteReleases>
							<overWriteSnapshots>false</overWriteSnapshots>
							<overWriteIfNewer>true</overWriteIfNewer>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-resources-plugin</artifactId>
				<version>2.7</version>
				<configuration>
					<delimiters>
						<delimiter>@</delimiter>
					</delimiters>
					<useDefaultDelimiters>false</useDefaultDelimiters>
				</configuration>
			</plugin>
		</plugins>
		<resources>
			<resource>
				<directory>src/main/resources</directory>
				<filtering>true</filtering>
			</resource>
		</resources>
	</build>
</project>

Version:

Apache Maven 3.3.9
Java version: 1.8.0_275
Daml Sdk: 1.13.1

BE
bernhard
Jun 2021

Could you post the output of mvn dependency:tree after those changes, please?

TE
tejashree_parab
Jun 2021

revised o/p of mvn dependency: tree

[INFO] --- maven-dependency-plugin:3.1.1:tree (default-cli) @ Blockchain-DAML-App ---
[INFO] com.blockchain.daml:Blockchain-DAML-App:jar:0.0.1-SNAPSHOT
[INFO] +- org.springframework.boot:spring-boot-starter-web:jar:2.0.5.RELEASE:compile
[INFO] |  +- org.springframework.boot:spring-boot-starter-json:jar:2.0.5.RELEASE:compile
[INFO] |  |  +- com.fasterxml.jackson.core:jackson-databind:jar:2.9.6:compile
[INFO] |  |  |  +- com.fasterxml.jackson.core:jackson-annotations:jar:2.9.0:compile
[INFO] |  |  |  \- com.fasterxml.jackson.core:jackson-core:jar:2.9.6:compile
[INFO] |  |  +- com.fasterxml.jackson.datatype:jackson-datatype-jdk8:jar:2.9.6:compile
[INFO] |  |  +- com.fasterxml.jackson.datatype:jackson-datatype-jsr310:jar:2.9.6:compile
[INFO] |  |  \- com.fasterxml.jackson.module:jackson-module-parameter-names:jar:2.9.6:compile
[INFO] |  +- org.springframework.boot:spring-boot-starter-tomcat:jar:2.0.5.RELEASE:compile
[INFO] |  |  +- org.apache.tomcat.embed:tomcat-embed-core:jar:8.5.34:compile
[INFO] |  |  +- org.apache.tomcat.embed:tomcat-embed-el:jar:8.5.34:compile
[INFO] |  |  \- org.apache.tomcat.embed:tomcat-embed-websocket:jar:8.5.34:compile
[INFO] |  +- org.hibernate.validator:hibernate-validator:jar:6.0.12.Final:compile
[INFO] |  |  +- javax.validation:validation-api:jar:2.0.1.Final:compile
[INFO] |  |  +- org.jboss.logging:jboss-logging:jar:3.3.2.Final:compile
[INFO] |  |  \- com.fasterxml:classmate:jar:1.3.4:compile
[INFO] |  +- org.springframework:spring-web:jar:5.0.9.RELEASE:compile
[INFO] |  \- org.springframework:spring-webmvc:jar:5.0.9.RELEASE:compile
[INFO] |     \- org.springframework:spring-expression:jar:5.0.9.RELEASE:compile
[INFO] +- org.springframework.boot:spring-boot-starter:jar:2.0.5.RELEASE:compile
[INFO] |  +- org.springframework.boot:spring-boot:jar:2.0.5.RELEASE:compile
[INFO] |  +- org.springframework.boot:spring-boot-autoconfigure:jar:2.0.5.RELEASE:compile
[INFO] |  +- org.springframework.boot:spring-boot-starter-logging:jar:2.0.5.RELEASE:compile
[INFO] |  |  +- org.apache.logging.log4j:log4j-to-slf4j:jar:2.10.0:compile
[INFO] |  |  |  \- org.apache.logging.log4j:log4j-api:jar:2.10.0:compile
[INFO] |  |  \- org.slf4j:jul-to-slf4j:jar:1.7.25:compile
[INFO] |  +- javax.annotation:javax.annotation-api:jar:1.3.2:compile
[INFO] |  +- org.springframework:spring-core:jar:5.0.9.RELEASE:compile
[INFO] |  |  \- org.springframework:spring-jcl:jar:5.0.9.RELEASE:compile
[INFO] |  \- org.yaml:snakeyaml:jar:1.19:runtime
[INFO] +- com.daml:codegen-java:jar:1.13.1:compile
[INFO] +- com.daml:bindings-rxjava:jar:1.13.1:compile
[INFO] |  +- com.daml:bindings-java:jar:1.13.1:compile
[INFO] |  |  +- com.google.code.findbugs:jsr305:jar:3.0.2:compile
[INFO] |  |  \- com.google.guava:guava:jar:29.0-jre:compile
[INFO] |  |     +- com.google.guava:failureaccess:jar:1.0.1:compile
[INFO] |  |     +- com.google.guava:listenablefuture:jar:9999.0-empty-to-avoid-conflict-with-guava:compile
[INFO] |  |     +- org.checkerframework:checker-qual:jar:2.11.1:compile
[INFO] |  |     \- com.google.j2objc:j2objc-annotations:jar:1.3:compile
[INFO] |  +- com.daml:ledger-api-auth-client:jar:1.13.1:compile
[INFO] |  +- com.daml:rs-grpc-bridge:jar:1.13.1:compile
[INFO] |  |  \- org.reactivestreams:reactive-streams:jar:1.0.2:compile
[INFO] |  +- com.google.api.grpc:proto-google-common-protos:jar:2.0.1:compile
[INFO] |  +- com.google.protobuf:protobuf-java:jar:3.14.0:compile
[INFO] |  +- io.grpc:grpc-api:jar:1.35.0:compile
[INFO] |  |  +- io.grpc:grpc-context:jar:1.35.0:compile
[INFO] |  |  +- com.google.errorprone:error_prone_annotations:jar:2.4.0:compile
[INFO] |  |  \- org.codehaus.mojo:animal-sniffer-annotations:jar:1.19:runtime
[INFO] |  +- io.grpc:grpc-core:jar:1.35.0:compile
[INFO] |  |  +- com.google.code.gson:gson:jar:2.8.5:runtime
[INFO] |  |  +- com.google.android:annotations:jar:4.1.1.4:runtime
[INFO] |  |  \- io.perfmark:perfmark-api:jar:0.23.0:runtime
[INFO] |  +- io.grpc:grpc-netty:jar:1.35.0:compile
[INFO] |  |  +- io.netty:netty-codec-http2:jar:4.1.52.Final:compile
[INFO] |  |  |  \- io.netty:netty-codec-http:jar:4.1.29.Final:compile
[INFO] |  |  \- io.netty:netty-handler-proxy:jar:4.1.52.Final:compile
[INFO] |  |     \- io.netty:netty-codec-socks:jar:4.1.29.Final:compile
[INFO] |  +- io.grpc:grpc-protobuf:jar:1.35.0:compile
[INFO] |  |  \- io.grpc:grpc-protobuf-lite:jar:1.35.0:compile
[INFO] |  +- io.grpc:grpc-stub:jar:1.35.0:compile
[INFO] |  +- io.netty:netty-handler:jar:4.1.58.Final:compile
[INFO] |  |  +- io.netty:netty-common:jar:4.1.29.Final:compile
[INFO] |  |  +- io.netty:netty-resolver:jar:4.1.29.Final:compile
[INFO] |  |  +- io.netty:netty-buffer:jar:4.1.29.Final:compile
[INFO] |  |  +- io.netty:netty-transport:jar:4.1.29.Final:compile
[INFO] |  |  \- io.netty:netty-codec:jar:4.1.29.Final:compile
[INFO] |  +- io.reactivex.rxjava2:rxjava:jar:2.1.17:compile
[INFO] |  +- org.checkerframework:checker:jar:2.5.4:compile
[INFO] |  +- org.pcollections:pcollections:jar:2.1.3:compile
[INFO] |  \- org.slf4j:slf4j-api:jar:1.7.25:compile
[INFO] +- com.daml:daml-lf-1.8-archive-java-proto:jar:1.13.1:compile
[INFO] +- ch.qos.logback:logback-classic:jar:1.2.3:compile
[INFO] |  \- ch.qos.logback:logback-core:jar:1.2.3:compile
[INFO] +- com.sparkjava:spark-core:jar:2.7.2:compile
[INFO] |  +- org.eclipse.jetty:jetty-server:jar:9.4.12.v20180830:compile
[INFO] |  |  +- javax.servlet:javax.servlet-api:jar:3.1.0:compile
[INFO] |  |  +- org.eclipse.jetty:jetty-http:jar:9.4.12.v20180830:compile
[INFO] |  |  |  \- org.eclipse.jetty:jetty-util:jar:9.4.12.v20180830:compile
[INFO] |  |  \- org.eclipse.jetty:jetty-io:jar:9.4.12.v20180830:compile
[INFO] |  +- org.eclipse.jetty:jetty-webapp:jar:9.4.12.v20180830:compile
[INFO] |  |  +- org.eclipse.jetty:jetty-xml:jar:9.4.12.v20180830:compile
[INFO] |  |  \- org.eclipse.jetty:jetty-servlet:jar:9.4.12.v20180830:compile
[INFO] |  |     \- org.eclipse.jetty:jetty-security:jar:9.4.12.v20180830:compile
[INFO] |  +- org.eclipse.jetty.websocket:websocket-server:jar:9.4.12.v20180830:compile
[INFO] |  |  +- org.eclipse.jetty.websocket:websocket-common:jar:9.4.12.v20180830:compile
[INFO] |  |  \- org.eclipse.jetty.websocket:websocket-client:jar:9.4.12.v20180830:compile
[INFO] |  |     \- org.eclipse.jetty:jetty-client:jar:9.4.12.v20180830:compile
[INFO] |  \- org.eclipse.jetty.websocket:websocket-servlet:jar:9.4.12.v20180830:compile
[INFO] |     \- org.eclipse.jetty.websocket:websocket-api:jar:9.4.12.v20180830:compile
[INFO] +- com.googlecode.json-simple:json-simple:jar:1.1.1:compile
[INFO] +- org.springframework.plugin:spring-plugin-core:jar:2.0.0.RELEASE:compile
[INFO] |  +- org.springframework:spring-beans:jar:5.0.9.RELEASE:compile
[INFO] |  +- org.springframework:spring-context:jar:5.0.9.RELEASE:compile
[INFO] |  \- org.springframework:spring-aop:jar:5.0.9.RELEASE:compile
[INFO] +- junit:junit:jar:4.13.1:test
[INFO] |  \- org.hamcrest:hamcrest-core:jar:1.3:test
[INFO] \- org.apache.tomcat:tomcat-catalina:jar:10.0.6:compile
[INFO]    +- org.apache.tomcat:tomcat-servlet-api:jar:10.0.6:compile
[INFO]    +- org.apache.tomcat:tomcat-jsp-api:jar:8.5.34:compile
[INFO]    |  \- org.apache.tomcat:tomcat-el-api:jar:8.5.34:compile
[INFO]    +- org.apache.tomcat:tomcat-juli:jar:10.0.6:compile
[INFO]    +- org.apache.tomcat:tomcat-annotations-api:jar:8.5.34:compile
[INFO]    +- org.apache.tomcat:tomcat-api:jar:10.0.6:compile
[INFO]    +- org.apache.tomcat:tomcat-jni:jar:10.0.6:compile
[INFO]    +- org.apache.tomcat:tomcat-coyote:jar:10.0.6:compile
[INFO]    +- org.apache.tomcat:tomcat-util:jar:10.0.6:compile
[INFO]    +- org.apache.tomcat:tomcat-util-scan:jar:10.0.6:compile
[INFO]    \- org.apache.tomcat:tomcat-jaspic-api:jar:10.0.6:compile
BE
bernhard
Jun 2021
tejashree_parab:
[INFO] |  +- io.grpc:grpc-netty:jar:1.35.0:compile
[INFO] |  |  +- io.netty:netty-codec-http2:jar:4.1.52.Final:compile
[INFO] |  |  |  \- io.netty:netty-codec-http:jar:4.1.29.Final:compile
[INFO] |  |  \- io.netty:netty-handler-proxy:jar:4.1.52.Final:compile
[INFO] |  |     \- io.netty:netty-codec-socks:jar:4.1.29.Final:compile
[INFO] |  +- io.grpc:grpc-protobuf:jar:1.35.0:compile
[INFO] |  |  \- io.grpc:grpc-protobuf-lite:jar:1.35.0:compile
[INFO] |  +- io.grpc:grpc-stub:jar:1.35.0:compile
[INFO] |  +- io.netty:netty-handler:jar:4.1.58.Final:compile
[INFO] |  |  +- io.netty:netty-common:jar:4.1.29.Final:compile
[INFO] |  |  +- io.netty:netty-resolver:jar:4.1.29.Final:compile
[INFO] |  |  +- io.netty:netty-buffer:jar:4.1.29.Final:compile
[INFO] |  |  +- io.netty:netty-transport:jar:4.1.29.Final:compile
[INFO] |  |  \- io.netty:netty-codec:jar:4.1.29.Final:compile

I am just puzzled what Maven thinks it’s doing here… It has correctly taken the versions from dependencyManagement, but is still taking wrong versions from the transitive dependencies of those…

I’m out of my depth with maven dependency resolution here. The only thing I can suggest is to expand your dependencyManagement block to force all netty libraries to be on 4.1.52/4.1.58 respectively.

TE
tejashree_parab
Jun 2021

yes same I was thinking because after enforcing also its this behaviour

BE
bernhard
Jun 2021

Maybe a silly question, but have you tried running mvn clean?

TE
tejashree_parab
Jun 2021

yes, I follow the steps as

mvn clean install
mvn clean package 
and the run the jar

Also, I manually delete the libs folder and tried :grinning:

GA
Gary_Verhaegen
Jun 2021

Any chance you could run

mvn org.apache.maven.plugins:maven-dependency-plugin:2.10:tree -Dverbose=true

and paste the result here?

TE
tejashree_parab
Jun 2021

o/p of mvn org.apache.maven.plugins:maven-dependency-plugin:2.10:tree -Dverbose=true

[INFO] artifact io.grpc:grpc-api: checking for updates from central
[INFO] artifact io.grpc:grpc-core: checking for updates from central
[INFO] com.lti.blockchain.daml:Blockchain-DAML-App:jar:0.0.1-SNAPSHOT
[INFO] +- org.springframework.boot:spring-boot-starter-web:jar:2.0.5.RELEASE:compile
[INFO] |  +- (org.springframework.boot:spring-boot-starter:jar:2.0.5.RELEASE:compile - omitted for duplicate)
[INFO] |  +- org.springframework.boot:spring-boot-starter-json:jar:2.0.5.RELEASE:compile
[INFO] |  |  +- (org.springframework.boot:spring-boot-starter:jar:2.0.5.RELEASE:compile - omitted for duplicate)
[INFO] |  |  +- (org.springframework:spring-web:jar:5.0.9.RELEASE:compile - omitted for duplicate)
[INFO] |  |  +- com.fasterxml.jackson.core:jackson-databind:jar:2.9.6:compile
[INFO] |  |  |  +- com.fasterxml.jackson.core:jackson-annotations:jar:2.9.0:compile
[INFO] |  |  |  \- com.fasterxml.jackson.core:jackson-core:jar:2.9.6:compile
[INFO] |  |  +- com.fasterxml.jackson.datatype:jackson-datatype-jdk8:jar:2.9.6:compile
[INFO] |  |  |  +- (com.fasterxml.jackson.core:jackson-core:jar:2.9.6:compile - omitted for duplicate)
[INFO] |  |  |  \- (com.fasterxml.jackson.core:jackson-databind:jar:2.9.6:compile - omitted for duplicate)
[INFO] |  |  +- com.fasterxml.jackson.datatype:jackson-datatype-jsr310:jar:2.9.6:compile
[INFO] |  |  |  +- (com.fasterxml.jackson.core:jackson-annotations:jar:2.9.0:compile - omitted for duplicate)
[INFO] |  |  |  +- (com.fasterxml.jackson.core:jackson-core:jar:2.9.6:compile - omitted for duplicate)
[INFO] |  |  |  \- (com.fasterxml.jackson.core:jackson-databind:jar:2.9.6:compile - omitted for duplicate)
[INFO] |  |  \- com.fasterxml.jackson.module:jackson-module-parameter-names:jar:2.9.6:compile
[INFO] |  |     +- (com.fasterxml.jackson.core:jackson-core:jar:2.9.6:compile - omitted for duplicate)
[INFO] |  |     \- (com.fasterxml.jackson.core:jackson-databind:jar:2.9.6:compile - omitted for duplicate)
[INFO] |  +- org.springframework.boot:spring-boot-starter-tomcat:jar:2.0.5.RELEASE:compile
[INFO] |  |  +- (javax.annotation:javax.annotation-api:jar:1.3.2:compile - omitted for duplicate)
[INFO] |  |  +- org.apache.tomcat.embed:tomcat-embed-core:jar:8.5.34:compile
[INFO] |  |  +- org.apache.tomcat.embed:tomcat-embed-el:jar:8.5.34:compile
[INFO] |  |  \- org.apache.tomcat.embed:tomcat-embed-websocket:jar:8.5.34:compile
[INFO] |  |     \- (org.apache.tomcat.embed:tomcat-embed-core:jar:8.5.34:compile - omitted for duplicate)
[INFO] |  +- org.hibernate.validator:hibernate-validator:jar:6.0.12.Final:compile
[INFO] |  |  +- javax.validation:validation-api:jar:2.0.1.Final:compile
[INFO] |  |  +- org.jboss.logging:jboss-logging:jar:3.3.2.Final:compile
[INFO] |  |  \- com.fasterxml:classmate:jar:1.3.4:compile
[INFO] |  +- org.springframework:spring-web:jar:5.0.9.RELEASE:compile
[INFO] |  |  +- (org.springframework:spring-beans:jar:5.0.9.RELEASE:compile - version managed from 5.2.0.RELEASE; omitted for duplicate)
[INFO] |  |  \- (org.springframework:spring-core:jar:5.0.9.RELEASE:compile - omitted for duplicate)
[INFO] |  \- org.springframework:spring-webmvc:jar:5.0.9.RELEASE:compile
[INFO] |     +- (org.springframework:spring-aop:jar:5.0.9.RELEASE:compile - version managed from 5.2.0.RELEASE; omitted for duplicate)
[INFO] |     +- (org.springframework:spring-beans:jar:5.0.9.RELEASE:compile - omitted for duplicate)
[INFO] |     +- (org.springframework:spring-context:jar:5.0.9.RELEASE:compile - version managed from 5.2.0.RELEASE; omitted for duplicate)
[INFO] |     +- (org.springframework:spring-core:jar:5.0.9.RELEASE:compile - omitted for duplicate)
[INFO] |     +- org.springframework:spring-expression:jar:5.0.9.RELEASE:compile
[INFO] |     |  \- (org.springframework:spring-core:jar:5.0.9.RELEASE:compile - omitted for duplicate)
[INFO] |     \- (org.springframework:spring-web:jar:5.0.9.RELEASE:compile - omitted for duplicate)
[INFO] +- org.springframework.boot:spring-boot-starter:jar:2.0.5.RELEASE:compile
[INFO] |  +- org.springframework.boot:spring-boot:jar:2.0.5.RELEASE:compile
[INFO] |  |  +- (org.springframework:spring-core:jar:5.0.9.RELEASE:compile - omitted for duplicate)
[INFO] |  |  \- (org.springframework:spring-context:jar:5.0.9.RELEASE:compile - omitted for duplicate)
[INFO] |  +- org.springframework.boot:spring-boot-autoconfigure:jar:2.0.5.RELEASE:compile
[INFO] |  |  \- (org.springframework.boot:spring-boot:jar:2.0.5.RELEASE:compile - omitted for duplicate)
[INFO] |  +- org.springframework.boot:spring-boot-starter-logging:jar:2.0.5.RELEASE:compile
[INFO] |  |  +- (ch.qos.logback:logback-classic:jar:1.2.3:compile - omitted for duplicate)
[INFO] |  |  +- org.apache.logging.log4j:log4j-to-slf4j:jar:2.10.0:compile
[INFO] |  |  |  +- (org.slf4j:slf4j-api:jar:1.7.25:compile - omitted for duplicate)
[INFO] |  |  |  \- org.apache.logging.log4j:log4j-api:jar:2.10.0:compile
[INFO] |  |  \- org.slf4j:jul-to-slf4j:jar:1.7.25:compile
[INFO] |  |     \- (org.slf4j:slf4j-api:jar:1.7.25:compile - omitted for duplicate)
[INFO] |  +- javax.annotation:javax.annotation-api:jar:1.3.2:compile
[INFO] |  +- org.springframework:spring-core:jar:5.0.9.RELEASE:compile
[INFO] |  |  \- org.springframework:spring-jcl:jar:5.0.9.RELEASE:compile
[INFO] |  \- org.yaml:snakeyaml:jar:1.19:runtime
[INFO] +- com.daml:codegen-java:jar:1.13.1:compile
[INFO] +- com.daml:bindings-rxjava:jar:1.13.1:compile
[INFO] |  +- com.daml:bindings-java:jar:1.13.1:compile
[INFO] |  |  +- (com.google.api.grpc:proto-google-common-protos:jar:2.0.1:compile - omitted for duplicate)
[INFO] |  |  +- com.google.code.findbugs:jsr305:jar:3.0.2:compile
[INFO] |  |  +- com.google.guava:guava:jar:29.0-jre:compile
[INFO] |  |  |  +- com.google.guava:failureaccess:jar:1.0.1:compile
[INFO] |  |  |  +- com.google.guava:listenablefuture:jar:9999.0-empty-to-avoid-conflict-with-guava:compile
[INFO] |  |  |  +- (com.google.code.findbugs:jsr305:jar:3.0.2:compile - omitted for duplicate)
[INFO] |  |  |  +- org.checkerframework:checker-qual:jar:2.11.1:compile
[INFO] |  |  |  +- (com.google.errorprone:error_prone_annotations:jar:2.4.0:compile - omitted for duplicate)
[INFO] |  |  |  \- com.google.j2objc:j2objc-annotations:jar:1.3:compile
[INFO] |  |  +- (com.google.protobuf:protobuf-java:jar:3.14.0:compile - omitted for duplicate)
[INFO] |  |  +- (io.grpc:grpc-api:jar:1.35.0:compile - omitted for duplicate)
[INFO] |  |  +- (io.grpc:grpc-core:jar:1.35.0:compile - omitted for duplicate)
[INFO] |  |  +- (io.grpc:grpc-netty:jar:1.35.0:compile - omitted for duplicate)
[INFO] |  |  +- (io.grpc:grpc-protobuf:jar:1.35.0:compile - omitted for duplicate)
[INFO] |  |  +- (io.grpc:grpc-stub:jar:1.35.0:compile - omitted for duplicate)
[INFO] |  |  \- (org.checkerframework:checker:jar:2.5.4:compile - omitted for duplicate)
[INFO] |  +- com.daml:ledger-api-auth-client:jar:1.13.1:compile
[INFO] |  |  +- (io.grpc:grpc-api:jar:1.35.0:compile - omitted for duplicate)
[INFO] |  |  \- (io.grpc:grpc-stub:jar:1.35.0:compile - omitted for duplicate)
[INFO] |  +- com.daml:rs-grpc-bridge:jar:1.13.1:compile
[INFO] |  |  +- (com.google.code.findbugs:jsr305:jar:3.0.2:compile - omitted for duplicate)
[INFO] |  |  +- (io.grpc:grpc-api:jar:1.35.0:compile - omitted for duplicate)
[INFO] |  |  +- (io.grpc:grpc-stub:jar:1.35.0:compile - omitted for duplicate)
[INFO] |  |  +- org.reactivestreams:reactive-streams:jar:1.0.2:compile
[INFO] |  |  \- (org.slf4j:slf4j-api:jar:1.7.25:compile - version managed from 1.7.26; omitted for duplicate)
[INFO] |  +- com.google.api.grpc:proto-google-common-protos:jar:2.0.1:compile
[INFO] |  |  \- (com.google.protobuf:protobuf-java:jar:3.13.0:compile - omitted for conflict with 3.14.0)
[INFO] |  +- com.google.protobuf:protobuf-java:jar:3.14.0:compile
[INFO] |  +- io.grpc:grpc-api:jar:1.35.0:compile
[INFO] |  |  +- io.grpc:grpc-context:jar:1.35.0:compile
[INFO] |  |  +- (com.google.code.findbugs:jsr305:jar:3.0.2:compile - omitted for duplicate)
[INFO] |  |  +- (com.google.guava:guava:jar:30.0-android:runtime - omitted for conflict with 29.0-jre)
[INFO] |  |  +- (com.google.errorprone:error_prone_annotations:jar:2.4.0:compile - scope updated from runtime; omitted for duplicate)
[INFO] |  |  \- org.codehaus.mojo:animal-sniffer-annotations:jar:1.19:runtime
[INFO] |  +- io.grpc:grpc-core:jar:1.35.0:compile
[INFO] |  |  +- (io.grpc:grpc-api:jar:1.35.0:compile - omitted for duplicate)
[INFO] |  |  +- com.google.code.gson:gson:jar:2.8.5:runtime (version managed from 2.8.6)
[INFO] |  |  +- com.google.android:annotations:jar:4.1.1.4:runtime
[INFO] |  |  +- (org.codehaus.mojo:animal-sniffer-annotations:jar:1.19:runtime - omitted for duplicate)
[INFO] |  |  +- (com.google.errorprone:error_prone_annotations:jar:2.4.0:compile - scope updated from runtime; omitted for duplicate)
[INFO] |  |  +- (com.google.guava:guava:jar:30.0-android:runtime - omitted for conflict with 29.0-jre)
[INFO] |  |  +- io.perfmark:perfmark-api:jar:0.23.0:runtime
[INFO] |  |  \- (com.google.code.findbugs:jsr305:jar:3.0.2:runtime - omitted for duplicate)
[INFO] |  +- io.grpc:grpc-netty:jar:1.35.0:compile
[INFO] |  |  +- (io.grpc:grpc-core:jar:1.35.0:compile - omitted for duplicate)
[INFO] |  |  +- io.netty:netty-codec-http2:jar:4.1.52.Final:compile
[INFO] |  |  |  +- (io.netty:netty-common:jar:4.1.29.Final:compile - version managed from 4.1.58.Final; omitted for duplicate)
[INFO] |  |  |  +- (io.netty:netty-buffer:jar:4.1.29.Final:compile - version managed from 4.1.58.Final; omitted for duplicate)
[INFO] |  |  |  +- (io.netty:netty-transport:jar:4.1.29.Final:compile - version managed from 4.1.58.Final; omitted for duplicate)
[INFO] |  |  |  +- (io.netty:netty-codec:jar:4.1.29.Final:compile - version managed from 4.1.58.Final; omitted for duplicate)
[INFO] |  |  |  +- (io.netty:netty-handler:jar:4.1.58.Final:compile - version managed from 4.1.52.Final; omitted for duplicate)
[INFO] |  |  |  \- io.netty:netty-codec-http:jar:4.1.29.Final:compile (version managed from 4.1.52.Final)
[INFO] |  |  |     \- (io.netty:netty-codec:jar:4.1.29.Final:compile - version managed from 4.1.58.Final; omitted for duplicate)
[INFO] |  |  +- io.netty:netty-handler-proxy:jar:4.1.52.Final:compile (scope managed from runtime)
[INFO] |  |  |  +- (io.netty:netty-common:jar:4.1.29.Final:compile - version managed from 4.1.52.Final; omitted for duplicate)
[INFO] |  |  |  +- (io.netty:netty-buffer:jar:4.1.29.Final:compile - version managed from 4.1.52.Final; omitted for duplicate)
[INFO] |  |  |  +- (io.netty:netty-transport:jar:4.1.29.Final:compile - version managed from 4.1.52.Final; omitted for duplicate)
[INFO] |  |  |  +- (io.netty:netty-codec:jar:4.1.29.Final:compile - version managed from 4.1.52.Final; omitted for duplicate)
[INFO] |  |  |  +- io.netty:netty-codec-socks:jar:4.1.29.Final:compile (version managed from 4.1.52.Final)
[INFO] |  |  |  |  \- (io.netty:netty-codec:jar:4.1.29.Final:compile - version managed from 4.1.52.Final; omitted for duplicate)
[INFO] |  |  |  \- (io.netty:netty-codec-http:jar:4.1.29.Final:compile - version managed from 4.1.52.Final; omitted for duplicate)
[INFO] |  |  +- (com.google.guava:guava:jar:30.0-android:runtime - omitted for conflict with 29.0-jre)
[INFO] |  |  +- (com.google.errorprone:error_prone_annotations:jar:2.4.0:compile - scope updated from runtime; omitted for duplicate)
[INFO] |  |  +- (io.perfmark:perfmark-api:jar:0.23.0:runtime - omitted for duplicate)
[INFO] |  |  +- (org.codehaus.mojo:animal-sniffer-annotations:jar:1.19:runtime - omitted for duplicate)
[INFO] |  |  \- (com.google.code.findbugs:jsr305:jar:3.0.2:runtime - omitted for duplicate)
[INFO] |  +- io.grpc:grpc-protobuf:jar:1.35.0:compile
[INFO] |  |  +- (io.grpc:grpc-api:jar:1.35.0:compile - omitted for duplicate)
[INFO] |  |  +- (com.google.code.findbugs:jsr305:jar:3.0.2:compile - omitted for duplicate)
[INFO] |  |  +- (com.google.protobuf:protobuf-java:jar:3.12.0:compile - omitted for conflict with 3.14.0)
[INFO] |  |  +- (com.google.api.grpc:proto-google-common-protos:jar:2.0.1:compile - omitted for duplicate)
[INFO] |  |  +- io.grpc:grpc-protobuf-lite:jar:1.35.0:compile
[INFO] |  |  |  +- (io.grpc:grpc-api:jar:1.35.0:compile - omitted for duplicate)
[INFO] |  |  |  +- (com.google.code.findbugs:jsr305:jar:3.0.2:runtime - omitted for duplicate)
[INFO] |  |  |  +- (com.google.guava:guava:jar:30.0-android:runtime - omitted for conflict with 29.0-jre)
[INFO] |  |  |  +- (com.google.errorprone:error_prone_annotations:jar:2.4.0:runtime - omitted for duplicate)
[INFO] |  |  |  \- (org.codehaus.mojo:animal-sniffer-annotations:jar:1.19:runtime - omitted for duplicate)
[INFO] |  |  +- (com.google.guava:guava:jar:30.0-android:runtime - omitted for conflict with 29.0-jre)
[INFO] |  |  +- (com.google.errorprone:error_prone_annotations:jar:2.4.0:compile - scope updated from runtime; omitted for duplicate)
[INFO] |  |  \- (org.codehaus.mojo:animal-sniffer-annotations:jar:1.19:runtime - omitted for duplicate)
[INFO] |  +- io.grpc:grpc-stub:jar:1.35.0:compile
[INFO] |  |  +- (io.grpc:grpc-api:jar:1.35.0:compile - omitted for duplicate)
[INFO] |  |  +- (com.google.guava:guava:jar:30.0-android:compile - omitted for conflict with 29.0-jre)
[INFO] |  |  +- com.google.errorprone:error_prone_annotations:jar:2.4.0:compile
[INFO] |  |  +- (org.codehaus.mojo:animal-sniffer-annotations:jar:1.19:runtime - omitted for duplicate)
[INFO] |  |  \- (com.google.code.findbugs:jsr305:jar:3.0.2:runtime - omitted for duplicate)
[INFO] |  +- io.netty:netty-handler:jar:4.1.58.Final:compile
[INFO] |  |  +- io.netty:netty-common:jar:4.1.29.Final:compile
[INFO] |  |  +- io.netty:netty-resolver:jar:4.1.29.Final:compile
[INFO] |  |  |  \- (io.netty:netty-common:jar:4.1.29.Final:compile - version managed from 4.1.58.Final; omitted for duplicate)
[INFO] |  |  +- io.netty:netty-buffer:jar:4.1.29.Final:compile
[INFO] |  |  |  \- (io.netty:netty-common:jar:4.1.29.Final:compile - version managed from 4.1.58.Final; omitted for duplicate)
[INFO] |  |  +- io.netty:netty-transport:jar:4.1.29.Final:compile
[INFO] |  |  |  +- (io.netty:netty-buffer:jar:4.1.29.Final:compile - version managed from 4.1.58.Final; omitted for duplicate)
[INFO] |  |  |  \- (io.netty:netty-resolver:jar:4.1.29.Final:compile - version managed from 4.1.58.Final; omitted for duplicate)
[INFO] |  |  \- io.netty:netty-codec:jar:4.1.29.Final:compile
[INFO] |  |     \- (io.netty:netty-transport:jar:4.1.29.Final:compile - version managed from 4.1.58.Final; omitted for duplicate)
[INFO] |  +- io.reactivex.rxjava2:rxjava:jar:2.1.17:compile (version managed from 2.2.1)
[INFO] |  |  \- (org.reactivestreams:reactive-streams:jar:1.0.2:compile - omitted for duplicate)
[INFO] |  +- org.checkerframework:checker:jar:2.5.4:compile
[INFO] |  +- org.pcollections:pcollections:jar:2.1.3:compile
[INFO] |  \- org.slf4j:slf4j-api:jar:1.7.25:compile
[INFO] +- com.daml:daml-lf-1.8-archive-java-proto:jar:1.13.1:compile
[INFO] +- ch.qos.logback:logback-classic:jar:1.2.3:compile
[INFO] |  +- ch.qos.logback:logback-core:jar:1.2.3:compile
[INFO] |  \- (org.slf4j:slf4j-api:jar:1.7.25:compile - version managed from 1.7.26; omitted for duplicate)
[INFO] +- com.sparkjava:spark-core:jar:2.7.2:compile
[INFO] |  +- (org.slf4j:slf4j-api:jar:1.7.25:compile - version managed from 1.7.13; omitted for duplicate)
[INFO] |  +- org.eclipse.jetty:jetty-server:jar:9.4.12.v20180830:compile (version managed from 9.4.8.v20171121)
[INFO] |  |  +- javax.servlet:javax.servlet-api:jar:3.1.0:compile
[INFO] |  |  +- org.eclipse.jetty:jetty-http:jar:9.4.12.v20180830:compile
[INFO] |  |  |  +- org.eclipse.jetty:jetty-util:jar:9.4.12.v20180830:compile
[INFO] |  |  |  \- (org.eclipse.jetty:jetty-io:jar:9.4.12.v20180830:compile - omitted for duplicate)
[INFO] |  |  \- org.eclipse.jetty:jetty-io:jar:9.4.12.v20180830:compile
[INFO] |  |     \- (org.eclipse.jetty:jetty-util:jar:9.4.12.v20180830:compile - omitted for duplicate)
[INFO] |  +- org.eclipse.jetty:jetty-webapp:jar:9.4.12.v20180830:compile (version managed from 9.4.8.v20171121)
[INFO] |  |  +- org.eclipse.jetty:jetty-xml:jar:9.4.12.v20180830:compile
[INFO] |  |  |  \- (org.eclipse.jetty:jetty-util:jar:9.4.12.v20180830:compile - omitted for duplicate)
[INFO] |  |  \- org.eclipse.jetty:jetty-servlet:jar:9.4.12.v20180830:compile
[INFO] |  |     \- org.eclipse.jetty:jetty-security:jar:9.4.12.v20180830:compile
[INFO] |  |        \- (org.eclipse.jetty:jetty-server:jar:9.4.12.v20180830:compile - version managed from 9.4.8.v20171121; omitted for duplicate)
[INFO] |  +- org.eclipse.jetty.websocket:websocket-server:jar:9.4.12.v20180830:compile (version managed from 9.4.8.v20171121)
[INFO] |  |  +- org.eclipse.jetty.websocket:websocket-common:jar:9.4.12.v20180830:compile
[INFO] |  |  |  +- (org.eclipse.jetty.websocket:websocket-api:jar:9.4.12.v20180830:compile - omitted for duplicate)
[INFO] |  |  |  +- (org.eclipse.jetty:jetty-util:jar:9.4.12.v20180830:compile - omitted for duplicate)
[INFO] |  |  |  \- (org.eclipse.jetty:jetty-io:jar:9.4.12.v20180830:compile - omitted for duplicate)
[INFO] |  |  +- org.eclipse.jetty.websocket:websocket-client:jar:9.4.12.v20180830:compile
[INFO] |  |  |  +- org.eclipse.jetty:jetty-client:jar:9.4.12.v20180830:compile
[INFO] |  |  |  |  +- (org.eclipse.jetty:jetty-http:jar:9.4.12.v20180830:compile - omitted for duplicate)
[INFO] |  |  |  |  \- (org.eclipse.jetty:jetty-io:jar:9.4.12.v20180830:compile - omitted for duplicate)
[INFO] |  |  |  +- (org.eclipse.jetty:jetty-xml:jar:9.4.12.v20180830:compile - omitted for duplicate)
[INFO] |  |  |  +- (org.eclipse.jetty:jetty-util:jar:9.4.12.v20180830:compile - omitted for duplicate)
[INFO] |  |  |  +- (org.eclipse.jetty:jetty-io:jar:9.4.12.v20180830:compile - omitted for duplicate)
[INFO] |  |  |  \- (org.eclipse.jetty.websocket:websocket-common:jar:9.4.12.v20180830:compile - omitted for duplicate)
[INFO] |  |  +- (org.eclipse.jetty.websocket:websocket-servlet:jar:9.4.12.v20180830:compile - version managed from 9.4.8.v20171121; omitted for duplicate)
[INFO] |  |  +- (org.eclipse.jetty:jetty-servlet:jar:9.4.12.v20180830:compile - omitted for duplicate)
[INFO] |  |  \- (org.eclipse.jetty:jetty-http:jar:9.4.12.v20180830:compile - omitted for duplicate)
[INFO] |  \- org.eclipse.jetty.websocket:websocket-servlet:jar:9.4.12.v20180830:compile
[INFO] |     +- org.eclipse.jetty.websocket:websocket-api:jar:9.4.12.v20180830:compile
[INFO] |     \- (javax.servlet:javax.servlet-api:jar:3.1.0:compile - omitted for duplicate)
[INFO] +- com.googlecode.json-simple:json-simple:jar:1.1.1:compile
[INFO] +- org.springframework.plugin:spring-plugin-core:jar:2.0.0.RELEASE:compile
[INFO] |  +- org.springframework:spring-beans:jar:5.0.9.RELEASE:compile
[INFO] |  |  \- (org.springframework:spring-core:jar:5.0.9.RELEASE:compile - omitted for duplicate)
[INFO] |  +- org.springframework:spring-context:jar:5.0.9.RELEASE:compile
[INFO] |  |  +- (org.springframework:spring-aop:jar:5.0.9.RELEASE:compile - omitted for duplicate)
[INFO] |  |  +- (org.springframework:spring-beans:jar:5.0.9.RELEASE:compile - version managed from 5.2.0.RELEASE; omitted for duplicate)
[INFO] |  |  +- (org.springframework:spring-core:jar:5.0.9.RELEASE:compile - omitted for duplicate)
[INFO] |  |  \- (org.springframework:spring-expression:jar:5.0.9.RELEASE:compile - omitted for duplicate)
[INFO] |  +- org.springframework:spring-aop:jar:5.0.9.RELEASE:compile
[INFO] |  |  +- (org.springframework:spring-beans:jar:5.0.9.RELEASE:compile - version managed from 5.2.0.RELEASE; omitted for duplicate)
[INFO] |  |  \- (org.springframework:spring-core:jar:5.0.9.RELEASE:compile - omitted for duplicate)
[INFO] |  \- (org.slf4j:slf4j-api:jar:1.7.25:compile - version managed from 1.7.13; omitted for duplicate)
[INFO] +- junit:junit:jar:4.13.1:test
[INFO] |  \- org.hamcrest:hamcrest-core:jar:1.3:test
[INFO] \- org.apache.tomcat:tomcat-catalina:jar:10.0.6:compile
[INFO]    +- org.apache.tomcat:tomcat-servlet-api:jar:10.0.6:compile
[INFO]    +- org.apache.tomcat:tomcat-jsp-api:jar:8.5.34:compile (version managed from 10.0.6)
[INFO]    |  +- org.apache.tomcat:tomcat-el-api:jar:8.5.34:compile
[INFO]    |  \- (org.apache.tomcat:tomcat-servlet-api:jar:8.5.34:compile - omitted for conflict with 10.0.6)
[INFO]    +- org.apache.tomcat:tomcat-juli:jar:10.0.6:compile
[INFO]    +- org.apache.tomcat:tomcat-annotations-api:jar:8.5.34:compile (version managed from 10.0.6)
[INFO]    +- org.apache.tomcat:tomcat-api:jar:10.0.6:compile
[INFO]    |  \- (org.apache.tomcat:tomcat-servlet-api:jar:10.0.6:compile - omitted for duplicate)
[INFO]    +- org.apache.tomcat:tomcat-jni:jar:10.0.6:compile
[INFO]    +- org.apache.tomcat:tomcat-coyote:jar:10.0.6:compile
[INFO]    |  +- (org.apache.tomcat:tomcat-servlet-api:jar:10.0.6:compile - omitted for duplicate)
[INFO]    |  +- (org.apache.tomcat:tomcat-jni:jar:10.0.6:compile - omitted for duplicate)
[INFO]    |  +- (org.apache.tomcat:tomcat-juli:jar:10.0.6:compile - omitted for duplicate)
[INFO]    |  \- (org.apache.tomcat:tomcat-util:jar:10.0.6:compile - omitted for duplicate)
[INFO]    +- org.apache.tomcat:tomcat-util:jar:10.0.6:compile
[INFO]    |  \- (org.apache.tomcat:tomcat-juli:jar:10.0.6:compile - omitted for duplicate)
[INFO]    +- org.apache.tomcat:tomcat-util-scan:jar:10.0.6:compile
[INFO]    |  +- (org.apache.tomcat:tomcat-util:jar:10.0.6:compile - omitted for duplicate)
[INFO]    |  +- (org.apache.tomcat:tomcat-juli:jar:10.0.6:compile - omitted for duplicate)
[INFO]    |  \- (org.apache.tomcat:tomcat-api:jar:10.0.6:compile - omitted for duplicate)
[INFO]    \- org.apache.tomcat:tomcat-jaspic-api:jar:10.0.6:compile
TE
tejashree_parab
Jun 2021

I updated pom.xml by excluding the netty 4.1.29 version, but now theirs a new error.

revised o/p of mvn dependency:tree

[INFO] --- maven-dependency-plugin:3.1.1:tree (default-cli) @ Blockchain-DAML-App ---
[INFO] com.blockchain.daml:Blockchain-DAML-App:jar:0.0.1-SNAPSHOT
[INFO] +- org.springframework.boot:spring-boot-starter-web:jar:2.0.5.RELEASE:compile
[INFO] |  +- org.springframework.boot:spring-boot-starter-json:jar:2.0.5.RELEASE:compile
[INFO] |  |  +- com.fasterxml.jackson.core:jackson-databind:jar:2.9.6:compile
[INFO] |  |  |  +- com.fasterxml.jackson.core:jackson-annotations:jar:2.9.0:compile
[INFO] |  |  |  \- com.fasterxml.jackson.core:jackson-core:jar:2.9.6:compile
[INFO] |  |  +- com.fasterxml.jackson.datatype:jackson-datatype-jdk8:jar:2.9.6:compile
[INFO] |  |  +- com.fasterxml.jackson.datatype:jackson-datatype-jsr310:jar:2.9.6:compile
[INFO] |  |  \- com.fasterxml.jackson.module:jackson-module-parameter-names:jar:2.9.6:compile
[INFO] |  +- org.springframework.boot:spring-boot-starter-tomcat:jar:2.0.5.RELEASE:compile
[INFO] |  |  +- org.apache.tomcat.embed:tomcat-embed-core:jar:8.5.34:compile
[INFO] |  |  +- org.apache.tomcat.embed:tomcat-embed-el:jar:8.5.34:compile
[INFO] |  |  \- org.apache.tomcat.embed:tomcat-embed-websocket:jar:8.5.34:compile
[INFO] |  +- org.hibernate.validator:hibernate-validator:jar:6.0.12.Final:compile
[INFO] |  |  +- javax.validation:validation-api:jar:2.0.1.Final:compile
[INFO] |  |  +- org.jboss.logging:jboss-logging:jar:3.3.2.Final:compile
[INFO] |  |  \- com.fasterxml:classmate:jar:1.3.4:compile
[INFO] |  +- org.springframework:spring-web:jar:5.0.9.RELEASE:compile
[INFO] |  \- org.springframework:spring-webmvc:jar:5.0.9.RELEASE:compile
[INFO] |     \- org.springframework:spring-expression:jar:5.0.9.RELEASE:compile
[INFO] +- org.springframework.boot:spring-boot-starter:jar:2.0.5.RELEASE:compile
[INFO] |  +- org.springframework.boot:spring-boot:jar:2.0.5.RELEASE:compile
[INFO] |  +- org.springframework.boot:spring-boot-autoconfigure:jar:2.0.5.RELEASE:compile
[INFO] |  +- org.springframework.boot:spring-boot-starter-logging:jar:2.0.5.RELEASE:compile
[INFO] |  |  +- org.apache.logging.log4j:log4j-to-slf4j:jar:2.10.0:compile
[INFO] |  |  |  \- org.apache.logging.log4j:log4j-api:jar:2.10.0:compile
[INFO] |  |  \- org.slf4j:jul-to-slf4j:jar:1.7.25:compile
[INFO] |  +- javax.annotation:javax.annotation-api:jar:1.3.2:compile
[INFO] |  +- org.springframework:spring-core:jar:5.0.9.RELEASE:compile
[INFO] |  |  \- org.springframework:spring-jcl:jar:5.0.9.RELEASE:compile
[INFO] |  \- org.yaml:snakeyaml:jar:1.19:runtime
[INFO] +- com.daml:codegen-java:jar:1.13.1:compile
[INFO] +- com.daml:bindings-rxjava:jar:1.13.1:compile
[INFO] |  +- com.daml:bindings-java:jar:1.13.1:compile
[INFO] |  |  +- com.google.code.findbugs:jsr305:jar:3.0.2:compile
[INFO] |  |  \- com.google.guava:guava:jar:29.0-jre:compile
[INFO] |  |     +- com.google.guava:failureaccess:jar:1.0.1:compile
[INFO] |  |     +- com.google.guava:listenablefuture:jar:9999.0-empty-to-avoid-conflict-with-guava:compile
[INFO] |  |     +- org.checkerframework:checker-qual:jar:2.11.1:compile
[INFO] |  |     \- com.google.j2objc:j2objc-annotations:jar:1.3:compile
[INFO] |  +- com.daml:ledger-api-auth-client:jar:1.13.1:compile
[INFO] |  +- com.daml:rs-grpc-bridge:jar:1.13.1:compile
[INFO] |  |  \- org.reactivestreams:reactive-streams:jar:1.0.2:compile
[INFO] |  +- com.google.api.grpc:proto-google-common-protos:jar:2.0.1:compile
[INFO] |  +- com.google.protobuf:protobuf-java:jar:3.14.0:compile
[INFO] |  +- io.grpc:grpc-api:jar:1.35.0:compile
[INFO] |  |  +- io.grpc:grpc-context:jar:1.35.0:compile
[INFO] |  |  +- com.google.errorprone:error_prone_annotations:jar:2.4.0:compile
[INFO] |  |  \- org.codehaus.mojo:animal-sniffer-annotations:jar:1.19:runtime
[INFO] |  +- io.grpc:grpc-core:jar:1.35.0:compile
[INFO] |  |  +- com.google.code.gson:gson:jar:2.8.5:runtime
[INFO] |  |  +- com.google.android:annotations:jar:4.1.1.4:runtime
[INFO] |  |  \- io.perfmark:perfmark-api:jar:0.23.0:runtime
[INFO] |  +- io.grpc:grpc-netty:jar:1.35.0:compile
[INFO] |  |  +- io.netty:netty-codec-http2:jar:4.1.52.Final:compile
[INFO] |  |  \- io.netty:netty-handler-proxy:jar:4.1.52.Final:compile
[INFO] |  +- io.grpc:grpc-protobuf:jar:1.35.0:compile
[INFO] |  |  \- io.grpc:grpc-protobuf-lite:jar:1.35.0:compile
[INFO] |  +- io.grpc:grpc-stub:jar:1.35.0:compile
[INFO] |  +- io.netty:netty-handler:jar:4.1.58.Final:compile
[INFO] |  +- io.reactivex.rxjava2:rxjava:jar:2.1.17:compile
[INFO] |  +- org.checkerframework:checker:jar:2.5.4:compile
[INFO] |  +- org.pcollections:pcollections:jar:2.1.3:compile
[INFO] |  \- org.slf4j:slf4j-api:jar:1.7.25:compile
[INFO] +- com.daml:daml-lf-1.8-archive-java-proto:jar:1.13.1:compile
[INFO] +- ch.qos.logback:logback-classic:jar:1.2.3:compile
[INFO] |  \- ch.qos.logback:logback-core:jar:1.2.3:compile
[INFO] +- com.sparkjava:spark-core:jar:2.7.2:compile
[INFO] |  +- org.eclipse.jetty:jetty-server:jar:9.4.12.v20180830:compile
[INFO] |  |  +- javax.servlet:javax.servlet-api:jar:3.1.0:compile
[INFO] |  |  +- org.eclipse.jetty:jetty-http:jar:9.4.12.v20180830:compile
[INFO] |  |  |  \- org.eclipse.jetty:jetty-util:jar:9.4.12.v20180830:compile
[INFO] |  |  \- org.eclipse.jetty:jetty-io:jar:9.4.12.v20180830:compile
[INFO] |  +- org.eclipse.jetty:jetty-webapp:jar:9.4.12.v20180830:compile
[INFO] |  |  +- org.eclipse.jetty:jetty-xml:jar:9.4.12.v20180830:compile
[INFO] |  |  \- org.eclipse.jetty:jetty-servlet:jar:9.4.12.v20180830:compile
[INFO] |  |     \- org.eclipse.jetty:jetty-security:jar:9.4.12.v20180830:compile
[INFO] |  +- org.eclipse.jetty.websocket:websocket-server:jar:9.4.12.v20180830:compile
[INFO] |  |  +- org.eclipse.jetty.websocket:websocket-common:jar:9.4.12.v20180830:compile
[INFO] |  |  \- org.eclipse.jetty.websocket:websocket-client:jar:9.4.12.v20180830:compile
[INFO] |  |     \- org.eclipse.jetty:jetty-client:jar:9.4.12.v20180830:compile
[INFO] |  \- org.eclipse.jetty.websocket:websocket-servlet:jar:9.4.12.v20180830:compile
[INFO] |     \- org.eclipse.jetty.websocket:websocket-api:jar:9.4.12.v20180830:compile
[INFO] +- com.googlecode.json-simple:json-simple:jar:1.1.1:compile
[INFO] +- org.springframework.plugin:spring-plugin-core:jar:2.0.0.RELEASE:compile
[INFO] |  +- org.springframework:spring-beans:jar:5.0.9.RELEASE:compile
[INFO] |  +- org.springframework:spring-context:jar:5.0.9.RELEASE:compile
[INFO] |  \- org.springframework:spring-aop:jar:5.0.9.RELEASE:compile
[INFO] +- junit:junit:jar:4.13.1:test
[INFO] |  \- org.hamcrest:hamcrest-core:jar:1.3:test
[INFO] \- org.apache.tomcat:tomcat-catalina:jar:10.0.6:compile
[INFO]    +- org.apache.tomcat:tomcat-servlet-api:jar:10.0.6:compile
[INFO]    +- org.apache.tomcat:tomcat-jsp-api:jar:8.5.34:compile
[INFO]    |  \- org.apache.tomcat:tomcat-el-api:jar:8.5.34:compile
[INFO]    +- org.apache.tomcat:tomcat-juli:jar:10.0.6:compile
[INFO]    +- org.apache.tomcat:tomcat-annotations-api:jar:8.5.34:compile
[INFO]    +- org.apache.tomcat:tomcat-api:jar:10.0.6:compile
[INFO]    +- org.apache.tomcat:tomcat-jni:jar:10.0.6:compile
[INFO]    +- org.apache.tomcat:tomcat-coyote:jar:10.0.6:compile
[INFO]    +- org.apache.tomcat:tomcat-util:jar:10.0.6:compile
[INFO]    +- org.apache.tomcat:tomcat-util-scan:jar:10.0.6:compile
[INFO]    \- org.apache.tomcat:tomcat-jaspic-api:jar:10.0.6:compile

Error:

[ERROR] Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Handler dispatch failed; nested exception is java.lang.NoClassDefFoundError: io/netty/channel/ChannelFactory] with root cause
java.lang.ClassNotFoundException: io.netty.channel.ChannelFactory
	at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at org.springframework.boot.loader.LaunchedURLClassLoader.loadClass(LaunchedURLClassLoader.java:93)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	at io.grpc.netty.NettyChannelProvider.builderForAddress(NettyChannelProvider.java:38)
	at io.grpc.netty.NettyChannelProvider.builderForAddress(NettyChannelProvider.java:24)
	at io.grpc.ManagedChannelBuilder.forAddress(ManagedChannelBuilder.java:39)
	at com.blockchain.daml.serviceImpl.InvitationServiceImpl.invitation(InvitationServiceImpl.java:54)
	at com.blockchain.daml.controllers.InvitationController.invitation(InvitationController.java:30)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:209)
	at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:136)
	at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:102)
	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:891)
	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:797)
	at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:991)
	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:925)
	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:974)
	at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:877)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:661)
	at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:851)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:109)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:93)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:493)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:800)
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:806)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1498)
	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.lang.Thread.run(Thread.java:748)

are there anymore netty related dependencies required?

GA
Gary_Verhaegen
Jun 2021

After deeper investigation, it appears we have three netty versions at play:

  • Spring wants 4.1.29,
  • gRPC wants 4.1.52, and
  • Daml wants 4.1.58.

I have no idea why this is not reflected in the output of mvn dependency:tree (making that command pretty useless imo); I gathered that by actually looking at the POMs of the dependencies. You can unify all of your netty dependencies on 4.1.58 (assuming semver, that should work) with this dependencyManagement block:

    <dependencyManagement>                                                                                                                                                                                                                   
        <dependencies>                                                                                                                                                                                                                       
            <!-- Override Spring dependency on 4.1.29.Final -->                                                                                                                                                                              
            <dependency>                                                                                                                                                                                                                     
                <groupId>io.netty</groupId>                                                                                                                                                                                                  
                <artifactId>netty-bom</artifactId>                                                                                                                                                                                           
                <version>4.1.58.Final</version>                                                                                                                                                                                              
                <type>pom</type>                                                                                                                                                                                                             
            </dependency>                                                                                                                                                                                                                    
            <dependency>                                                                                                                                                                                                                     
                <groupId>io.netty</groupId>                                                                                                                                                                                                  
                <artifactId>netty-buffer</artifactId>                                                                                                                                                                                        
                <version>4.1.58.Final</version>                                                                                                                                                                                              
            </dependency>                                                                                                                                                                                                                    
            <!-- Override gRPC dependency on 4.1.52.Final -->                                                                                                                                                                                
            <dependency>                                                                                                                                                                                                                     
                <groupId>io.netty</groupId>                                                                                                                                                                                                  
                <artifactId>netty-codec-http2</artifactId>                                                                                                                                                                                   
                <version>4.1.58.Final</version>                                                                                                                                                                                              
            </dependency>                                                                                                                                                                                                                    
            <dependency>                                                                                                                                                                                                                     
                <groupId>io.netty</groupId>                                                                                                                                                                                                  
                <artifactId>netty-handler-proxy</artifactId>                                                                                                                                                                                 
                <version>4.1.58.Final</version>                                                                                                                                                                                              
            </dependency>                                                                                                                                                                                                                    
        </dependencies>                                                                                                                                                                                                                      
    </dependencyManagement> 

I’m not very familiar with the Netty project myself, and in particular its attention to details like cross-version compatibility and semantic versioning, so I can’t guarantee that this will get you a working project. But it’s worth a try.

TE
tejashree_parab
Jun 2021

Thanks, @bernhard and @Gary_Verhaegen for your support.

Issue got resolved

← Back to Discussions