title: Flink with shaded zookeeper: java.lang.NoSuchMethodError for QuorumMaj
body: <p>I'm deploying a Flink standaloneApplication mode with high availability enabled (via zookeeper).</p>
  <p>Bot the JobManager and the TaskManager initialization fail on:</p>
  <pre><code>[2022-09-07 09:09:28,871] ERROR [org.apache.flink.runtime.entrypoint.ClusterEntrypoint] - Could not start cluster entrypoint StandaloneApplicationClusterEntryPoint.
  org.apache.flink.runtime.entrypoint.ClusterEntrypointException: Failed to initialize the cluster entrypoint StandaloneApplicationClusterEntryPoint.
      at org.apache.flink.runtime.entrypoint.ClusterEntrypoint.startCluster(ClusterEntrypoint.java:250) ~[jobs-0.1.1-20220907.080009-87.jar:?]
      at org.apache.flink.runtime.entrypoint.ClusterEntrypoint.runClusterEntrypoint(ClusterEntrypoint.java:711) [jobs-0.1.1-20220907.080009-87.jar:?]
      at org.apache.flink.container.entrypoint.StandaloneApplicationClusterEntryPoint.main(StandaloneApplicationClusterEntryPoint.java:82) [jobs-0.1.1-20220907.080009-87.jar:?]
  Caused by: java.lang.NoSuchMethodError: 'void org.apache.flink.shaded.zookeeper3.org.apache.zookeeper.server.quorum.flexible.QuorumMaj.&lt;init&gt;(java.util.Map)'
      at org.apache.flink.shaded.curator5.org.apache.curator.framework.imps.EnsembleTracker.&lt;init&gt;(EnsembleTracker.java:57) ~[jobs-0.1.1-20220907.080009-87.jar:?]
      at org.apache.flink.shaded.curator5.org.apache.curator.framework.imps.CuratorFrameworkImpl.&lt;init&gt;(CuratorFrameworkImpl.java:187) ~[jobs-0.1.1-20220907.080009-87.jar:?]
      at org.apache.flink.shaded.curator5.org.apache.curator.framework.CuratorFrameworkFactory$Builder.build(CuratorFrameworkFactory.java:188) ~[jobs-0.1.1-20220907.080009-87.jar:?]
      at org.apache.flink.runtime.util.ZooKeeperUtils.startCuratorFramework(ZooKeeperUtils.java:289) ~[jobs-0.1.1-20220907.080009-87.jar:?]
      at org.apache.flink.runtime.util.ZooKeeperUtils.startCuratorFramework(ZooKeeperUtils.java:274) ~[jobs-0.1.1-20220907.080009-87.jar:?]
      at org.apache.flink.runtime.highavailability.HighAvailabilityServicesUtils.createZooKeeperHaServices(HighAvailabilityServicesUtils.java:90) ~[jobs-0.1.1-20220907.080009-87.jar:?]
      at org.apache.flink.runtime.highavailability.HighAvailabilityServicesUtils.createHighAvailabilityServices(HighAvailabilityServicesUtils.java:140) ~[jobs-0.1.1-20220907.080009-87.jar:?]
      at org.apache.flink.runtime.entrypoint.ClusterEntrypoint.createHaServices(ClusterEntrypoint.java:427) ~[jobs-0.1.1-20220907.080009-87.jar:?]
      at org.apache.flink.runtime.entrypoint.ClusterEntrypoint.initializeServices(ClusterEntrypoint.java:376) ~[jobs-0.1.1-20220907.080009-87.jar:?]
      at org.apache.flink.runtime.entrypoint.ClusterEntrypoint.runCluster(ClusterEntrypoint.java:277) ~[jobs-0.1.1-20220907.080009-87.jar:?]
      at org.apache.flink.runtime.entrypoint.ClusterEntrypoint.lambda$startCluster$1(ClusterEntrypoint.java:227) ~[jobs-0.1.1-20220907.080009-87.jar:?]
      at java.security.AccessController.doPrivileged(Native Method) ~[?:?]
  </code></pre>
  <p>I'm building the a fat jar with maven and I have included compile dependencies on shaded-zookeper from flink (version 1.15.2 with Java 11). Pom looks like:</p>
  <pre class="lang-xml prettyprint-override"><code>&lt;...
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.flink&lt;/groupId&gt;
              &lt;artifactId&gt;flink-java&lt;/artifactId&gt;
              &lt;version&gt;${flink.version}&lt;/version&gt;
              &lt;scope&gt;compile&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.flink&lt;/groupId&gt;
              &lt;artifactId&gt;flink-core&lt;/artifactId&gt;
              &lt;version&gt;${flink.version}&lt;/version&gt;
              &lt;scope&gt;compile&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.flink&lt;/groupId&gt;
              &lt;artifactId&gt;flink-streaming-java&lt;/artifactId&gt;
              &lt;version&gt;${flink.version}&lt;/version&gt;
              &lt;scope&gt;compile&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.flink&lt;/groupId&gt;
              &lt;artifactId&gt;flink-avro&lt;/artifactId&gt;
              &lt;version&gt;${flink.version}&lt;/version&gt;
              &lt;scope&gt;compile&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.flink&lt;/groupId&gt;
              &lt;artifactId&gt;flink-connector-kafka&lt;/artifactId&gt;
              &lt;version&gt;${flink.version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.flink&lt;/groupId&gt;
              &lt;artifactId&gt;flink-container&lt;/artifactId&gt;
              &lt;version&gt;${flink.version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.flink&lt;/groupId&gt;
              &lt;artifactId&gt;flink-clients&lt;/artifactId&gt;
              &lt;version&gt;${flink.version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.flink&lt;/groupId&gt;
              &lt;artifactId&gt;flink-runtime&lt;/artifactId&gt;
              &lt;version&gt;${flink.version}&lt;/version&gt;
              &lt;scope&gt;compile&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.flink&lt;/groupId&gt;
              &lt;artifactId&gt;flink-metrics-core&lt;/artifactId&gt;
              &lt;version&gt;${flink.version}&lt;/version&gt;
              &lt;scope&gt;compile&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.flink&lt;/groupId&gt;
              &lt;artifactId&gt;flink-shaded-zookeeper-3&lt;/artifactId&gt;
              &lt;version&gt;3.6.3-15.0&lt;/version&gt;
              &lt;scope&gt;compile&lt;/scope&gt;
          &lt;/dependency&gt;
  
  ../&gt;
  </code></pre>
  <p>I tried adding the shaded curator in the pom file (and explicitly in classpath) but also didn't work. I have also tried using shaded zookeeper version 3.4 and 3.5 but also without any success.</p>
  <p>Is there an incompatibility with zookeeper and curator? Any ideas how to proceed?</p>