I am trying to deploy a web application on Eclipse 3.3.0 with Tomcat 6.0. The web application contains spring configurations file which is loaded in "WebContent/WEB-INF/spring-configuration" folder. After integrating everything and starting the server, I am getting following error:
SpringConfigurationException: Neither the filename nor 'suffixed' filename could be found in the classpath
timestamp: 2007-09-07 03:51:24.303 PM IST (1189160484303)
supplied filename: /WEB-INF/spring-configuration/main.xml
suffixed filename with hyphen: /WEB-INF/spring-configuration/main-Local.xml
suffixed filename without hyphen: /WEB-INF/spring-configuration/mainLocal.xml
ClassLoader toString(): WebappClassLoader
----------> Parent Classloader:
main-Local.xml is a config file which exists in spring-configuration.
I suspect that it is unable to find mainLocal.xml. but what sthe work around for it. Can anyone tell me what is wrong here and what are the possible solutions i can implement. I have put all the required jar files in web-inf lib folder as well as lib folder of tomcat directory.
If I remember correctly, you should rename it to:
And in your DispatcherServlet should have mentioned that as your entry file.
I did this but does not work.
The same workspace is working fine if I use IBM RAD6.0. As soon as i try to do things on Eclipse and Tomcat then the problem starts.
I analysed the problem and found that there is some problem with the class loader. As tomcat have 4 types of classloader in which /WEB-INF/classes is one of them. The required file is placed in /WEB-INF/spring-configuration and for this a classloader like "/WEB-INF/" is required so that it could found its child folders.
My question is that how can we set an another classloader = "WEB-INF/" .
Finally I fixed this.
I had to set localclasspath in Eclipse. I did it using the Run dialogue and creating the desired folder path in the classpath tab. I rebuild and restart the server and the problem had gone.
Thanks everyone put their efforts in it.
Can you please elaborate more about fix you did.
here i am trying to deploy the application in Tomcat 5.0 directly. i am getting similar error while startup.
This is good chance to know about this world.