I\'m trying to set up a simple spring application and I\'m getting the below exception. This is being run standalone in eclipse indigo.
Exception in thread \
the maven shade plugin seems to replace the spring.schemas file in the jars,so creating one of our own with all the individual spring.schema contents from each of the jar should solve the issue.
There could be possibility of mismatch of Spring Bean version and xsd definition.
For Example beans xsi:schemaLocation="http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.2.xsd http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.2.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.2.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.2.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
While in spring version is 3.0.5-Release
Check classpath version and keep them same. Shoul
Are you sure you have spring-beans
on the classpath?
This error normally means that it can't find a spring.schemas
(which is in spring-beans.jar
) explaining to it what that namespace means.
Other options are that the Maven Shade plugin has damaged spring.schemas
, but that's unlikely to be the case as you haven't mentioned Maven.
Maybe this post can help you:
Cannot find the declaration of element 'beans' in internet offline mode
It seems like being a problem of Schema configuration.
When I had this issue in STS I just cleaned the project and it worked.