Uploaded image for project: 'Apache Curator'
  1. Apache Curator
  2. CURATOR-509

Incompatible with Java 11

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 4.1.0
    • 4.2.0
    • Apache
    • None
    • java 11.0.2 on windows and linux

    Description

      In java 11, this exception is thrown:

      java.lang.IncompatibleClassChangeError: Inconsistent constant pool data in classfile for class org/apache/curator/framework/CuratorFramework. Method lambda$postSafeNotify$0(Ljava/lang/Object;)V at index 99 is CONSTANT_MethodRef and should be CONSTANT_InterfaceMethodRef

      at org.apache.curator.framework.CuratorFramework.postSafeNotify(CuratorFramework.java:344)

      at org.apache.curator.framework.recipes.locks.InterProcessSemaphoreV2$1.process(InterProcessSemaphoreV2.java:90)

      at org.apache.curator.framework.imps.NamespaceWatcher.process(NamespaceWatcher.java:77)

      at org.apache.zookeeper.ClientCnxn$EventThread.processEvent(ClientCnxn.java:533)

      at org.apache.zookeeper.ClientCnxn$EventThread.run(ClientCnxn.java:508)

      As I understood it, this is because there is a lambda in a default interface method and earlier versions of java 8 incorrectly compiled the method reference as a Method instead of an Interface method. Compiling with the latest java 8 compiler (8.0.172) seems to correctly compile the classin a way that works in java 8 and 11 (did not verify 9 and 10 but I suspect they behave like 11)

      Attachments

        Activity

          People

            randgalt Jordan Zimmerman
            brianvell Brian Vella
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: