Home Ask Login Register

Developers Planet

Your answer is one click away!

G. Nicolas February 2016

Failed to import bean definitions from URL location [classpath:transact-application-config.xml]

I am working on a application in which I would like to use , but whenever I do so, I get an error as mentioned below. I have checked other links for similar problems, but they were not useful with all the options it had. So I am posting a new question.

Error code :

org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Failed to import bean definitions from URL location [classpath:transact-application-config.xml]
Offending resource: ServletContext resource [/WEB-INF/applicationContext.xml]; nested exception is org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 17 in XML document from class path resource [transact-application-config.xml] is invalid; nested exception is org.xml.sax.SAXParseException; lineNumber: 17; columnNumber: 40; cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'aop:config'.
    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:76)
    at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.importBeanDefinitionResource(DefaultBeanDefinitionDocumentReader.java:245)
    at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseDefaultElement(DefaultBeanDefinitionDocumentReader.java:196)
    at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:181)
    at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.doRegisterBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:140)
    at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:111        


Sheetal Mohan Sharma February 2016

Your XML looks ok - but hard to find error in such case. Couple of things you can do.

Make sure that there is only one version of xml parser in your classpath. It could be possible that your jdk has another version/other parser which is loaded before your parser. Check your classpath & also check your schemaLocation attribute value exists. Try to change to actual version ( like 3.3 or 4.1 in xsd to ensure its not spring version issue.

Post Status

Asked in February 2016
Viewed 1,505 times
Voted 5
Answered 1 times


Leave an answer

Quote of the day: live life