Here's the original stack traces from running Apache Axis' tests using IKVM: http://nagoya.apache.org/~dims/ikvm-report/test/encoding/PackageTests.html See attached Test.java for stripped down test case. Thanks, dims
The line causing your problem is: date.set(0,0,0); Note that the default calendar is the Gregorian one, which does not have a year zero (1 AD was the year after 1 BC). The date created by the JDK by date.set(0,0,0) is Dec 31, year 2; which is clearly a bug. The IllegalArgumentException is correct behavior, however the error message is misleading. That should be fixed.
My previous comment is wrong, it seems. With leniency set, it should accept that date. Year zero works out to be year 1 BC, and "Jan 0" works out to be Dec 31 of the year before, thus the correct result *is* Dec 31, 2 BC. This needs fixing.