Spring web flow : Unable to locate Spring NamespaceHandler
Joined: Aug 24, 2009
I am working on an application that has several projects. I am implementing a new feature called as user-setup-wizard for which I have decied to use Spring web flow. I plan to create a new project called as setup-wizard to have all my controller classes. My jsp files and XML files would be in an existing project called as banking-web.
The context definition XML file SpringMVC-servlet.xml was already present in the banking-web/WEB-INF directory (some Spring MVC feature already existed in the application).
I added following dependencies to the pom.xml of banking-web project
After running the mvn install command successfully, I added namespace declaration to my XML file:
When I run the Websphere8.0 server from within Eclipse, I srarted to get following errors in the console:
Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.springframework.org/schema/webflow-config]
Offending resource: ServletContext resource [/WEB-INF/SpringMVC-servlet.xml]
That looks OK at first glance but where is your version in your maven dependency? Do you have it defined in a parent POM containing a DependencyManagement section? If not you need to define that as well. Can you verify that the webflow jar is on the classpath under theh WEB-INF/lib directory in your application server deploy directory?
I observed that the web-flow jar file was not added to the classpath of my banking-web project.
I verified this by going to banking-web project properties > Java build path > Libraries.
When I manually added it, the server started without errors. I thought that maven must have added the jar to my project's classpath.
You are right you should not have to manually add it. Like I said in my previous post I found it suspect that the excerpt you posted from your POM did not include a <version> tag. Are you sure that maven is resolving the spring -web-flow dependency? Check your maven logs carefully.