Compatibility Mode Issues

Hi,

I am trying to get my JasperStudio To Compile Reports using JasperReports Libaries 4.0.2 and having nothing but issues, im sure its probably me doing something wrong but could someone please assist?

 

JR Console Log when setting compiler to 4.0.2

Error: Could not find or load main class com.jaspersoft.jasperreports.toolkit.JRCompiler
Error: Could not find or load main class com.jaspersoft.jasperreports.toolkit.JRCompiler
Compilation terminated
Compilation terminated
Error: Could not find or load main class com.jaspersoft.jasperreports.toolkit.JRCompiler
Compilation terminated
Error: Could not find or load main class com.jaspersoft.jasperreports.toolkit.JRCompiler
Compilation terminated
Error: Could not find or load main class com.jaspersoft.jasperreports.toolkit.JRCompiler
Compilation terminated
Error: Could not find or load main class com.jaspersoft.jasperreports.toolkit.JRCompiler
Compilation terminated
Error: Could not find or load main class com.jaspersoft.jasperreports.toolkit.JRCompiler
Compilation terminated
Error: Could not find or load main class com.jaspersoft.jasperreports.toolkit.JRCompiler
Compilation terminated
Error: Could not find or load main class com.jaspersoft.jasperreports.toolkit.JRCompiler
Compilation terminated
Error: Could not find or load main class com.jaspersoft.jasperreports.toolkit.JRCompiler
Error: Could not find or load main class com.jaspersoft.jasperreports.toolkit.JRCompiler
Error: Could not find or load main class com.jaspersoft.jasperreports.toolkit.JRCompiler
Compilation terminated
Compilation terminated
Compilation terminated
Error: Could not find or load main class com.jaspersoft.jasperreports.toolkit.JRCompiler
Compilation terminated

 

Log When Trying To Compile

Start Compilation with command:
java -cp C:\jasperreports-4.0.2\*;C:\Users\shackletonk\JaspersoftWorkspace\MyReports\bin\;C:\Program Files\TIBCO\Jaspersoft Studio-6.6.0\configuration\org.eclipse.osgi\37\0\.cp\lib\js-extra-classes.jar com.jaspersoft.jasperreports.toolkit.JRCompiler C:\Users\shackletonk\JaspersoftWorkspace\MyReports\Premier Foods\tesco_pick_report.jrxml C:\Users\shackletonk\JaspersoftWorkspace\MyReports\Premier Foods\tesco_pick_report.jasper 
Error: Could not find or load main class com.jaspersoft.jasperreports.toolkit.JRCompiler
Compilation terminated

 

Many thanks in advance

 

Kind Regards

K Shackleton

kyleshackleton123's picture
Joined: Nov 1 2018 - 3:53am
Last seen: 4 years 4 months ago

Any answers on this?

 

I believe it is something i am doing wrong, as i am getting the same results on 2 other PCs i have tired.

 

Thanks

Kind Regards

kyleshackleton123 - 4 years 4 months ago

I'm facing an identical issue using JasperReports 3.6.0 (it's a legacy system I don't have much control over). Any traction on resolving this issue?

mitchell.probst - 3 years 11 months ago

2 Answers:

It is related to this issue, you do not have everything in your classpath that you actually need to compile the report. If you're following this guide be warned that it is NOT adding all of the items required.  It seems like this guide has been broken since at least Feb. 2017 (see the answer to this item).

What worked for me personally was to take all the jars listed in the first issue, and put them all together in a single directory, then finally configure the compiler to point to that directory.  I hope this helps!

mitchell.probst's picture
Joined: Apr 4 2019 - 2:52pm
Last seen: 3 years 11 months ago

Crapstersoft must be the junkiest software company ever. This option is not working neither it ever has, but noone gives a damn here. Look at these comments, dated from years ago. Nothing to do. Noone in the docs (https://community.jaspersoft.com/documentation/tibco-jaspersoft-studio-u...) says where you can download these libraries (even if it's as easy as browsing in their Sourceforge - https://sourceforge.net/projects/jasperreports/files/archive/jasperrepor... - noone mentions this, and noone says it's the .ZIP file the one you must get); noone says there's a dropdown Maven URL list where the program is supposed to get the files - but it won't work either because they are written with the HTTP protocol (those are not working anymore) instead of the HTTPS one. Can this be further lamer? YEAH, IT CAN: after solving this... the project or the individual .jrxml will not compile, either! Still, you'll get a bunch of unsolvable exceptions:

 

Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/digester/Digester
    at net.sf.jasperreports.engine.JasperCompileManager.compileReportToFile(JasperCompileManager.java:108)
    at com.jaspersoft.jasperreports.toolkit.JRCompiler.main(JRCompiler.java:52)
Caused by: java.lang.ClassNotFoundException: org.apache.commons.digester.Digester
    at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(Unknown Source)
    at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(Unknown Source)
    at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
    ... 2 more
Compilation terminated

Noone will care ever about these bugs.

pere.pasqual's picture
Joined: Sep 17 2020 - 1:45am
Last seen: 11 months 3 days ago
Feedback