File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Spring and the fly likes Spring web flow : Unable to locate Spring NamespaceHandler Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Spring web flow : Unable to locate Spring NamespaceHandler" Watch "Spring web flow : Unable to locate Spring NamespaceHandler" New topic
Author

Spring web flow : Unable to locate Spring NamespaceHandler

Rahul Vhatkar
Greenhorn

Joined: Aug 24, 2009
Posts: 9
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]

at org.springframework.beans.factory.parsing.FailFastProblemReporter.error(FailFastProblemReporter.java:68)
at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:85)
at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:80)

Any help?
Bill Gorder
Bartender

Joined: Mar 07, 2010
Posts: 1680
    
    7

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?

Thanks,

[How To Ask Questions][Read before you PM me]
Rahul Vhatkar
Greenhorn

Joined: Aug 24, 2009
Posts: 9
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.
Bill Gorder
Bartender

Joined: Mar 07, 2010
Posts: 1680
    
    7

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.

Bill
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Spring web flow : Unable to locate Spring NamespaceHandler