Here's an example:
import org.scala_tools.time.Imports._
...
val dt1 : DateTime = new DateTime ("2010-09-01T12:00Z")
val dt2 : DateTime = new DateTime ("2010-10-01T12:10Z")
println (dt1 < dt2) // This is the Main.scala:48 line mentioned in the stack trace below
...
If I compile and run it, I get
java.lang.NoClassDefFoundError: scala/Ordered
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:634)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:277)
at java.net.URLClassLoader.access$000(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:212)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
at org.scala_tools.time.JodaImplicits$class.RichReadableInstant(Implicits.scala:70)
at org.scala_tools.time.Imports$.RichReadableInstant(Imports.scala:20)
at myproject.Main$.main(Main.scala:48)
...
What may the reason be and how to fix this?
I use all (joda-time, SBT, Scala, SUN JVM) the latest stable releases (excl joda-time - I use its latest snapshot version).