Emmanuel Bourg
unread,Dec 18, 2016, 6:00:02 PM12/18/16You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
Package: tomcat8
Version: 8.5.9-1
Severity: important
Tomcat 8 is compatible with Java 7 or higher, but the tomcat8 package
was built with Java 8 and using Java 7 at runtime may lead to this
error:
java.lang.NoSuchMethodError: java.util.concurrent.ConcurrentHashMap.keySet()Ljava/util/concurrent/ConcurrentHashMap$KeySetView;
at org.apache.catalina.core.ApplicationContext.getInitParameterNames(ApplicationContext.java:319)
at org.apache.catalina.core.ApplicationContextFacade.getInitParameterNames(ApplicationContextFacade.java:368)
This error happens because the return type of ConcurrentHashMap.keySet()
changed in Java 8 from Set<K> to KeySetView<K,V>, and the KeySetView
class is new in Java 8. At compile time the signature of the method
used is recorded in the class file, and the Java 7 runtimes are unable
to resolve it.
The tomcat8 package should require a Java 8 runtime to avoid this issue.