简体   繁体   English

org.springframework.web.context.ConfigurableWebApplicationContext.setId(Ljava / lang / String;)和链式反应

[英]org.springframework.web.context.ConfigurableWebApplicationContext.setId(Ljava/lang/String;) and chain reaction

I was trying to make a web application (not coded by me) to run, but, upon deployment, I am getting the following exceptions. 我试图使一个Web应用程序(不是我编写的)运行,但是在部署时,出现了以下异常。

  1. java.lang.NoSuchMethodError: org.springframework.web.context.ConfigurableWebApplicationContext.setId(Ljava/lang/String;)V java.lang.NoSuchMethodError:org.springframework.web.context.ConfigurableWebApplicationContext.setId(Ljava / lang / String;)V

I have already checked and validated that there are no version conflicts for the spring-blabla jars in the WEB-INF/libs folder (I am using spring version 3.2.0.M1) and the dependecies in the pom.xml file have the following form. 我已经检查并确认WEB-INF / libs文件夹中的spring-blabla jar没有版本冲突(我使用的是Spring版本3.2.0.M1),并且pom.xml文件中的依赖项如下:形成。

    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-web</artifactId>
      <version>${org.springframework.version}</version>
    </dependency>

I have been quite desperate, so, as a last resort, I checked a chinese site and experimented with the following listener in the * web.xml *file 我非常绝望,因此,作为最后的选择,我检查了一个中文站点,并在* web.xml *文件中尝试了以下侦听器

<listener>
<listener-class>org.springframework.web.util.IntrospectorCleanupListener</listener-class>

under the already existing one: 在已经存在的一个下:

<listener>
    <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>

When I am running the application, I am no longer receiving the previous exception, but another one, 当我运行应用程序时,我不再收到先前的异常,而是另一个异常,

Context initialization failed org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.web.context.support.XmlWebApplicationContext]: Constructor threw exception; 上下文初始化失败org.springframework.beans.BeanInstantiationException:无法实例化bean类[org.springframework.web.context.support.XmlWebApplicationContext]:构造方法抛出异常; nested exception is java.lang.NoSuchMethodError: org.springframework.jndi.JndiLocatorDelegate.isDefaultJndiEnvironmentAvailable()Z 嵌套异常是java.lang.NoSuchMethodError:org.springframework.jndi.JndiLocatorDelegate.isDefaultJndiEnvironmentAvailable()Z

and I really have no idea what to do ... 我真的不知道该怎么办...

It's very likely your runtime is reading Spring 2.0 instead of 3.2. 您的运行时很有可能正在阅读Spring 2.0而不是3.2。 Take a look at Spring 2 ConfigurableWebApplicationContext , it doesn't have setId(String) method. 看一下Spring 2 ConfigurableWebApplicationContext ,它没有setId(String)方法。

I would start debugging the problem by checking the jar/war file, see if any duplicate version of Spring. 我将通过检查jar / war文件开始调试问题,看看是否有任何重复的Spring版本。 Also check the web container classpath (eg: tomcat lib folder). 还要检查Web容器的类路径(例如:tomcat lib文件夹)。 If there's a Spring 2 jars in there it could cause confusion 如果其中装有Spring 2罐子,可能会引起混乱

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 java.lang.NoSuchMethodError:org.springframework.web.context.ConfigurableWebApplicationContext.setId(Ljava / lang / String;)V - java.lang.NoSuchMethodError: org.springframework.web.context.ConfigurableWebApplicationContext.setId(Ljava/lang/String;)V java.lang.NoSuchMethodError:org.springframework.web.context.ConfigurableWebApplicationContext.getId()Ljava / lang / String; - java.lang.NoSuchMethodError: org.springframework.web.context.ConfigurableWebApplicationContext.getId()Ljava/lang/String; java.lang.NoSuchMethodError: org.springframework.web.context.ConfigurableWebApplicationContext.getEnvironment() - java.lang.NoSuchMethodError: org.springframework.web.context.ConfigurableWebApplicationContext.getEnvironment() 引起:java.lang.NoSuchMethodError: org.springframework.web.bind.annotation.RequestMapping.path()[Ljava/lang/String; - Caused by: java.lang.NoSuchMethodError: org.springframework.web.bind.annotation.RequestMapping.path()[Ljava/lang/String; 造成原因:java.lang.NoSuchMethodError:org.springframework.beans.MutablePropertyValues.get(Ljava / lang / String;)Ljava / lang / Object - Caused by: java.lang.NoSuchMethodError: org.springframework.beans.MutablePropertyValues.get(Ljava/lang/String;)Ljava/lang/Object java.lang.NoSuchMethodError: org.springframework.util.StringUtils.matchesCharacter(Ljava/lang/String;C)Z - java.lang.NoSuchMethodError: org.springframework.util.StringUtils.matchesCharacter(Ljava/lang/String;C)Z Spring java.lang.NoSuchMethodError:org.springframework.web.accept.PathExtensionContentNegotiationStrategy.getMediaTypes()Ljava / util / Map; - Spring java.lang.NoSuchMethodError: org.springframework.web.accept.PathExtensionContentNegotiationStrategy.getMediaTypes()Ljava/util/Map; org.springframework.web.context.ContextLoaderListener(java.lang.ClassNotFoundException) - org.springframework.web.context.ContextLoaderListener(java.lang.ClassNotFoundException) java.lang.NoClassDefFoundError:org / springframework / web / context / ContextCleanupListener - java.lang.NoClassDefFoundError: org/springframework/web/context/ContextCleanupListener java.lang.ClassNotFoundException:org.springframework.web.context.ContextLoadListener - java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoadListener
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM