Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/336.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.lang.ClassNotFoundException:org.joda.time.ReadablePartial_Java_Jasper Reports_Classnotfoundexception - Fatal编程技术网

java.lang.ClassNotFoundException:org.joda.time.ReadablePartial

java.lang.ClassNotFoundException:org.joda.time.ReadablePartial,java,jasper-reports,classnotfoundexception,Java,Jasper Reports,Classnotfoundexception,我正在使用EclipseLuna和Jaspersoft Studio插件6.2.2来编写web应用程序的开发人员报告。从Eclipse插件运行一个基本空白报告没有问题,但是当我从java类加载这个jrxml时,我收到消息: Servlet.service() for servlet [default] in context with path [/insurance] threw exception [Filter execution threw an exception] with root

我正在使用EclipseLuna和Jaspersoft Studio插件6.2.2来编写web应用程序的开发人员报告。从Eclipse插件运行一个基本空白报告没有问题,但是当我从java类加载这个jrxml时,我收到消息:

Servlet.service() for servlet [default] in context with path [/insurance] threw exception [Filter execution threw an exception] with root cause
java.lang.ClassNotFoundException: org.joda.time.ReadablePartial
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1858)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1709)  
我正在使用代码:

JasperDesign jasperDesign = JRXmlLoader.load(fileName);

这个错误是什么

听起来你缺少依赖性。Joda的GitHub项目可用时间

根据文档,要获取最新的Joda Time jar,您可以执行以下操作:

:

或者您可以手动从下载最新的jar并将其添加到类路径中

<dependency>
  <groupId>joda-time</groupId>
  <artifactId>joda-time</artifactId>
  <version>2.9.4</version>
</dependency>
compile 'joda-time:joda-time:2.9.4'