aspose file tools*
The moose likes Spring and the fly likes Configuration problem: Unable to locate NamespaceHandler for namespace 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 "Configuration problem: Unable to locate NamespaceHandler for namespace " Watch "Configuration problem: Unable to locate NamespaceHandler for namespace " New topic
Author

Configuration problem: Unable to locate NamespaceHandler for namespace

palanisamy subramani
Greenhorn

Joined: Aug 30, 2010
Posts: 29
When i load the Spring Config file, getting below error.

Exception in thread "main" org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unable to locate NamespaceHandler for namespace [http://www.springframework.org/schema/context]

below is my config file.




Let me know if there is any problem with my config.Thanks


Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17260
    
    6

It looks correct.

Are the Spring jar files in your classpath. Sometimes it can't find the xsd file, which are in the jar files and if the jar file isn't in the classpath it can't find it.

or, maybe you have a hidden character in there. I have had that happen to me in Spring ToolSuite, which is Eclipse, where I used the check boxes for "namespaces" and STS automatically sets up the header of the xml. Then I went in there and added carriage returns and then it didn't like it. That happened to me a couple of times, but usually I can add those carriage returns.

When I have problems, I remove the header part for namespaces and get back to the basic header for the beans namespace, then using STS go to the Namespace tab at the bottom of the config file in STS, in that tab there are checkboxes. I then click which namespaces I want and let STS fix things for me.

Hope that helps.

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
palanisamy subramani
Greenhorn

Joined: Aug 30, 2010
Posts: 29
Thanks Mark.

All my jars are in my Classpath.I tried all your way, but no hope, still getting the same. Looks very odd.
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17260
    
    6

Wait, what is this???

</int-sftp:inbound-channel-adapter>

then later

</int:channel>

I thought the "/" needs to be at the end like

<int:channel/>

I was thinking since you say the jars are there that there was something wrong with your xml tags and that stood out to me as odd.

If you are in STS, try creating the xml file from scratch choosing New Spring Bean Configuration File. stating a different name, clicking the next button and choosing the namespaces. Then add your beans one by one manually, not copying and pasting to make sure you have it correct, no red showing in the IDE.

Mark
Tudurachi Ovidiu
Greenhorn

Joined: Nov 13, 2012
Posts: 1
I found the following post: http://robert-reiz.com/2011/11/14/832/#comment-506
It solved my problem.

palanisamy subramani wrote:When i load the Spring Config file, getting below error.

Exception in thread "main" org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unable to locate NamespaceHandler for namespace [http://www.springframework.org/schema/context]

below is my config file.




Let me know if there is any problem with my config.Thanks




Atul Kumbhar
Greenhorn

Joined: Oct 21, 2012
Posts: 10
I am facing following error while deploying the webflow app in tomcat:
"org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.springframework.org/schema/webflow]
Offending resource: ServletContext resource [/WEB-INF/flows/onboarding-flow.xml]"

I followed the following post: http://robert-reiz.com/2011/11/14/832/#comment-506
But no luck.

Following is the content from onboarding-flow.xml



Can somebody please point out the issue.
Thanks in advance.
Bill Gorder
Bartender

Joined: Mar 07, 2010
Posts: 1680
    
    7

Assuming you have correctly included the Webflow dependency in your project it may be a version problem. Try removing the version from the namespace, Spring will then just use the lastest one available. Also Marks suggestion of using the 'namespace' tab in STS is a good one.


[How To Ask Questions][Read before you PM me]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Configuration problem: Unable to locate NamespaceHandler for namespace