我得到一個喬達時間MissingResourceException異常
java.util.MissingResourceException: Can't find bundle for base name org.joda.time.format.messages, locale en
;
DateTime start = new DateTime();
DateTime end = new DateTime(2017, 3, 26, 12, 0, 0, 0);
Interval interval = new Interval(start, end);
Period period = interval.toPeriod();
// This line is causing the exception.
System.out.println(PeriodFormat.getDefault().print(period));
堆棧跟蹤的相關部分:
Caused by: java.util.MissingResourceException: Can't find bundle for base name org.joda.time.format.messages, locale en
at java.util.ResourceBundle.throwMissingResourceException(Unknown Source) ~[?:1.8.0_65]
at java.util.ResourceBundle.getBundleImpl(Unknown Source) ~[?:1.8.0_65]
at java.util.ResourceBundle.getBundle(Unknown Source) ~[?:1.8.0_65]
at org.joda.time.format.PeriodFormat.buildWordBased(PeriodFormat.java:217) ~[?:?]
at org.joda.time.format.PeriodFormat.wordBased(PeriodFormat.java:205) ~[?:?]
at org.joda.time.format.PeriodFormat.getDefault(PeriodFormat.java:73) ~[?:?]
我使用約達時間2.9.2和IntelliJ IDEA 15.0.1與主要的Maven
嗯,除了不以純新java命令行項目出現。 – 4D617274696A6E
好了,奇怪,我重新啓動它是運行在服務器和它的工作.. – 4D617274696A6E