java.lang.UnsupportedOperationException

Duration does not support field "months"

Solutions on the web2109

  • via joda by petrovpet
    , 1 year ago
    Duration does not support field "months"
  • via Google Groups by siddhartha dutta, 1 year ago
    Cannot convert to Duration as this period contains months and months vary in length
  • via Google Groups by Steve, 1 year ago
    HistogramAggregatorFactory does not support getTypeName()
  • Stack trace

    • java.lang.UnsupportedOperationException: Duration does not support field "months" at org.joda.time.AbstractDuration.checkSupport(AbstractDuration.java:81) at org.joda.time.AbstractDuration.setMonths(AbstractDuration.java:1170) at org.joda.time.MutableDuration.setMonths(MutableDuration.java:328) at org.joda.time.format.DurationFormatterBuilder$FieldFormatter.setFieldValue(DurationFormatterBuilder.java:1159) at org.joda.time.format.DurationFormatterBuilder$FieldFormatter.parseInto(DurationFormatterBuilder.java:1045) at org.joda.time.format.DurationFormatterBuilder$Composite.parseInto(DurationFormatterBuilder.java:1383) at org.joda.time.format.DurationFormatterBuilder$Separator.parseInto(DurationFormatterBuilder.java:1300) at org.joda.time.convert.StringConverter.setInto(StringConverter.java:148) at org.joda.time.AbstractDuration.<init>(AbstractDuration.java:200) at org.joda.time.MutableDuration.<init>(MutableDuration.java:134) at org.joda.time.AbstractDuration.<init>(AbstractDuration.java:203) at org.joda.time.Duration.<init>(Duration.java:134)

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    You are the first who have seen this exception. Write a tip to help other users and build your expert profile.