Class broken error with Joda Time using Scala

后端 未结 2 856
猫巷女王i
猫巷女王i 2020-12-05 03:36

I\'m adding the Joda Time repository to SBT with

libraryDependencies ++= Seq(
  \"joda-time\"         % \"joda-time\"           % \"2.1\"
)

相关标签:
2条回答
  • 2020-12-05 04:06

    Add this dependency:

    "org.joda" % "joda-convert" % "1.8.1"

    It's an optional dependency of joda-time. I had to add it in my own project for the scala compiler to accept working with the joda-time jar.

    Your issue seems to be the same.

    Version is as at time of editing, latest versions can be found here

    0 讨论(0)
  • 2020-12-05 04:22

    I was running into a similar issue:

    [warn] Class net.jcip.annotations.NotThreadSafe not found - continuing with a stub.
    [warn] Caught: java.lang.NullPointerException while parsing annotations in ~/.ivy2-p2/cache/org.opensaml/xmltooling/jars/xmltooling-1.3.4.jar(org/opensaml/xml/util/IDIndex.class)
    [error] error while loading AttributeMap, class file '~/.ivy2-p2/cache/org.opensaml/xmltooling/jars/xmltooling-1.3.4.jar(org/opensaml/xml/util/AttributeMap.class)' is broken
    [error] (class java.lang.RuntimeException/bad constant pool index: 0 at pos: 12058)
    

    Explicitly adding a dependency jcip-annotations-1.0.jar resolved the issue.

    0 讨论(0)
提交回复
热议问题