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