Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Configuration problem: Unable to locate NamespaceHandler for namespace

 
palanisamy subramani
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
palanisamy subramani
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1682
7
Android IntelliJ IDE Linux Mac OS X Spring
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic