java.lang.UnsupportedOperationException: Duration does not support field "months"

joda | petrovpet | 1 decade ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Durations

    joda | 1 decade ago | petrovpet
    java.lang.UnsupportedOperationException: Duration does not support field "months"

    Root Cause Analysis

    1. java.lang.UnsupportedOperationException

      Duration does not support field "months"

      at org.joda.time.AbstractDuration.checkSupport()
    2. Joda-Time
      Duration.<init>
      1. org.joda.time.AbstractDuration.checkSupport(AbstractDuration.java:81)
      2. org.joda.time.AbstractDuration.setMonths(AbstractDuration.java:1170)
      3. org.joda.time.MutableDuration.setMonths(MutableDuration.java:328)
      4. org.joda.time.format.DurationFormatterBuilder$FieldFormatter.setFieldValue(DurationFormatterBuilder.java:1159)
      5. org.joda.time.format.DurationFormatterBuilder$FieldFormatter.parseInto(DurationFormatterBuilder.java:1045)
      6. org.joda.time.format.DurationFormatterBuilder$Composite.parseInto(DurationFormatterBuilder.java:1383)
      7. org.joda.time.format.DurationFormatterBuilder$Separator.parseInto(DurationFormatterBuilder.java:1300)
      8. org.joda.time.convert.StringConverter.setInto(StringConverter.java:148)
      9. org.joda.time.AbstractDuration.<init>(AbstractDuration.java:200)
      10. org.joda.time.MutableDuration.<init>(MutableDuration.java:134)
      11. org.joda.time.AbstractDuration.<init>(AbstractDuration.java:203)
      12. org.joda.time.Duration.<init>(Duration.java:134)
      12 frames