2016-02-04 63 views
0

我得到一個喬達時間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

The module

+0

嗯,除了不以純新java命令行項目出現。 – 4D617274696A6E

+0

好了,奇怪,我重新啓動它是運行在服務器和它的工作.. – 4D617274696A6E

回答

0

我想它現在已經修復了。昨天它重新加載了這個插件運行的bukkit/spigot(Minecraft)服務器後,似乎發生了這種情況。在重新啓動服務器時它可以正常工作,但是重新加載會破壞它。但今天它似乎一切正常。奇怪,不知道是什麼造成的。

編輯: 它出現bukkit服務器就在所有的重裝好時不處理資源包。一次重新加載只會破壞使用資源包的所有內容。

+0

好了,現在它再次破門,真是奇怪。我認爲這是spigot/bukkit如何處理插件的問題。 – 4D617274696A6E