B4J Question jJasperReports Library with jasperreports-6.17.0 error in release mode

Juan Marrero

Active Member
Licensed User
Longtime User
Hi. This is for B4J Library makers. I'm trying to upgrade my jJasperReports Library from 6.7.1 to 6.17.0. I downloaded and add (and upgrade) all the jars (i think) were mandatory to run that version. The issue is that if you compile in B4J in Debug Mode, everything runs fine. In eclipse I run a test in the Main method and everything runs fine. But when compiling in B4J in Release mode it gives the following error:
B4X:
main._btnsqlite_action (java line: 370)
java.lang.NoSuchMethodError: org.eclipse.jdt.internal.compiler.Compiler.<init>(Lorg/eclipse/jdt/internal/compiler/env/INameEnvironment;Lorg/eclipse/jdt/internal/compiler/IErrorHandlingPolicy;Lorg/eclipse/jdt/internal/compiler/impl/CompilerOptions;Lorg/eclipse/jdt/internal/compiler/ICompilerRequestor;Lorg/eclipse/jdt/internal/compiler/IProblemFactory;)V
    at net.sf.jasperreports.engine.design.JRJdtCompiler.compileUnits(JRJdtCompiler.java:154)
    at net.sf.jasperreports.engine.design.JRAbstractCompiler.compileReport(JRAbstractCompiler.java:226)
    at net.sf.jasperreports.engine.JasperCompileManager.compile(JasperCompileManager.java:358)
    at net.sf.jasperreports.engine.JasperCompileManager.compile(JasperCompileManager.java:291)
    at net.sf.jasperreports.engine.JasperCompileManager.compileReport(JasperCompileManager.java:576)
    at com.prusb.jasperrep.JasperReports.CompileXML(JasperReports.java:172)
    at b4j.example.main._btnsqlite_action(main.java:370)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:108)
    at anywheresoftware.b4a.BA$1.run(BA.java:233)
    at com.sun.javafx.application.PlatformImpl.lambda$null$172(PlatformImpl.java:295)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sun.javafx.application.PlatformImpl.lambda$runLater$173(PlatformImpl.java:294)
    at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
    at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
    at com.sun.glass.ui.win.WinApplication.lambda$null$147(WinApplication.java:177)
    at java.lang.Thread.run(Thread.java:748)
I can't seem to find what is going on. I think it's related to ecj-3.26.0.jar. I have tried versions 3.22.0, 3.19.0 and 3.12.3 with the same results. If anyone can help me I can give you the link to the project and all the jar files.
 

DonManfred

Expert
Licensed User
Longtime User
I can´t really help but it looks like a (or some) package has changed in a breaking way.

Guess you need to find out what have changed and how you need to do it now.
 
Upvote 0

Juan Marrero

Active Member
Licensed User
Longtime User
I can´t really help but it looks like a (or some) package has changed in a breaking way.

Guess you need to find out what have changed and how you need to do it now.
I have downloaded over 20 jar files including newers of existing ones based on JasperReports 6.17 dependencies. No luck. I have spen't all day replacing jar files and compiling in eclipse. I don't know what I'm missing and honestly don't have the time to keep digging. Last thing I'm going to do is test with lower versions. If I still have no luck will leave this library at 6.7.
 
Upvote 0

Juan Marrero

Active Member
Licensed User
Longtime User
Scratch everything, apparently I compiled old version of jJasperReports, that's why it worked. Recompiling new version works in debug and release in Eclipse but not on B4J, like it's not finding jdt-compiler.jar.
 
Upvote 0

kishanby

New Member
I got the same issue,
worked for me after removing jdt-compiler, jasper-compiler jar's in my project.
 
Last edited:
Upvote 0
Top