Org.springframework.beans.factory.parsing.BeanDefinitionParsingException

Source: Internet
Author: User

Today when practicing spring AOP. The debug program has the following error

Org.springframework.beans.factory.parsing.BeanDefinitionParsingException

Baidu has a lot of methods do not solve the problem, when using spring I was directly using Myecplise to import the Spring jar package, The spring version number is 2.5.6, and then manually imported the Aspectjrt.jar and Aspectjweaver.jar two jar packages. There are a lot of people on the web saying that it is a jar package conflict, I will import the jar package after deleting the test program found that the error is not found the jar package, and then another import. Others say it is the spring version number, and then I replaced the spring version number with the result of 3.1.1, but there is no error, but no proxy class. Obviously it's also wrong.

Later, when I looked at spring's configuration file, I found that there was no bean in the spring configuration file that configured the proxy class, and there was no error in adding the proxy class bean to the spring configuration file.

Detailed stack errors such as the following:

Org.springframework.beans.factory.parsing.BeanDefinitionParsingException:Configuration problem:unable to locate Spring Namespacehandler for XML schema namespace [http://www.springframework.org/schema/aop]offending Resource:class Path resource [Test.xml]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:80) at Org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.error (beandefinitionparserdelegate.java:281 ) at Org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement ( beandefinitionparserdelegate.java:1294) at Org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement ( beandefinitionparserdelegate.java:1287) at Org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitIons (defaultbeandefinitiondocumentreader.java:135) at Org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions ( defaultbeandefinitiondocumentreader.java:92) at Org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions ( xmlbeandefinitionreader.java:507) at Org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions ( xmlbeandefinitionreader.java:398) at Org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions (Xmlbeandefinitionreader.java : 342) at Org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions ( xmlbeandefinitionreader.java:310) at Org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions ( abstractbeandefinitionreader.java:143) at Org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions ( abstractbeandefinitionreader.java:178) at Org.springframework.beans.factory.support.AbstractBeanDefiniTionreader.loadbeandefinitions (abstractbeandefinitionreader.java:149) at Org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions ( abstractbeandefinitionreader.java:212) at Org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions ( abstractxmlapplicationcontext.java:113) at Org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions ( ABSTRACTXMLAPPLICATIONCONTEXT.JAVA:80) at Org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory ( abstractrefreshableapplicationcontext.java:123) at Org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory ( abstractapplicationcontext.java:422) at Org.springframework.context.support.AbstractApplicationContext.refresh ( abstractapplicationcontext.java:352) at org.springframework.context.support.classpathxmlapplicationcontext.< Init> (classpathxmlapplicationcontext.java:139) at Org.springframework.context.support.ClasSpathxmlapplicationcontext.<init> (classpathxmlapplicationcontext.java:83) at Test. Userservicetest.textproxy (userservicetest.java:34) at Sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) At Sun.reflect.NativeMethodAccessorImpl.invoke (nativemethodaccessorimpl.java:57) at Sun.reflect.DelegatingMethodAccessorImpl.invoke (delegatingmethodaccessorimpl.java:43) at Java.lang.reflect.Method.invoke (method.java:606) at Org.junit.runners.model.frameworkmethod$1.runreflectivecall ( frameworkmethod.java:47) at Org.junit.internal.runners.model.ReflectiveCallable.run (reflectivecallable.java:12) At org.junit.runners.model.FrameworkMethod.invokeExplosively (frameworkmethod.java:44) at Org.junit.internal.runners.statements.InvokeMethod.evaluate (invokemethod.java:17) at Org.junit.runners.ParentRunner.runLeaf (parentrunner.java:271) at Org.junit.runners.BlockJUnit4ClassRunner.runChild (blockjunit4classrunner.java:70) at Org.junit.runners.BlockJUnit4ClassRunner.runChild (blockjunit4classrunner.java:50) at ORG.JUnit.runners.parentrunner$3.run (parentrunner.java:238) at Org.junit.runners.parentrunner$1.schedule ( parentrunner.java:63) at Org.junit.runners.ParentRunner.runChildren (parentrunner.java:236) at org.junit.runners.parentrunner.access$000 (parentrunner.java:53) at Org.junit.runners.parentrunner$2.evaluate ( parentrunner.java:229) at Org.junit.runners.ParentRunner.run (parentrunner.java:309) at Org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run (JUNIT4TESTREFERENCE.JAVA:50) at Org.eclipse.jdt.internal.junit.runner.TestExecution.run (testexecution.java:38) at Org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests (remotetestrunner.java:467) at Org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests (remotetestrunner.java:683) at Org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run (remotetestrunner.java:390) at Org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main (remotetestrunner.java:197)

Org.springframework.beans.factory.parsing.BeanDefinitionParsingException

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.