Jump to content
Changes to the Jaspersoft community edition download ×

Recommended Posts

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:UsersshackletonkJaspersoftWorkspaceMyReportsbin;C:Program FilesTIBCOJaspersoft Studio-6.6.0configurationorg.eclipse.osgi37.cplibjs-extra-classes.jar com.jaspersoft.jasperreports.toolkit.JRCompiler C:UsersshackletonkJaspersoftWorkspaceMyReportsPremier Foodstesco_pick_report.jrxml C:UsersshackletonkJaspersoftWorkspaceMyReportsPremier Foodstesco_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

Link to comment
Share on other sites

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

  • 5 months later...

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!

Link to comment
Share on other sites

  • 2 years later...

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-user-guide/v630/setting-compatibility-earlier-versions) 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/jasperreports/JasperReports%204.5.1/ - 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.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...