dstevens_2 Posted August 10, 2017 Share Posted August 10, 2017 I am trying to follow the tutorial Hello World Scriptlet Example by Sadakar Pochampalli.After following all the instructions, once i try to compile and run the report i get the error below.Help greatly appreciated!! net.sf.jasperreports.engine.JRException: Errors were encountered when compiling report expressions class file: 1. com.sadakar.jasper.Test4 cannot be resolved to a type value = ((com.sadakar.jasper.Test4)parameter_Hello_SCRIPTLET.getValue()).hello(); //$JR_EXPR_ID=8$ <----------------------> 2. com.sadakar.jasper.Test4 cannot be resolved to a type value = ((com.sadakar.jasper.Test4)parameter_Hello_SCRIPTLET.getValue()).hello(); //$JR_EXPR_ID=8$ <----------------------> 3. com.sadakar.jasper.Test4 cannot be resolved to a type value = ((com.sadakar.jasper.Test4)parameter_Hello_SCRIPTLET.getValue()).hello(); //$JR_EXPR_ID=8$ <----------------------> 3 errors at net.sf.jasperreports.engine.design.JRAbstractCompiler.compileReport(JRAbstractCompiler.java:206) at net.sf.jasperreports.eclipse.builder.JasperReportCompiler.compileReport(JasperReportCompiler.java:294) at com.jaspersoft.studio.editor.preview.view.control.ReportControler.compileJasperDesign(ReportControler.java:465) at com.jaspersoft.studio.editor.preview.view.control.ReportControler.access$15(ReportControler.java:442) at com.jaspersoft.studio.editor.preview.view.control.ReportControler$5.run(ReportControler.java:356) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Link to comment Share on other sites More sharing options...
vchiem Posted August 11, 2017 Share Posted August 11, 2017 Theres a nice tutorial video on scriptlets "TIBCO Jaspersoft: Using Scriptlets inside TIBCO Jaspersoft Studio and JasperReports" Maybe this can help you determine where it went wrong. Link to comment Share on other sites More sharing options...
dstevens_2 Posted August 11, 2017 Author Share Posted August 11, 2017 Thank you for the swift response.I think the problem is configuring my jar files, and this particular tutorial doesn't cover that part.If you have any good references for the configuration step I'd greatly appreciate that. Link to comment Share on other sites More sharing options...
vchiem Posted August 14, 2017 Share Posted August 14, 2017 I remembered getting issues following this example too... whether or not its exactly this error but I think it was similar. I believe there's a mistake in one of the steps.. 3) Add Jasper Server jar file to Project PathThis step applies to the Java project.. The jar file mentioned is 'Jar File Name : jasperreports-pro-6.0.0.jar' but this is not right. It should be jasperreports-6.3.0.jar (for 6.3) or jasperreports-6.2.0.jar as per the screenshot in the following step. As my Studio is not where the server is, I copied the jasperreports-6.3.0.jar from server and place it locally and load that in the project path. Step 5 and 6a are important. Once you have exported your test.jar, step 6a should be done for "MyReports" not for the java project. Link to comment Share on other sites More sharing options...
arnaudsimon091 Posted May 22, 2019 Share Posted May 22, 2019 I had the same problem dstevens_2, I restarted my Jaspersoft studio and eveything worked fine ! Link to comment Share on other sites More sharing options...
firuzzz Posted September 3, 2019 Share Posted September 3, 2019 vchiem u should remove that video, having a .java in the build path simply doesn't work, that's a big lie, we all have the same error XXX cannot be resolved to a type Link to comment Share on other sites More sharing options...
martinquested Posted June 10, 2021 Share Posted June 10, 2021 I was tearing my hair out over this as well. In my case, the problem was that it simply doesn't work in Jaspersoft Studio (Community Edition) 6.17.0, and reverting to 6.16.0 fixed it. I don't know if this is the same bug mentioned for the Enterprise edition version 7.3.1: https://community.jaspersoft.com/wiki/scriplet-class-cannot-be-resolved-type-tibco-jaspersoft-studio-731Also, a slight update to Sadakar Pochampalli's instructions... step 6a should now read:Right Click on "My Reports" Project -> Build Path -> Configure Build Path -> Libraries -> Classpath -> Add External JARs ->("test" jar from your exported location from Eclipse) -> Apply and close Link to comment Share on other sites More sharing options...
dunham Posted September 20, 2021 Share Posted September 20, 2021 Windows 6.5.1 - WorksMacOs 6.16.0 - Not workMacOs 6.17.0 - Not work TRANSLATE.JAR loaded (just like in windows) Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now