5

I'm calling a method in a Java class from JRuby via reflection

fact = Factory.factory('aString')

calls this method in java

public static Service factory(String url) throws IllegalArgumentException { return new _Service(url); };

and I'm getting

Java::JavaLang::NoClassDefFoundError: scala/collection/Seq
codebee
  • 824
  • 1
  • 9
  • 22
  • 1
    it might help http://stackoverflow.com/questions/14417814/why-do-i-get-java-lang-noclassdeffounderror-when-i-trying-to-run-this-code – RockAndRoll Nov 24 '15 at 04:16

1 Answers1

10

It happened because my java code was build with Scala, but at runtime scala library wasn't available. Added scala-library.jar to classpath, that resolved it.

codebee
  • 824
  • 1
  • 9
  • 22