Uploaded image for project: 'Geode'
  1. Geode
  2. GEODE-5199

Unable to deploy Scala JARs

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.6.0
    • None

    Description

      Using the gfsh (Geode 1.6.0) command to deploy a JAR containing the Scala library results in the following error:

      [error 2018/05/09 21:00:21.201 PDT server1 <Function Execution Processor1> tid=0x4f] Could not deploy JAR file java.lang.IllegalArgumentException: A class and its auxiliary class have different superclasses: class extends scala.runtime.AbstractFunction1<java.util.Properties, scala.collection.convert.Wrappers$JPropertiesWrapper> implements scala.Serializable ; class extends scala.collection.mutable.AbstractMap<java.lang.String, java.lang.String> implements scala.Product, scala.Serializable
      java.lang.RuntimeException: java.lang.IllegalArgumentException: A class and its auxiliary class have different superclasses: class extends scala.runtime.AbstractFunction1<java.util.Properties, scala.collection.convert.Wrappers$JPropertiesWrapper> implements scala.Serializable ; class extends scala.collection.mutable.AbstractMap<java.lang.String, java.lang.String> implements scala.Product, scala.Serializable
      	at io.github.lukehutch.fastclasspathscanner.FastClasspathScanner.scan(FastClasspathScanner.java:1513)
      	at io.github.lukehutch.fastclasspathscanner.FastClasspathScanner.scan(FastClasspathScanner.java:1544)
      	at io.github.lukehutch.fastclasspathscanner.FastClasspathScanner.scan(FastClasspathScanner.java:1567)
      	at org.apache.geode.management.internal.deployment.FunctionScanner.findFunctionsInJar(FunctionScanner.java:38)
      	at org.apache.geode.internal.DeployedJar.findFunctionsInThisJar(DeployedJar.java:338)
      	at org.apache.geode.internal.DeployedJar.registerFunctions(DeployedJar.java:157)
      	at org.apache.geode.internal.JarDeployer.registerNewVersions(JarDeployer.java:373)
      	at org.apache.geode.internal.JarDeployer.deploy(JarDeployer.java:413)
      	at org.apache.geode.management.internal.cli.functions.DeployFunction.execute(DeployFunction.java:79)
      	at org.apache.geode.internal.cache.MemberFunctionStreamingMessage.process(MemberFunctionStreamingMessage.java:193)
      	at org.apache.geode.distributed.internal.DistributionMessage.scheduleAction(DistributionMessage.java:378)
      	at org.apache.geode.distributed.internal.DistributionMessage$1.run(DistributionMessage.java:444)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      	at org.apache.geode.distributed.internal.ClusterDistributionManager.runUntilShutdown(ClusterDistributionManager.java:1121)
      	at org.apache.geode.distributed.internal.ClusterDistributionManager.access$000(ClusterDistributionManager.java:109)
      	at org.apache.geode.distributed.internal.ClusterDistributionManager$9$1.run(ClusterDistributionManager.java:990)
      	at java.lang.Thread.run(Thread.java:748)
      Caused by: java.lang.IllegalArgumentException: A class and its auxiliary class have different superclasses: class extends scala.runtime.AbstractFunction1<java.util.Properties, scala.collection.convert.Wrappers$JPropertiesWrapper> implements scala.Serializable ; class extends scala.collection.mutable.AbstractMap<java.lang.String, java.lang.String> implements scala.Product, scala.Serializable
      	at io.github.lukehutch.fastclasspathscanner.typesignature.ClassTypeSignature.merge(ClassTypeSignature.java:177)
      	at io.github.lukehutch.fastclasspathscanner.scanner.ClassInfo.addTypeDescriptor(ClassInfo.java:691)
      	at io.github.lukehutch.fastclasspathscanner.scanner.ClassInfoUnlinked.link(ClassInfoUnlinked.java:208)
      	at io.github.lukehutch.fastclasspathscanner.scanner.Scanner.call(Scanner.java:443)
      	at io.github.lukehutch.fastclasspathscanner.scanner.Scanner.call(Scanner.java:56)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      	... 1 more
      

      Here is a minimal reproduction

       # download Scala 2.11.12
       curl -O [http://central.maven.org/maven2/org/scala-lang/scala-library/2.11.12/scala-library-2.11.12.jar]
      
       # or Scala 2.12.6
       curl -O [http://central.maven.org/maven2/org/scala-lang/scala-library/2.11.12/scala-library-2.11.12.jar]
      
      gfsh \
       -e "start locator --name=locator1" \
       -e "start server --name=server1" \
       -e "deploy --jar=scala-library-2.12.6.jar"
      

      This appears to be a [known issue|https://github.com/lukehutch/fast-classpath-scanner/issues/193] with fast-classpath-scanner and has been fixed in >= 2.19.0. Changing `fast-classpath-scanner.version` to `2.19.0` allows the Scala library JAR to be deployed.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              bradfordboyle Bradford D. Boyle
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 40m
                  40m