Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/maven/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java Joda time MissingResourceException_Java_Maven_Intellij Idea_Jodatime - Fatal编程技术网

Java Joda time MissingResourceException

Java Joda time MissingResourceException,java,maven,intellij-idea,jodatime,Java,Maven,Intellij Idea,Jodatime,我得到一份工作 java.util.MissingResourceException:找不到基本名称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);

我得到一份工作

java.util.MissingResourceException:找不到基本名称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) ~[?:?]
我主要在Maven上使用Joda Time 2.9.2和Intellij IDEA 15.0.1


我想现在已经修好了。。昨天,它似乎是在重新加载这个插件运行的bukkit/spiget(Minecraft)服务器之后发生的。重新启动服务器时,它可以正常工作,但重新加载会导致服务器崩溃。但今天一切似乎都很好。奇怪,不知道是什么引起的

编辑:
看起来bukkit服务器在重新加载时根本无法处理资源包。一次重新加载就破坏了它使用的所有资源包。

Hmm,在一个普通的新java命令行项目中不会发生异常。好吧,奇怪,我重新启动了它运行的服务器,它工作了……好吧,现在它又坏了,真奇怪。我认为这是一个关于spiget/bukkit如何处理插件的问题。