10

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?

Alex K
  • 22,315
  • 19
  • 108
  • 236
Paulo
  • 101
  • 1
  • 1
  • 6

1 Answers1

15

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.

Voicu
  • 16,921
  • 10
  • 60
  • 69