Java version used to compile Tomcat7

Asked by El Achèche ANIS on 2017-09-25

I was trying to deploy a war that is working on Tomcat7 + Java 7 on Ubuntu 14.04 to a Tomcat7 on Ubuntu 16.04

The Webapp needs Java 7 to works, so I used a PPA to install it.

However I still get a compatibility errors that prevent the webapp from starting.

Below is the error:

org.springframework.beans.factory.access.BootstrapException: Error executing bootstraps; nested exception is java.lang.NoSuchMethodError: java.util.concurrent.ConcurrentHashMap.keySet()Ljava/util/concurrent/ConcurrentHashMap$KeySetView;
        at org.codehaus.groovy.grails.web.context.GrailsContextLoader.initWebApplicationContext(
        at org.springframework.web.context.ContextLoaderListener.contextInitialized(
        at org.apache.catalina.core.StandardContext.listenerStart(
        at org.apache.catalina.core.StandardContext.startInternal(
        at org.apache.catalina.util.LifecycleBase.start(
        at org.apache.catalina.core.ContainerBase.addChildInternal(
        at org.apache.catalina.core.ContainerBase.addChild(
        at org.apache.catalina.core.StandardHost.addChild(
        at org.apache.catalina.startup.HostConfig.deployDirectory(
        at org.apache.catalina.startup.HostConfig$
        at java.util.concurrent.Executors$
        at java.util.concurrent.ThreadPoolExecutor.runWorker(
        at java.util.concurrent.ThreadPoolExecutor$
Caused by: java.lang.NoSuchMethodError: java.util.concurrent.ConcurrentHashMap.keySet()Ljava/util/concurrent/ConcurrentHashMap$KeySetView;
        ... 5 more

Googling around, I find that the error is related to some Java version compatibility, and some folks mentioned that if Tomcat7 was compiled using Java8 that will cause that problem too even if the Java version used is Java7

How can I check if tomcat7 was compiled using Java8 or not?

Thanks in advance!

Question information

English Edit question
Ubuntu tomcat7 Edit question
No assignee Edit question
Solved by:
Joshua Powers
Last query:
Last reply:

Does the changelog detail it

You could contact Josh Powers. His email address is quite prevalent in the chnagelog

Best Joshua Powers (powersj) said : #2

Hi! Thanks for taking the time to reach out.

Your issue does, in fact, look like the following bug:

El Achèche ANIS (elacheche) said : #3

Thanks Joshua Powers, that solved my question.

El Achèche ANIS (elacheche) said : #4

Until the bug will be fixed, I'm using tomcat7 binary from the official Tomcat website.