Jump to content
We've recently updated our Privacy Statement, available here ×

Trouble enabling lambda support


srhaque

Recommended Posts

I'm using JasperStudio 6.6.0 on Linux. I'm having trouble getting lambdas to be recognised. I tried adding:

-Dorg.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8-Dorg.eclipse.jdt.core.compiler.compliance=1.8-Dorg.eclipse.jdt.core.compiler.source=1.8[/code]

to my .ini file, and have confirmed these option are present in the output of "ps -eaf". However, I still get errors like this:

net.sf.jasperreports.engine.JRException: Errors were encountered when compiling report expressions class file:1 error(s):1. syntax error (expression#3) at column 18 in line  false).map(x -> x.getKey()).getClass().    at net.sf.jasperreports.engine.design.JRAbstractCompiler.compileReport(JRAbstractCompiler.java:206)    at net.sf.jasperreports.eclipse.builder.JasperReportCompiler.compileReport(JasperReportCompiler.java:286)    at com.jaspersoft.studio.editor.preview.view.control.ReportController.compileJasperDesign(ReportController.java:467)    at com.jaspersoft.studio.editor.preview.view.control.ReportController.access$8(ReportController.java:452)    at com.jaspersoft.studio.editor.preview.view.control.ReportController$1.run(ReportController.java:376)    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)[/code]

Any hints would be most welcome.

Thanks, Shaheed

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Based on this thread I looked for what version of the org.eclipse.jdt.core.compiler I have nad it appears to be this one:

/opt/tibco/TIB_js-studiocomm_6.6.0/dropins/eclipse/plugins/org.eclipse.jdt.core.compiler.batch.nl_it_4.2.0.v20130724060447.jar[/code]

Is this 4.2.0.v20130724060447.jar recent enough? If not, I'd appreciate some guidance on how to swap a newer one in. I know how to spell Maven, but I'm not au fait with it beyond that.

Link to comment
Share on other sites

  • 8 months later...

I'm trying this again with 6.9.0, but still having problems.

  • The source code and error is now:

net.sf.jasperreports.engine.JRException: Errors were encountered when compiling report expressions class file:
1 error(s):
1. syntax error at column 124 in line
StreamSupport.stream(Spliterators.spliteratorUnknownSize(field_pay_graph_results.getValue().elements(), 0), false).map(x -> x.toString()).allMatch(x -> x.equals("0.0"))
.
    at net.sf.jasperreports.engine.design.JRAbstractCompiler.compileReport(JRAbstractCompiler.java:206)
    at net.sf.jasperreports.eclipse.builder.JasperReportCompiler.compileReport(JasperReportCompiler.java:288)
    at com.jaspersoft.studio.editor.preview.view.control.ReportController.compileJasperDesign(ReportController.java:481)
    at com.jaspersoft.studio.editor.preview.view.control.ReportController.access$8(ReportController.java:466)
    at com.jaspersoft.studio.editor.preview.view.control.ReportController$1.run(ReportController.java:384)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)

  • The column number points right to the "->" in the expanded source.
  • I have edited the .ini file, so my command looks like this:

/opt/tibco/TIB_js-studiocomm_6.9.0//features/jre.linux.gtk.x86_64.feature_1.8.0.u151/jre/bin/java -Xms128m -Xmx1024m -XX:+CMSClassUnloadingEnabled -XX:+UseConcMarkSweepGC -Dfile.encoding=UTF-8 -Djava.net.preferIPv4Stack=true -Dorg.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 -Dorg.eclipse.jdt.core.compiler.compliance=1.8 -Dorg.eclipse.jdt.core.compiler.source=1.8 -jar /opt/tibco/TIB_js-studiocomm_6.9.0//plugins/org.eclipse.equinox.launcher_1.5.300.v20190213-1655.jar -os linux -ws gtk -arch x86_64 -showsplash -launcher /opt/tibco/TIB_js-studiocomm_6.9.0/Jaspersoft Studio -name Jaspersoft Studio --launcher.library /opt/tibco/TIB_js-studiocomm_6.9.0//plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.1000.v20190125-2016/eclipse_1801.so -startup /opt/tibco/TIB_js-studiocomm_6.9.0//plugins/org.eclipse.equinox.launcher_1.5.300.v20190213-1655.jar --launcher.overrideVmargs -exitdata d78003 -data @noDefault -vm /opt/tibco/TIB_js-studiocomm_6.9.0//features/jre.linux.gtk.x86_64.feature_1.8.0.u151/jre/bin/java -vmargs -Xms128m -Xmx1024m -XX:+CMSClassUnloadingEnabled -XX:+UseConcMarkSweepGC -Dfile.encoding=UTF-8 -Djava.net.preferIPv4Stack=true -Dorg.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 -Dorg.eclipse.jdt.core.compiler.compliance=1.8 -Dorg.eclipse.jdt.core.compiler.source=1.8 -jar /opt/tibco/TIB_js-studiocomm_6.9.0//plugins/org.eclipse.equinox.launcher_1.5.300.v20190213-1655.jar

  • I see the compiler version is

/opt/tibco/TIB_js-studiocomm_6.9.0/dropins/eclipse/plugins/org.eclipse.jdt.core.compiler.batch.nl_it_4.2.0.v20130724060447.jar

I don't see an ecj.jar in the distribution, but can download one from Maven. But I've no idea what to do with it to have it take effect.

Help much appreciated,

 

Thanks.

 

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...