Java.lang.NoClassDefFoundError:org.springframework.beans.FatalBeanException

Source: Internet
Author: User

After the project from SVN moved down, compiled through, but the operation has been error, error specific log as follows:

The first paragraph of the error?

? java.lang.NoClassDefFoundError:org.springframework.beans.FatalBeanException

At Org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean ( Abstractautowirecapablebeanfactory. ~[spring-beans-4.0.0.release.jar:4.0.0.release]

At Org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean ( Abstractautowirecapablebeanfactory. ~[spring-beans-4.0.0.release.jar:4.0.0.release]

At Org.springframework.beans.factory.support.abstractbeanfactory$1.getobject (abstractbeanfactory. ~[ Spring-beans-4.0.0.release.jar:4.0.0.release]

At Org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton ( Defaultsingletonbeanregistry. ~[spring-beans-4.0.0.release.jar:4.0.0.release]

At Org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean (abstractbeanfactory. ~[ Spring-beans-4.0.0.release.jar:4.0.0.release]

At Org.springframework.beans.factory.support.AbstractBeanFactory.getBean (abstractbeanfactory. ~[ Spring-beans-4.0.0.release.jar:4.0.0.release]

At Org.springframework.context.support.PostProcessorRegistrationDelegate.registerBeanPostProcessors ( Postprocessorregistrationdelegate. ~[spring-context-4.0.0.release.jar:4.0.0.release]

At Org.springframework.context.support.AbstractApplicationContext.registerBeanPostProcessors ( Abstractapplicationcontext. ~[spring-context-4.0.0.release.jar:4.0.0.release]

At Org.springframework.context.support.AbstractApplicationContext.refresh (Abstractapplicationcontext. ~[ Spring-context-4.0.0.release.jar:4.0.0.release]

At Org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext (Contextloader. ~[ Spring-web-4.0.0.release.jar:4.0.0.release]

At Org.springframework.web.context.ContextLoader.initWebApplicationContext (Contextloader. ~[ Spring-web-4.0.0.release.jar:4.0.0.release]

At Org.springframework.web.context.ContextLoaderListener.contextInitialized (Contextloaderlistener. [Spring-web-4.0.0.release.jar:4.0.0.release]

Second paragraph error

Ava.lang.IllegalStateException:ApplicationEventMulticaster not Initialized-call ' refresh ' before multicasting events via the Context:root webapplicationcontext:startup date [Tue May 11:23:47 CST 2017]; Root of context Hierarchy

At Org.springframework.context.support.AbstractApplicationContext.getApplicationEventMulticaster ( Abstractapplicationcontext. [Spring-context-4.0.0.release.jar:4.0.0.release]

At Org.springframework.context.support.AbstractApplicationContext.publishEvent (Abstractapplicationcontext. [Spring-context-4.0.0.release.jar:4.0.0.release]

At Org.springframework.context.support.AbstractApplicationContext.doClose (Abstractapplicationcontext. [Spring-context-4.0.0.release.jar:4.0.0.release]

At Org.springframework.context.support.AbstractApplicationContext.close (Abstractapplicationcontext. [Spring-context-4.0.0.release.jar:4.0.0.release]

At Org.springframework.web.context.ContextLoader.closeWebApplicationContext (Contextloader. [Spring-web-4.0.0.release.jar:4.0.0.release]

At Org.springframework.web.context.ContextLoaderListener.contextDestroyed (Contextloaderlistener. [Spring-web-4.0.0.release.jar:4.0.0.release]

Workaround:

Spring-config.xml file? There is a MyBatis configuration, as follows

  <!--the package name of the Mapper interface, Spring automatically finds the mapper
<bean class= "Org.mybatis.spring.mapper.MapperScannerConfigurer" >
<property name= "Basepackage" value= "Com.qumaiyao,com.hys.mds.project.o2o.logic"/>
<property name= "Markerinterface" value= "Com.qumaiyao.MybatisMapper"/>
</bean>

Add a new line to this configuration,

<property name= "Sqlsessionfactorybeanname" value= "Sqlsessionfactory"/>

The modified configuration is as follows:

    <!--the package name of the Mapper interface, Spring automatically finds the mapper
<bean class= "Org.mybatis.spring.mapper.MapperScannerConfigurer" >
<property name= "Basepackage" value= "Com.qumaiyao,com.hys.mds.project.o2o.logic"/>
<property name= "Markerinterface" value= "Com.qumaiyao.MybatisMapper"/>
<property name= "Sqlsessionfactorybeanname" value= "Sqlsessionfactory"/>
</bean>

When this is done, the project is up and running.

Reference blog:

http://blog.csdn.net/qq_27348011/article/details/51492756?

http://peterz2011.blog.51cto.com/3186140/1313011

Java.lang.NoClassDefFoundError:org.springframework.beans.FatalBeanException

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.