ClassNotFoundException in scala-xml with Scala 2.13

513 Views Asked by At

I have been using scala-xml successfully for a long time on Linux. I recently upgraded to Scala 2.13.0 and scala-xml 1.2.0. I am using sbt 1.2.8 with this line:

libraryDependencies += "org.scala-lang.modules" %% "scala-xml" % "1.2.0"

It compiles, but then I get a runtime error:

java.lang.ClassNotFoundException: scala.xml.MetaData

Any idea what the problem could be? Thanks.

1

There are 1 best solutions below

0
Russ P. On

With some kind help from the Scala user forum, I figured out that this problem was the result of an inconsistent CLASSPATH at run time vs. compile time.