My setup is fairly simple: I have a web front-end, back-end is spring-wired.
I am using AOP to add a layer of security on my rpc services.
It\'s all good, ex
If using mvn
, check that you have the correct scope (if you have that defined) in your pom.xml
. I once had it incorrectly set to test but needed it for runtime.
This trick worked for me too: In Eclipse right-click on the project and then Maven > Update Dependencies.
I run into this problem in my first attempt at AOP, following a spring tutorial.
My problem was not having spring-aop.jar
in my classpath. The tutorial listed all other dependencies I had to add, namely:
aspectjrt.jar
aspectjweaver.jar
aspectj.jar
aopalliance.jar
But the one was missing. Just one more problem that can contribute to that symptom in the original question.
I am using Eclipse (neon), Java SE 8, beans 3.0, spring AOP 3.0, Spring 4.3.4. The problem showed in the Java view --not JEE--, and while trying to just run the application with Right button menu -> Run As -> Java Application.
I have the same problem with spring 3.0.2 and spring-beans-3.0.xsd.
My solution:
Create a file META-INF/spring.schemas in the source folder and copy all necesary definitions. Create spring.handlers too.
I think that the class PluggableSchemaResolver is not working correctly.
http://static.springsource.org/spring/docs/3.0.x/javadoc-api/org/springframework/beans/factory/xml/PluggableSchemaResolver.html
from the javadoc:
"By default, this class will look for mapping files in the classpath using the pattern: META-INF/spring.schemas allowing for multiple files to exist on the classpath at any one time."
but in my case, this class only read the first spring.schemas finded.
Grettings. pacovr
In case someone else runs into this problem, I just did using Eclipse; running the project via the right click action. This error occurred in the J2EE view, but did NOT occur in the Java view. Not sure - assuming something with adding libraries to the correct 'lib' directory.
I am also using a Maven project, allowing m2eclipse to manage dependancies.