[#12011] - java.lang.NoClassDefFoundError with older compilers in Studio 6.6.0/6.9.0

Category:
Bug report
Priority:
High
Status:
Confirmed
Project: Severity:
Major
Resolution:
Open
Component: Reproducibility:
Always
Assigned to:

I installed an older compiler-version (here 6.2.1 or 6.4.0) in the Studio (CE) 6.6.0 and 6.9.0 and chose that version
for compiling a subreport. The compatibility setting was also 6.2.1. JDK compliance is 1.6.
After restarting the Studio and compiling the subreport different errors appear:

An internal error occurred during "Building report!".
java.lang.NoClassDefFoundError:
org/apache/common/logging/LogFactory

I tried to add that library but got another message:

An internal error occurred during: "Building report".
java.lang.NoClassDefFoundError: Could not initialize class
net.sf.jasperreports.engine.DefaultJasperReportsContext

When using the old version of the Studio(!) 6.2.1 it works but that is just a workaround.

By the way:
Using "6.6.0 (current)" instead of "always the current" (Studio 6.6.0) does not compile at all with the different buttons
and menu entries (without errors). This has been described already by others.

Thanks!
Franky

AttachmentSize
Image icon compiler-compatibility.jpg87.22 KB
v6.6.0
Jaspersoft® Studio
franky4's picture
500
Joined: Jan 5 2016 - 2:15am
Last seen: 1 week 4 days ago

4 Comments:

#1

With Jaspersoft Studio 6.10.0 CE the bug still exists.
Installation of the older compiler (here 6.2.1) works, but compiling the (sub-)report results in following error again:

An internal error occurred during: "Building report".
java.lang.NoClassDefFoundError: Could not initialize class
net.sf.jasperreports.engine.DefaultJasperReportsContext

#2

I have this same issue. I'm using Jaspersoft Studio 6.9.0 and trying to use the compiler and jrxml version for 6.3.1. I've tried adding the older version both from URL and from path under compatibility configuration, but no luck.

#3
  • Status:New» Confirmed
  • Assigned:nobody» chicuslavic

I studied this problem. It's because JasperReports Library dependencies are missing.

Workaround: add the dependencies or put all of them in a folder with JasperReports Library, instead of adding JR from a URL setup the PATH to this directory.

The right solution could be to download all dependencies too, like maven does. I don't have time to do it until the next release, not sure if we can use existing libraries because of legal and license constraints.

#4

Thanks, we tried two workarounds:
1) Removing the library 6.6.0 from the project and adding the 6.2.1-library and dependencies with maven.
2) Identifiing the 6.2.1-dependencies and adding these jars to the compiler-folder (without removing the project-library 6.6.0):
C:\Users\franky\JaspersoftWorkspace\.metadata\.plugins\com.jaspersoft.studio\jrCompilers\6.2.1
Both works fine for us.

Feedback
randomness