wood burning stoves 2.0*
The moose likes Spring and the fly likes Spring Application Context exception:  Cannot find the declaration of element 'beans' Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Spring Application Context exception:  Cannot find the declaration of element Watch "Spring Application Context exception:  Cannot find the declaration of element New topic
Author

Spring Application Context exception: Cannot find the declaration of element 'beans'

Kunal Sathe
Ranch Hand

Joined: Apr 08, 2005
Posts: 49
Hello All,

I am fairly new to Spring and hence this question. When I deploy the existing spring applcation to a tomcat web server, I get the following exception:



The following is a snippet from the applicationContext.xml.



Can someone please point me in the right direction to resolve this issue?

Thanks in advance.

Kunal
Kunal Sathe
Ranch Hand

Joined: Apr 08, 2005
Posts: 49
Never mind. I resolved this issue. I have a spring.schemas file in the META-INF folder within the spring.jar
That file has an entry



I changed my application context file from


to

since the spring.schemas file has a mapping for spring-beans.xsd and not for spring-beans.xsd.

It seems to work fine now.

Kunal

 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Spring Application Context exception: Cannot find the declaration of element 'beans'
 
Similar Threads
Spring and namespace-aware parser
Failed to read schema document 'http://www.springframework.org/schema/beans/spring-beans-2.5.xsd',
BeanCreationException
Hibernate with Spring
Why cannot ApplicationContext find an existing file?