java.lang.ClassNotFoundException:org.joda.time.ReadablePartial [英] java.lang.ClassNotFoundException: org.joda.time.ReadablePartial

查看:1343
本文介绍了java.lang.ClassNotFoundException:org.joda.time.ReadablePartial的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I'm using Eclipse Luna with Jaspersoft Studio plugin 6.2.2 to developer reports for web application. No problem to run one basic blank report from Eclipse plugin, but when I load this jrxml from java class, I receive the message:

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-Time 依赖。 Joda-Time的GitHub项目可以这里

Sounds like you're missing the Joda-Time dependency. GitHub project for Joda-Time available here.

根据文档,您可以使用最新的Joda-Time jar:

As per documentation, to get the latest Joda-Time jar you can do:

Maven

<dependency>
  <groupId>joda-time</groupId>
  <artifactId>joda-time</artifactId>
  <version>2.9.4</version>
</dependency>

Gradle

compile 'joda-time:joda-time:2.9.4'

或者你可以从这里手动下载最新的jar并将其添加到你的类路径。

Or you can manually download the latest jar from here and add it to your classpath.

这篇关于java.lang.ClassNotFoundException:org.joda.time.ReadablePartial的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆