daust / JasperReportsIntegration

JasperReportsIntegration provides an interface to use the JasperReports reporting engine in an Oracle database application, specifically with Oracle Application Express (Oracle APEX).
BSD 3-Clause "New" or "Revised" License
55 stars 23 forks source link

Unable to start JRI with tomcat 10 #82

Closed SpyOO closed 2 years ago

SpyOO commented 3 years ago

I get a error when install into tomcat 10 the version 2.7 of JRI

# java -version
java version "16.0.1.0.1" 2021-04-10
Java(TM) SE Runtime Environment (build 16.0.1.0.1+1-2)
Java HotSpot(TM) 64-Bit Server VM (build 16.0.1.0.1+1-2, mixed mode, sharing)

after deploy jri I get the error in catalina.out file :

snipercat commented 2 years ago

I got the same error with JDK 17 and Tomcat 10, I also got this message

21-Dec-2021 10:11:42.894 SEVERE [main] org.apache.catalina.core.StandardContext.listenerStart Error configuring application listener of class [de.oc.integration.jasper.webapp.AppServletContextListener]
    java.lang.NoClassDefFoundError: javax/servlet/ServletContextListener
        at java.base/java.lang.ClassLoader.defineClass1(Native Method)
        at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1012)

I found that it is because the javax Package has been renamed to jakarta , so, we have to install Tomcat 9. https://stackoverflow.com/a/64418685

daust commented 2 years ago

Yeah, this is kinda difficult.

When I upgrade the existing code, it will work with Tomcat 10 ... AND break on Tomcat 9.

I need to find an easy way to build both versions ... but there are many places in the code to change. There is this automatic migration tool: https://tomcat.apache.org/migration-10.html#Specification_APIs

Not sure, that I can use that to build both versions.

But perhaps using Tomcat9 will be fine for now?

daust commented 2 years ago

I have decided to continue developing for Tomcat9.

In addition to that, I will use the migration tool to BUILD an additional war file for Tomcat10 only. This will be added to the binary downloads.

For that conversion I will use the official Tomcat migration tool: https://tomcat.apache.org/download-migration.cgi