Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java.lang.NoSuchMethodError #257

Closed
rgeos opened this issue Sep 8, 2017 · 2 comments
Closed

java.lang.NoSuchMethodError #257

rgeos opened this issue Sep 8, 2017 · 2 comments

Comments

@rgeos
Copy link

rgeos commented Sep 8, 2017

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)

  1. I'm removing first the .ivy2 cache rm -rf ~/.ivy2
  2. spark-shell --packages ml.combust.mleap:mleap-spark_2.11:0.7.0
  3. from inside the shell :load mleap.scala to 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.

@hollinwilkins
Copy link
Member

@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.

@rgeos
Copy link
Author

rgeos commented Sep 8, 2017

@hollinwilkins that solved the issue! Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants