Results 1 to 7 of 7

Thread: Reinstall tc server on STS

  1. #1

    Default 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?
    [URL="http://vicina.info"] 新闻,社区新闻,分类广告

  2. #2
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    13,625

    Default

    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.
    Marten Deinum
    Java Consultant / Pragmatist / Open Source Enthousiast / Author


    Pro Spring MVC: With Web Flow
    Conspect

    Have you read the reference guide.
    Use the [ code ] tags, young padawan

  3. #3

    Default

    Quote 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?
    [URL="http://vicina.info"] 新闻,社区新闻,分类广告

  4. #4
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    13,625

    Default

    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.
    Marten Deinum
    Java Consultant / Pragmatist / Open Source Enthousiast / Author


    Pro Spring MVC: With Web Flow
    Conspect

    Have you read the reference guide.
    Use the [ code ] tags, young padawan

  5. #5

    Default

    Quote 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?
    [URL="http://vicina.info"] 新闻,社区新闻,分类广告

  6. #6
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    13,625

    Default

    Read my friend, read...

    I nowhere mentioned the DispatcherServlet I mentioned the ContextLoaderListener.
    Marten Deinum
    Java Consultant / Pragmatist / Open Source Enthousiast / Author


    Pro Spring MVC: With Web Flow
    Conspect

    Have you read the reference guide.
    Use the [ code ] tags, young padawan

  7. #7

    Default

    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>
    [URL="http://vicina.info"] 新闻,社区新闻,分类广告

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •