Announcement Announcement Module
Collapse
No announcement yet.
Reinstall tc server on STS Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Reinstall tc server on STS

    I run into an error on tc server bundled with STS.

    12-Feb-2010 9:52:36 AM org.apache.catalina.core.StandardContext listenerStart
    SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListe ner
    org.springframework.beans.factory.BeanDefinitionSt oreException: IOException parsing XML document from ServletContext resource [/WEB-INF/applicationContext.xml]; nested exception is java.io.FileNotFoundException: Could not open ServletContext resource [/WEB-INF/applicationContext.xml]
    ...
    Since I can't see any log files, reinstalling tc server seems to be only option to try. Anything I need to know other than unpack tc server under the sts directory to replace the previous installation?

  • #2
    Have you actually taken a look at the stacktrace!!!

    The project you are trying to deploy either doesn't have a file named applicationContext.xml in the WEB-INF directory or it isn't fully/correctly deployed. It has nothing to do with your installation, it has to do with your project.

    Comment


    • #3
      Originally posted by Marten Deinum View Post
      Have you actually taken a look at the stacktrace!!!

      The project you are trying to deploy either doesn't have a file named applicationContext.xml in the WEB-INF directory or it isn't fully/correctly deployed. It has nothing to do with your installation, it has to do with your project.
      Thanks very much for your inputs.

      The project doesn't request a file named applicationContext.xml. It seems to be a build and/or deployment problem. Where I can find a documentation on the subject with Maven?

      Comment


      • #4
        It does... If you are building a web application and configured a default ContextLoaderListener the default is to look for that file. If it isn't there you will get an error, so either put the file there or fix your configuration.

        Comment


        • #5
          Originally posted by Marten Deinum View Post
          It does... If you are building a web application and configured a default ContextLoaderListener the default is to look for that file. If it isn't there you will get an error, so either put the file there or fix your configuration.
          If you mean a Spring bean configuration file called applicationContext.xml, when you say default I take as it need to spell out for org.springframework.web.servlet.DispatcherServlet . It doesn't seem to be true. On the other hand, if I give another name of a Spring bean configuration and definite it in the web.xml as

          Code:
          	<servlet>
          		<servlet-name>another Dispatcher Servlet</servlet-name>
          		<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
          		<init-param>
          			<param-name>contextConfigLocation</param-name>
          			<param-value>
          				/WEB-INF/spring/another.xml
          			</param-value>
          		</init-param>
          		<load-on-startup>1</load-on-startup>
          	</servlet>
          Why the Spring shall look for applicationContext.xml?

          Comment


          • #6
            Read my friend, read...

            I nowhere mentioned the DispatcherServlet I mentioned the ContextLoaderListener.

            Comment


            • #7
              Ok, I shall have something like

              Code:
              <context-param>
                <param-name>contextConfigLocation</param-name>
                <param-value>/WEB-INF/daoContext.xml /WEB-INF/applicationContext.xml</param-value>
              </context-param>

              Comment

              Working...
              X