java - Spring ContextLoader fails to find applicationContext.xml -


I have been working alone on a project and now another developer has joined so that I can install the project We wanted to use SVN on our machine with very similar set-ups:

  • OS X Snow Leopard
  • Latest Eclipse WTP
  • m2eclipse Maven plugin
  • Subvoscript SVN plugin
  • Tomack 6.0.24

The spring version used is 2.5.6.

I have set up a project on my machine, which is used by Eclipse's "Project in SVN" tool, originally to make a 1: 1 copy of the project. Maven took care of all the dependencies without problems, as far as I can tell that the compiled project project without problem, with the resources in the source / web / resources resources, such as the webpage for application (eg applicationContext.xml), the Maven standard, src / The project code in main / java and all web-app related files in src / main / webapp and src is following / main / webapp / WEB-INF respectively.

The Web XML is configured to load the context in this way:

  & lt; Context-param & gt; & Lt; Ultimate Name & gt; ContextConfigLocation & lt; / Lastname & gt; & Lt; Ultimate Price & gt; Classpath: applicationContext.xml & lt; / Super-valued & gt; & Lt; / Reference param & gt; & Lt; Listener & gt; & Lt; Audience category & gt; Org.springframework.web.context.ContextLoaderListener & lt; / Listener Category & gt; & Lt; / Listener & gt; Using Eclipse's "Server" tool I tried to launch the application from Eclipse, but it failed with FileNotFoundException while attempting to load ApplicationContext.xml Gaya.  

Because the code taken out of the SVN has not been left untouched, I think that the problem is with the Mewen plugin for some parameters or that I have some important to finalize the set-up Have you forgotten the steps? Does anyone have to face similar problems or have any ideas where I should look for?

Thank you very much for your help!

This is correct and absolutely fine (like That you want the applicationContext Xml test class to be on the path).

This is not a copy on web-INF / classes, but it's my copy Instead, the file is copied to target / classes according to Maven-standard.

This is is copied Is target / yourapp / WEB-INF / classes , but not by process-resources , which is called default by m2eclipse on processing changes (this target copy / < Filtering the filter to code> target / square ). This is happening during the package phase (Or when clearly War War , War is inplace or start the war: the explosion ). As explained in the page, Java plugins are not responsible for compiling Java sources or copying resources .

So I can fight before running it on a package that you can automate the processing changes ( right-click ) on your project To do so, you can configure m2eclipse, then select Properties> Maven and add the appropriate war target to target to turn on resource changes < / Strong>). Although it did not try.


Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -