Error de clase roto con Joda Time usando Scala
Estoy agregando el repositorio Joda Time a SBT con
libraryDependencies ++= Seq(
"joda-time" % "joda-time" % "2.1"
)
Entonces alegremente lo uso así:
val ymd = org.joda.time.format.DateTimeFormat.forPattern("yyyyMMdd")
ymd.parseDateTime("20121212")
Pero, cuando compilo el proyecto en SBT, obtengo un desagradable:
[warn] Class org.joda.convert.FromString not found - continuing with a stub.
[warn] Caught: java.lang.NullPointerException while parsing annotations in /home/jack/.ivy2/cache/joda-time/joda-time/jars/joda-time-2.1.jar(org/joda/time/DateTime.class)
[error] error while loading DateTime, class file '/home/jack/.ivy2/cache/joda-time/joda-time/jars/joda-time-2.1.jar(org/joda/time/DateTime.class)' is broken
[error] (class java.lang.RuntimeException/bad constant pool tag 10 at byte 42)
Probé la versión 2.0 de joda-time, pero obtuve el mismo error.
90
2 answers
Añade esta dependencia:
" org.joda" % "joda-convertir" % "1.8.1"
Es una dependencia opcional de joda-time. Tuve que añadirlo en mi propio proyecto para que el compilador de scala aceptara trabajar con el jar joda-time.
Su problema parece ser el mismo.
La versión es como en el momento de la edición, las últimas versiones se pueden encontrar aquí
174
Author: David Pierre,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2016-12-29 10:41:49
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2016-12-29 10:41:49
Me estaba topando con un problema similar:
[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)
Agregar explícitamente una dependencia jcip-annotations-1.0.jar
resolvió el problema.
1
Author: mn2013,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2013-10-16 18:19:54
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2013-10-16 18:19:54