Console server does not start because java.lang.ClassCastException

Hello,

I tried to build from source console server. I did that with 7.14 and 7.16 version and with both I get:
java.lang.ClassCastException: class java.io.ObjectStreamClass$Caches$1 cannot be cast to class java.util.Map (java.io.ObjectStreamClass$Caches$1 and java.util.Map are in module java.base of loader 'bootstrap')
  at org.apache.catalina.loader.WebappClassLoaderBase.clearCache(WebappClassLoaderBase.java:2325)
  at org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesObjectStreamClassCaches(WebappClassLoaderBase.java:2300)
  at org.apache.catalina.loader.WebappClassLoaderBase.clearReferences(WebappClassLoaderBase.java:1669)
  at org.apache.catalina.loader.WebappClassLoaderBase.stop(WebappClassLoaderBase.java:1597)
  at org.apache.catalina.loader.WebappLoader.stopInternal(WebappLoader.java:463)
...

I don't have much experience with java nor tomcat. I have made no changes to the code nor the project.
I looked for solution in parameters for compiler or in tomcat, but nothing worked.

Any ideas how to fix this?

I'm running ubuntu 22.04, tomcat 9.0.58 and openjdk 11.0.16.

Thanks in advance.

We started experiencing the same problem. No code changes at all, and the builds just started failing. We can even deploy an old build and that works fine. 

We are running our server on AWS Elastic Beanstalk with Tomcat 8.5, Corretto 11, on Amazon Linux 2

Is your application a WAR file bundle?

We started experiencing the same problem. No code changes at all, and the builds just started failing. We can even deploy an old build and that works fine.

We are running our server on AWS Elastic Beanstalk with Tomcat 8.5, Corretto 11, on Amazon Linux 2

Is your application a WAR file bundle?

Do you use JAXB, per chance?

Sorry, meant to comment, not answer the question.