Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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)  

I'm using the code:

JasperDesign jasperDesign = JRXmlLoader.load(fileName);

What's this error?

like image 877
Paulo Avatar asked Jun 08 '16 21:06

Paulo


1 Answers

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

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'

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

like image 172
Voicu Avatar answered Sep 22 '22 08:09

Voicu