asgardeo / asgardeo-tomcat-oidc-agent

OIDC Agent for Tomcat using Java OIDC SDK for Asgardio
Apache License 2.0
15 stars 36 forks source link

Integrating OIDC into your Existing Webapp fails with error this version of the Java Runtime only recognizes class file versions up to 52.0 #44

Closed jkjha closed 2 years ago

jkjha commented 2 years ago

Describe the issue:

As per the document here:

Extract the downloaded lib.zip file to the <APP_HOME>/WEB-INF directory. (If you already have a lib folder in your web app, merge the content of the downloaded lib.zip file into the existing lib folder.)

I downloaded lib.zip, converted it to jakarta namespace and copied the libraries to my existing webapp. But after that tomcat started complaining about the error:

        java.lang.UnsupportedClassVersionError: org/opengrok/web/WebappListener 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 (unable to load class [org.opengrok.web.WebappListener])
                at org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2515)

How to reproduce:

  1. Get the opengrok war file from here: https://github.com/oracle/opengrok/releases/tag/1.7.35
  2. Copy the source.war file to webapps directory. Now the UI is accessible at localhost:8080/source
  3. Download the lib.zip from here (for oidc): lib.zip
  4. Now convert this to jakarta namespace using the conversion tool mentioned here: https://github.com/apache/tomcat-jakartaee-migration
  5. Now copied the content of lib.zip file to webapps/source/WEB-INF/lib/ folder.
  6. Restart tomcat.

Expected behavior: Tomcat should be able to start after coping the file.

Environment information (Please complete the following information; remove any unnecessary fields) :

image


jkjha commented 2 years ago

Sorry for spam. There was some issue with my OS version it seems.