源:https://issues.apache.org/bugzilla/show_bug.cgi?id=55554
评:
I'm getting the following stack trace with Java 7 (but no with Java 8):
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)
at org.springframework.web.context.support.WebApplicationContextUtils.registerEnvironmentBeans(WebApplicationContextUtils.java:201)
at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.postProcessBeanFactory(AbstractRefreshableWebApplicationContext.java:175)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:461)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:389)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:294)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4830)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5276)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:726)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:702)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:698)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:968)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1742)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
Comment 1 Mark Thomas 2013-09-12 18:00:57 UTC
java.util.concurrent.ConcurrentHashMap$KeySetView doesn't exist in Java 7. I'm not sure how but you appear to have a Java 8 artifact involved here. Whatever is going on, it is an environmental issue on your system.
Comment 2 rstoyanchev 2013-09-12 18:37:38 UTC
Odd, because that is a JDK class and the issue occurs when I run with JDK 1.7.
Comment 3 Christopher Schultz 2013-09-12 20:00:28 UTC
Bug is INVALID, not FIXED.
When you run in Java 7 mode, something must be terribly wrong, because it looks like it's trying to use a Java 8 class. That's what makes your environment broken. Try re-installing the JRE?
NoSuchMethodError on ConcurrentHashMap$KeySetView
原创
©著作权归作者所有:来自51CTO博客作者mb6440a93307547的原创作品,请联系作者获取转载授权,否则将追究法律责任
上一篇:quartz的任务调度,同一个任务,在相同的时间被调用了2次
下一篇:Nexus启动失败The nexus-webapp service was launched, but failed to start.
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
【Java】NoSuchMethodError
刚开始写代码时,特别是类似web这种需要很多第三方jar包的项目,经常会遇到这个问题。这次记录下这个报错的原因。简而言之,这个报错是肯定是因为compile时方法存在,但,j...
NoSuchMethodError jar包 类加载器 jar