1

I need to support SystemV time zones in Joda time.So as mentioned in this so answer,i tried recompiling after commenting the lines in SystemV data file.But while compiling it gives this exception :

 [java] Exception in thread "main" org.joda.time.IllegalFieldValueException: Value 292278995 for year must be in the range [-292275054,292278993]
     [java]     at org.joda.time.field.FieldUtils.verifyValueBounds(FieldUtils.java:217)
     [java]     at org.joda.time.chrono.BasicYearDateTimeField.set(BasicYearDateTimeField.java:82)
     [java]     at org.joda.time.chrono.BasicYearDateTimeField.add(BasicYearDateTimeField.java:63)
     [java]     at org.joda.time.tz.DateTimeZoneBuilder$OfYear.next(DateTimeZoneBuilder.java:575)
     [java]     at org.joda.time.tz.DateTimeZoneBuilder$Recurrence.next(DateTimeZoneBuilder.java:761)
     [java]     at org.joda.time.tz.DateTimeZoneBuilder$Rule.next(DateTimeZoneBuilder.java:863)
     [java]     at org.joda.time.tz.DateTimeZoneBuilder$RuleSet.nextTransition(DateTimeZoneBuilder.java:1091)
     [java]     at org.joda.time.tz.DateTimeZoneBuilder$RuleSet.firstTransition(DateTimeZoneBuilder.java:1029)
     [java]     at org.joda.time.tz.DateTimeZoneBuilder.toDateTimeZone(DateTimeZoneBuilder.java:351)
     [java]     at org.joda.time.tz.ZoneInfoCompiler.compile(ZoneInfoCompiler.java:391)
     [java]     at org.joda.time.tz.ZoneInfoCompiler.main(ZoneInfoCompiler.java:136)

Any idea what this is ?

Community
  • 1
  • 1
Emil
  • 13,577
  • 18
  • 69
  • 108
  • Which JDK version are you using? – Peter Lawrey Sep 26 '12 at 16:48
  • @Peter Lawrey :1.6 .Will JDK version affect this ? – Emil Sep 26 '12 at 16:59
  • Its the only thing I could image making a difference. Can you give the exact update and whether it is OpenJDK or HotSpot or something else? – Peter Lawrey Sep 26 '12 at 17:08
  • java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.6) (6b22-1.10.6-0ubuntu1) OpenJDK 64-Bit Server VM (build 20.0-b11, mixed mode).This is what i get when i type "java -version".I'm using ubuntu 11.04. But i'm compiling using ant script in eclipse.In eclipse i'm using java version "1.6.0_16" Java(TM) SE Runtime Environment (build 1.6.0_16-b01) Java HotSpot(TM) 64-Bit Server VM (build 14.2-b01, mixed mode) – Emil Sep 26 '12 at 17:17
  • That's not such an old version that it should matter but I would try Oracle/Hotspot Java 6 update 35. – Peter Lawrey Sep 26 '12 at 17:19

1 Answers1

0

Look to the joda-time-2.1.jar/META-INF/MANIFEST.MF we can see that requared JDK is
Build-Jdk: 1.5.0_22.
So use it, instead if you.

You have bad zoneinfo files. I build joda lib without any problems, using JDK 1.6_22.

At building process we have next

main:
    [mkdir] Created dir: D:\js\target\classes\org\joda\time\tz\data
     [java] Writing zoneinfo files
     [java] Writing ZoneInfoMap
Executed tasks  

here your building fails

Ilya
  • 29,135
  • 19
  • 110
  • 158
  • You have bad zoneinfo files. I build joda api without any problems. – Ilya Sep 26 '12 at 20:22
  • Can you paste this file in pastebin? – Emil Sep 26 '12 at 21:20
  • Tried with JDK 1.6_22 ,still the same exception.Then while commenting the zones did u leave a space,if so it will not throw any exception ,it will just silently ignore the SystemV times zones. – Emil Sep 26 '12 at 21:53
  • I'm able to compile after commenting the first 2 lines in rules. – Emil Sep 27 '12 at 05:45