Announcement Announcement Module
Collapse
No announcement yet.
Error while starting web application Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Error while starting web application

    Hi,

    I am developing a Servlet-based Spring application, using Spring 1.2 and IBM websphere 4.0. I have included the following in the web.xml to load spring config files:

    <servlet>
    <servlet-name>SpringContextServlet</servlet-name>
    <servlet-class>org.springframework.web.context.ContextLoade rServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
    </servlet>

    but while starting the application, it gives the following error:

    [06.11.07 17:08:33:922 EST] 690140ec WebGroup X Servlet Error-[SpringContextServlet]: Failed to load servlet: java.lang.ClassCastException: org.springframework.web.context.ContextLoaderServl et
    at com.ibm.servlet.engine.webapp.WebAppServletManager .loadServlet(WebAppServletManager.java:148)
    at com.ibm.servlet.engine.webapp.WebAppServletManager .loadAutoLoadServlets(WebAppServletManager.java:35 7)
    at com.ibm.servlet.engine.webapp.WebApp.loadServletMa nager(WebApp.java:1001)
    at com.ibm.servlet.engine.webapp.WebApp.init(WebApp.j ava:133)
    at com.ibm.servlet.engine.srt.WebGroup.loadWebApp(Web Group.java:234)
    at com.ibm.servlet.engine.srt.WebGroup.init(WebGroup. java:139)
    at com.ibm.servlet.engine.ServletEngine.addWebApplica tion(ServletEngine.java:633)
    at com.ibm.ws.runtime.WebContainer.install(WebContain er.java:36)
    at com.ibm.ws.runtime.Server.startModule(Server.java: 615)
    at com.ibm.ws.runtime.StandardServer.initializeModule s(StandardServer.java:333)
    at com.ibm.ws.runtime.StandardServer.initializeRuntim e0(StandardServer.java:349)
    at com.ibm.ws.runtime.Server.initializeRuntime(Server .java:882)
    at com.ibm.ws.runtime.StandardServer.main(StandardSer ver.java:519)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.ibm.ws.bootstrap.WSLauncher.main(WSLauncher.ja va:158)
    at com.ibm.etools.websphere.tools.runner.api.ServerRu nner$1.run(ServerRunner.java)

    Please advise.

    Thanks.
    scorchicks

  • #2
    This is probably a classpath issue. Did you put the Spring JARs and related dependencies in WEB-INF/lib?

    Comment

    Working...
    X