wood burning stoves 2.0*
The moose likes Spring and the fly likes applicationContext.xml - Can not find definition for element 'beans' Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "applicationContext.xml - Can not find definition for element Watch "applicationContext.xml - Can not find definition for element New topic
Author

applicationContext.xml - Can not find definition for element 'beans'

Mat Anthony
Ranch Hand

Joined: May 21, 2008
Posts: 229
Hi All,
I'm trying to integrate spring security into my app and get the following error in the applicationContext.xml

org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 5 in XML document from ServletContext resource [/WEB-INF/applicationContext.xml] is invalid; nested exception is org.xml.sax.SAXParseException: <Line 5, Column 263>: XML-24538: (Error) Can not find definition for element 'beans'

The file:applicationContext.xml contains:-



Has anybody got any clues.

Mat
Vyas Sanzgiri
Ranch Hand

Joined: Jun 16, 2007
Posts: 686



Can you provide the complete application context file?


===Vyas Sanzgiri===
My Blog
abani patra
Ranch Hand

Joined: Oct 11, 2011
Posts: 70
Hi,
I have some time ago face problem like that I have used spring 3 all jar file for web, context etc then it solved.
Mat Anthony
Ranch Hand

Joined: May 21, 2008
Posts: 229
Hi All,
thanks for your response.
I have cahnged the applicationContext_security.xml file to now contain the following:-



I now get the following error:-
org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 11 in XML document from ServletContext resource [/WEB-INF/applicationContext_security.xml] is invalid; nested exception is oracle.xml.parser.schema.XSDException: Connection timed out: connect
Caused by: oracle.xml.parser.schema.XSDException: Connection timed out: connect

Here are some of the jar files that i use:-
org.springframework.aop-3.0.5.RELEASE.jar
org.springframework.asm-3.0.5.RELEASE.jar
org.springframework.beans-3.0.5.RELEASE.jar
org.springframework.context-3.0.5.RELEASE.jar
org.springframework.context.support-3.0.5.RELEASE.jar
org.springframework.core-3.0.5.RELEASE.jar
org.springframework.expression-3.0.5.RELEASE.jar
org.springframework.orm-3.0.5.RELEASE.jar
org.springframework.transaction-3.0.5.RELEASE.jar
org.springframework.web-3.0.5.RELEASE.jar

spring-hibernate3_2.0.1.jar
spring-jdbc2.5.6.jar
spring-security-config-3_1.0.M2.jar
spring-security-core-3_1.0.M2.jar
spring-security-taglibs-3_1.0.M2.jar
spring-security-web-3_1.0.M2.jar
spring.jar

xmlcomp.jar
xmlparserv2.jar

el-api-2.2.jar
el-impl-2.2.jar

Not sure whats causing this oracle.xml.parser.schema.XSDException: Connection timed out: connect

Mat











Roberto Perillo
Bartender

Joined: Dec 28, 2007
Posts: 2246

Howdy, Mat.

Champ, try this: use the file of your first post, create a file named spring.schemas and place it in the META-INF directory of your WAR file. This file should have the following content:



Please try that and let us know if it works.


Cheers, Bob "John Lennon" Perillo
SCJP, SCWCD, SCJD, SCBCD - Daileon: A Tool for Enabling Domain Annotations
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: applicationContext.xml - Can not find definition for element 'beans'
 
Similar Threads
Adding spring-security-core-3.0.5 to org.springframework.core-3.0.0.M3
SpringSecurity-config.xml doesn´t find http tag
Namespace Query
Spring security - Need to secure methods - getting error
Error: The matching wildcard is strict, but no declaration can be found for element 'remember-me'