java.lang.NoSuchMethodError
This is the setup that I have for MLeap
gitSha: 07b16eb9094c6f2bbe52d6d1214c24d411488b3f
version: 0.7.0-SNAPSHOT
I was trying to run the Create and export a spark pipeline code as follows: The following issue is the same regardless of the spark version (2.1.0 or 2.2.0)
- I'm removing first the
.ivy2cacherm -rf ~/.ivy2 spark-shell --packages ml.combust.mleap:mleap-spark_2.11:0.7.0- from inside the shell
:load mleap.scalato load the above code
Although the bundle file is being created at the designated path, I get the following errors. My guess is that the resulted bundle file is corrupted anyway.
- when using
scala-arm_2.11-1.4
java.lang.NoSuchMethodError: resource.ExtractableManagedResource.tried()Lscala/util/Try;
at ml.combust.bundle.serializer.BundleSerializer$$anonfun$write$1$$anonfun$apply$1.apply(BundleSerializer.scala:40)
at ml.combust.bundle.serializer.BundleSerializer$$anonfun$write$1$$anonfun$apply$1.apply(BundleSerializer.scala:35)
at scala.util.Success.flatMap(Try.scala:231)
at ml.combust.bundle.serializer.BundleSerializer$$anonfun$write$1.apply(BundleSerializer.scala:34)
at ml.combust.bundle.serializer.BundleSerializer$$anonfun$write$1.apply(BundleSerializer.scala:29)
at scala.util.Try$.apply(Try.scala:192)
at ml.combust.bundle.serializer.BundleSerializer.write(BundleSerializer.scala:29)
at ml.combust.bundle.BundleWriter.save(BundleWriter.scala:27)
at $anonfun$2.apply(<console>:57)
at $anonfun$2.apply(<console>:56)
at resource.AbstractManagedResource$$anonfun$5.apply(AbstractManagedResource.scala:86)
at scala.util.control.Exception$Catch$$anonfun$either$1.apply(Exception.scala:125)
at scala.util.control.Exception$Catch$$anonfun$either$1.apply(Exception.scala:125)
at scala.util.control.Exception$Catch.apply(Exception.scala:103)
at scala.util.control.Exception$Catch.either(Exception.scala:125)
at resource.AbstractManagedResource.acquireFor(AbstractManagedResource.scala:86)
at resource.ManagedResourceOperations$class.acquireAndGet(ManagedResourceOperations.scala:25)
at resource.AbstractManagedResource.acquireAndGet(AbstractManagedResource.scala:48)
at resource.ManagedResourceOperations$class.foreach(ManagedResourceOperations.scala:45)
at resource.AbstractManagedResource.foreach(AbstractManagedResource.scala:48)
... 85 elided
- when using
scala-arm_2.11-2.0
java.lang.NoSuchMethodError: resource.package$.managed(Lscala/Function0;Lresource/Resource;Lscala/reflect/Manifest;)Lresource/ManagedResource;
at ml.combust.bundle.serializer.BundleSerializer$$anonfun$write$1$$anonfun$apply$1.apply(BundleSerializer.scala:36)
at ml.combust.bundle.serializer.BundleSerializer$$anonfun$write$1$$anonfun$apply$1.apply(BundleSerializer.scala:35)
at scala.util.Success.flatMap(Try.scala:231)
at ml.combust.bundle.serializer.BundleSerializer$$anonfun$write$1.apply(BundleSerializer.scala:34)
at ml.combust.bundle.serializer.BundleSerializer$$anonfun$write$1.apply(BundleSerializer.scala:29)
at scala.util.Try$.apply(Try.scala:192)
at ml.combust.bundle.serializer.BundleSerializer.write(BundleSerializer.scala:29)
at ml.combust.bundle.BundleWriter.save(BundleWriter.scala:27)
at $anonfun$2.apply(<console>:55)
at $anonfun$2.apply(<console>:54)
at resource.AbstractManagedResource$$anonfun$5.apply(AbstractManagedResource.scala:88)
at scala.util.control.Exception$Catch$$anonfun$either$1.apply(Exception.scala:125)
at scala.util.control.Exception$Catch$$anonfun$either$1.apply(Exception.scala:125)
at scala.util.control.Exception$Catch.apply(Exception.scala:103)
at scala.util.control.Exception$Catch.either(Exception.scala:125)
at resource.AbstractManagedResource.acquireFor(AbstractManagedResource.scala:88)
at resource.ManagedResourceOperations$class.apply(ManagedResourceOperations.scala:26)
at resource.AbstractManagedResource.apply(AbstractManagedResource.scala:50)
at resource.ManagedResourceOperations$class.acquireAndGet(ManagedResourceOperations.scala:25)
at resource.AbstractManagedResource.acquireAndGet(AbstractManagedResource.scala:50)
at resource.ManagedResourceOperations$class.foreach(ManagedResourceOperations.scala:53)
at resource.AbstractManagedResource.foreach(AbstractManagedResource.scala:50)
... 81 elided
It could be an issue with my environment. I tried to google up but without any success. If anyone got into similar issues, what would be a way to fix this.
@rgeos Hello,
My guess is you are using MLeap 0.7.0, which depends on scala-arm version 2.0-RC1. MLeap 0.8.0 is update to depend on scala-arm 2.0. There is a binary incompatibility between the two unfortunately that will cause the error you are seeing.
@hollinwilkins that solved the issue! Thank you.