JayVora-SerpentCS / Jasperreports_odoo

Jasper Reports Engine for Odoo
http://www.serpentcs.com
81 stars 140 forks source link

Java 11 required #110

Closed liosc closed 3 years ago

liosc commented 4 years ago

I installed the module, created a report and tried to run it but I received an error saying that my Java runtime is too old (52) for the library created with 55. In my understanding Java versions greater than 8 are no more free. As Odoo, Jasper report and this module are all open source, should it be better to use the last free version of Java instead of one that requires a fee for license?

JayVora-SerpentCS commented 4 years ago

Yes you may use the last version. There is nothing which is paid.

liosc commented 4 years ago

Thanks for your reply. You mean there is nothing which is paid downloading the JDK from https://jdk.java.net/? I downloaded from there the version 14. I put the path in the company tab but it keeps saying that the Java version is 52. It seems it looks in tha JAVA_HOME instead of the Java path in Odoo. I tried also restarting Odoo. That's my company tab: [image: image.png] And that's the error: java.lang.UnsupportedClassVersionError: com/nantic/jasperreports/JasperServer has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0.

I will really appreciate any help you can give me to understand the issue.

Kind regards. Leandro

On Tue, 30 Jun 2020 at 08:55, Serpent Consulting Services Pvt. Ltd. < notifications@github.com> wrote:

Yes you may use the last version. There is nothing which is paid.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/JayVora-SerpentCS/Jasperreports_odoo/issues/110#issuecomment-651585553, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFSU4TXWKVM7CLHUQQXXSMDRZGD5LANCNFSM4OLT7YIA .

JayVora-SerpentCS commented 3 years ago

@hiren-serpentcs please respond to help @liosc

hiren-serpentcs commented 3 years ago

Hi @liosc , Thanks for reporting the issue.

The v12 module of jasper reports works with Java 11. We are planning to make it suitable for the latest java as well as update the libraries while migrating the module to v13.

As well as you need to put the java library path to the company config.

liosc commented 3 years ago

Thanks @JayVora-SerpentCS and @hiren-serpentcs. Actually I have the opposite problem. I had Java 8 and when I tried to open a report it said that the Java runtime was too old. I downloaded Java 13 and after your response also v11. I put the v11 library path in the company tab but it keeps saying that com/nantic/jasperreports/JasperServer has been compiled by a more recent version of the Java Runtime (55 vs 52). It keeps pointing to v8 (52). I also tried restarting Odoo after changing the Java library path in the company tab.

liosc commented 3 years ago

Hi. I did some debugging. The server.javapath in jasper_report_config.py is correctly set to the value I put in the company tab ("C:\Program Files\Java\jdk-11") but the error message keeps saying that the Java runtime is 52 (Java 8, the version I have in the Javapath). It seems is not using the path recorded in the company tab.

jasper_report_config_debug

hiren-serpentcs commented 3 years ago

Hi @liosc

You need to specify the jasper report library path on the company tab. The module will take java path by default from the system paths.

liosc commented 3 years ago

Hi @hiren-serpentcs , please check my previous messages. I did specify the path in the company tab. I also debugged the code to confirm that the path is there (see also the attached copy of the screen). Anyway if you want to close this issue no problem. I will go on with the debugging to understand the cause.