2

I have a scala .class file that I convert to a jar and try to register to a pig script. It is able to find that class now BUT it throws a ClassNotFoundException for scala.ScalaObject.

I notice that there is a scala.ScalaObject.class entry in the scala-library jar in the littlepiggy/lib folder.

Question 1

Shouldn't this jar be directly accessible anyways? Or do I have to add this path to an equivalent of a CLASSPATH for Pig?

Question 2

After this, I forcefully registered that jar as well.

I got this error:

java.lang.NoSuchMethodError: scala.collection.JavaConversions$.asScalaIterator(Ljava/util/Iterator;)Lscala/collection/Iterator

This doesn't look right to me. Any ideas?

PS - This source suggests that I should include the scala-library jar but Pig should already be able to find it and anyways, its not really working for me. (http://mehack.com/levenshtein-distance-function-for-pig-and-had-0)

Navneet
  • 9,590
  • 11
  • 34
  • 51

1 Answers1

0

The answer's here. Should have checked out a more exhaustive set of keywords.

NoSuchMethodError when attempting to implicitly convert a java to scala collection

I was using different scala versions to build the class file and then in pig.

Thanks!

Community
  • 1
  • 1
Navneet
  • 9,590
  • 11
  • 34
  • 51