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

Spring JIRA | Joe Hart | 7 years ago
  1. 0

    I get the following NoSuchMethodError when starting up the Tomcat container. Looking into the nightly source I see there is a call on line 419 of FrameworkServlet.java to a method that no longer exists in ConfigurableWebApplicationContext. 13:18:35 ERROR [null].[localhost].[/] - StandardWrapper.Throwable java.lang.NoSuchMethodError: org.springframework.web.context.ConfigurableWebApplicationContext.setId(Ljava/lang/String;)V at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:419) at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:341) at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:307) at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:127) at javax.servlet.GenericServlet.init(GenericServlet.java:211) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1172) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:992) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4058) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4371) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardHost.start(StandardHost.java:719) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.startup.Embedded.start(Embedded.java:825) web.xml configuration: <servlet> <servlet-name>SpringRest</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>SpringRest</servlet-name> <url-pattern>/restapi/*</url-pattern> </servlet-mapping>

    Spring JIRA | 7 years ago | Joe Hart
    java.lang.NoSuchMethodError: org.springframework.web.context.ConfigurableWebApplicationContext.setId(Ljava/lang/String;)V
  2. 0

    I get the following NoSuchMethodError when starting up the Tomcat container. Looking into the nightly source I see there is a call on line 419 of FrameworkServlet.java to a method that no longer exists in ConfigurableWebApplicationContext. 13:18:35 ERROR [null].[localhost].[/] - StandardWrapper.Throwable java.lang.NoSuchMethodError: org.springframework.web.context.ConfigurableWebApplicationContext.setId(Ljava/lang/String;)V at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:419) at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:341) at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:307) at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:127) at javax.servlet.GenericServlet.init(GenericServlet.java:211) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1172) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:992) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4058) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4371) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardHost.start(StandardHost.java:719) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.startup.Embedded.start(Embedded.java:825) web.xml configuration: <servlet> <servlet-name>SpringRest</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>SpringRest</servlet-name> <url-pattern>/restapi/*</url-pattern> </servlet-mapping>

    Spring JIRA | 7 years ago | Joe Hart
    java.lang.NoSuchMethodError: org.springframework.web.context.ConfigurableWebApplicationContext.setId(Ljava/lang/String;)V
  3. 0

    Spring threw load exception(java.lang.NoSuchMethodError:)

    Stack Overflow | 4 years ago | Ezhil
    java.lang.NoSuchMethodError: org.springframework.web.context.ConfigurableWebApplicationContext.setId(Ljava/lang/String;)V
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Spring Exception on starting Application

    Stack Overflow | 5 years ago | Ankit
    java.lang.NoSuchMethodError: org.springframework.web.context.ConfigurableWebApplicationContext.setId(Ljava/lang/String;)V
  6. 0

    java.lang.NoSuchMethodError: org.springframework.web.context.ConfigurableWebApplicationContext.getEnvironment()

    Stack Overflow | 8 months ago | gunjan ragtah
    java.lang.NoSuchMethodError: org.springframework.web.context.ConfigurableWebApplicationContext.getEnvironment()Lorg/springframework/web/context/ConfigurableWebEnvironment;

    7 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NoSuchMethodError

      org.springframework.web.context.ConfigurableWebApplicationContext.setId(Ljava/lang/String;)V

      at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext()
    2. Spring MVC
      HttpServletBean.init
      1. org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:419)
      2. org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:341)
      3. org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:307)
      4. org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:127)
      4 frames
    3. JavaServlet
      GenericServlet.init
      1. javax.servlet.GenericServlet.init(GenericServlet.java:211)
      1 frame
    4. Glassfish Core
      Embedded.start
      1. org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1172)
      2. org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:992)
      3. org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4058)
      4. org.apache.catalina.core.StandardContext.start(StandardContext.java:4371)
      5. org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
      6. org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
      7. org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
      8. org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
      9. org.apache.catalina.startup.Embedded.start(Embedded.java:825)
      9 frames