java.lang.ClassNotFoundException: org.joda.time.ReadablePartial
Asked Answered
S

1

11

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?

Sanorasans answered 8/6, 2016 at 21:24 Comment(0)
R
16

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.

Rileyrilievo answered 8/6, 2016 at 22:0 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.