Joda-Time Library Version

169 views
Skip to first unread message

Peter Hancox

unread,
May 8, 2013, 7:45:45 PM5/8/13
to mapp...@googlegroups.com
Is it possible to use Joda-Time 2.2 (current version) instead of version 1.6.2 which is the current dependency?

If I use version 2.2 I see 8 errors similar to the following:

error while loading DateTime, class file 'C:\Users\phancox\.ivy2\cache\joda-time\joda-time\jars\joda-time-2.2.jar(org/joda/time/DateTime.class)' 
is broken (class java.lang.RuntimeException/bad constant pool tag 10 at byte 42)

kostas....@googlemail.com

unread,
May 9, 2013, 8:44:46 AM5/9/13
to mapp...@googlegroups.com, mapp...@googlegroups.com
Hi, didnt try it yet. Maybe 2.2 is not backwards compatible with 1.6.2. Though the error msg is strange. What loads the jar and fails with this error?

Sent from my self
--
You received this message because you are subscribed to the Google Groups "mapperdao" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mapperdao+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Peter Hancox

unread,
May 9, 2013, 8:53:21 AM5/9/13
to mapp...@googlegroups.com, kostas....@googlemail.com
Shows up in the eclipse problem view as soon as the jar file is replaced on the build classpath.

Just tried it with joda-time 2.0 and same problem.

Perhaps version 2.x is built with different Java version?  Not that up to speed with bytecode version issues viz Java/Scala.

Nothing in particular I need from joda-time 2.x at present, but would like to know if it could be a problem in future.

Tim Pigden

unread,
May 9, 2013, 8:54:28 AM5/9/13
to mapp...@googlegroups.com, Kostas kougios
Hi
I use jodatime a lot and would appreciate the latest stable release to be the dependency
Tim
--
Tim Pigden
Optrak Distribution Software Limited
+44 (0)1992 517100
http://www.linkedin.com/in/timpigden
http://optrak.com
Optrak Distribution Software Ltd is a limited company registered in England and Wales.
Company Registration No. 2327613 Registered Offices: Orland House, Mead Lane, Hertford, SG13 7AT England 
This email and any attachments to it may be confidential and are intended solely for the use of the individual to whom it is addressed. Any views or opinions expressed are solely those of the author and do not necessarily represent those of Optrak Distribution Software Ltd. If you are not the intended recipient of this email, you must neither take any action based upon its contents, nor copy or show it to anyone. Please contact the sender if you believe you have received this email in error.

Konstantinos Kougios

unread,
May 9, 2013, 9:43:14 AM5/9/13
to mapp...@googlegroups.com
and which JDK are you using?

Peter Hancox

unread,
May 9, 2013, 9:48:55 AM5/9/13
to mapp...@googlegroups.com, kostas....@googlemail.com
JDK 1.7.0_15

Konstantinos Kougios

unread,
May 9, 2013, 9:55:01 AM5/9/13
to Peter Hancox, mapp...@googlegroups.com
ok, then probably 2.2 is not compatible with 1.6.2. I'll have a look if I can upgrade the lib for mapperdao

Peter Hancox

unread,
May 9, 2013, 9:57:49 AM5/9/13
to mapp...@googlegroups.com, Peter Hancox, kostas....@googlemail.com
Thanks.  Let me now if there's anything I can do to assist.

REGARDS

Tim Pigden

unread,
May 9, 2013, 11:00:38 AM5/9/13
to mapp...@googlegroups.com, Kostas kougios
I'm using 1.7 latest
Tim

Konstantinos Kougios

unread,
May 9, 2013, 11:01:58 AM5/9/13
to mapp...@googlegroups.com
ok, seems an update to joda lib is needed. I'll have a look. I think there might be a conflict with scala wrapper for joda and we probably need to throw that away.

Cheers

Tim Pigden

unread,
May 9, 2013, 11:19:33 AM5/9/13
to mapp...@googlegroups.com
Actually I'm a bit puzzled
which scala wrapper are you using?
I've been using scalaj-time - and looking at my libraries it seems I'm already using joda 2.1 with it. not sure what's happening with the mapperdao collision - I can't see an older version of jodatime in my library list so I think it's working with 2.1 by default.



Konstantinos Kougios

unread,
May 9, 2013, 11:21:59 AM5/9/13
to mapp...@googlegroups.com
I am using https://github.com/jorgeortiz85/scala-time but only for tests. seems like the same lib as scala-jtime

Tim Pigden

unread,
May 9, 2013, 11:32:15 AM5/9/13
to mapp...@googlegroups.com
ok - so 0.6 
                  "org.scalaj" % "scalaj-time_2.10.0-M7" % "0.6",

pulls in jodatime 2.1 already. 
I did pop Jorge Ortiz an email asking if he'd upgrade to 2.2 - but only 10 minutes ago.
I definitely need to use that library too. 


Pending an update by Jorge would 2.1 be good enough for Peter? 


Peter Hancox

unread,
May 9, 2013, 11:45:10 AM5/9/13
to mapp...@googlegroups.com
2.1 is fine by me.  All the rest of my software was using 2.1, I only found out that 2.2 was out when I started investigating this issue.

REGARDS
Peter

Konstantinos Kougios

unread,
May 9, 2013, 4:55:23 PM5/9/13
to mapp...@googlegroups.com
weird, the problem with joda 2.x seems to be due to their jar file. I created a plain scala/mvn project (no mapperdao) and had a class with new DateTime. joda 2.2 and 2.1. I get the same compilation error from the scala compiler.

Kostas Kougios

unread,
May 11, 2013, 7:28:13 AM5/11/13
to mapp...@googlegroups.com
Verified. Any scala project is not compatible with joda 2.x . The scala compiler will give the compilation error as soon as a project class uses DateTime.

Peter Hancox

unread,
May 13, 2013, 8:50:20 PM5/13/13
to mapp...@googlegroups.com
SOLVED

Need to add dependency  "org.joda" % "joda-convert" % "1.3.1" if you want to use joda-time 2.x

Refer http://stackoverflow.com/a/13856382/1895929 but in essence joda-convert is an optional 
dependency of joda-time.  However, although the Java compiler can load a class with missing 
annotations, the Scala compiler can't.

Konstantinos Kougios

unread,
May 15, 2013, 6:19:19 PM5/15/13
to mapp...@googlegroups.com
Hi Peter, sorry for the late reply. Good catch! Thanks for reporting this. I've updated joda time to 2.2 using joda convert 1.2 (a quick search didn't reveal a 1.3.1 maven artifact).

I've deployed a snapshot of rc22

Peter Hancox

unread,
May 15, 2013, 6:42:04 PM5/15/13
to mapp...@googlegroups.com, kostas....@googlemail.com

Konstantinos Kougios

unread,
May 15, 2013, 6:51:58 PM5/15/13
to mapp...@googlegroups.com
thanks, yes a hickup with my IDE, I updated the pom with it (no snapshot though).

Tim Pigden

unread,
May 15, 2013, 7:20:58 PM5/15/13
to mapp...@googlegroups.com
Oops - I used to know about that and have  included joda-convert for some time now. I should have remembered why

Konstantinos Kougios

unread,
May 15, 2013, 7:22:07 PM5/15/13
to mapp...@googlegroups.com
yeah, it happens. Weird compilation error though from scala compiler. Misleading.

Kostas Kougios

unread,
May 26, 2013, 7:40:17 PM5/26/13
to mapp...@googlegroups.com
Ok, rc22. is now available with joda 2.2


On Thursday, 9 May 2013 00:45:45 UTC+1, Peter Hancox wrote:
Reply all
Reply to author
Forward
0 new messages