Bean not found in class loader
Warning: Exception encountered during context initialization-cancelling refresh attempt: Org.springframework.beans.factory.BeanCreationException:Error creating Bean with Name ' sqlsessionfactory ' defined in file [E:\work\2017.4.19\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\LOL_PJ\WEB-INF\classes\ Applicationcontext_dao.xml]: Initialization of Bean failed; Nested exception is Java.lang.noclassdeffounderror:org/apache/ibatis/mapping/databaseidprovider
May 21, 2018 11:26:24 am Org.springframework.web.context.ContextLoader initwebapplicationcontext
Severity: Context initialization failed
Org.springframework.beans.factory.BeanCreationException:Error creating Bean with Name ' sqlsessionfactory ' defined in file [E:\work\2017.4.19\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\LOL_PJ\WEB-INF\classes\ Applicationcontext_dao.xml]: Initialization of Bean failed; Nested exception is Java.lang.noclassdeffounderror:org/apache/ibatis/mapping/databaseidprovider
At Org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean ( abstractautowirecapablebeanfactory.java:587)
At Org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean ( abstractautowirecapablebeanfactory.java:501)
At Org.springframework.beans.factory.support.abstractbeanfactory.lambda$dogetbean$0 (AbstractBeanFactory.java : 317)
At Org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton ( defaultsingletonbeanregistry.java:228)
At Org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean (abstractbeanfactory.java:315)
At Org.springframework.beans.factory.support.AbstractBeanFactory.getBean (abstractbeanfactory.java:199)
At Org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons ( defaultlistablebeanfactory.java:741)
At Org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization ( abstractapplicationcontext.java:869)
At Org.springframework.context.support.AbstractApplicationContext.refresh (abstractapplicationcontext.java:550)
At Org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext (Contextloader.java : 409)
At Org.springframework.web.context.ContextLoader.initWebApplicationContext (contextloader.java:291)
At Org.springframework.web.context.ContextLoaderListener.contextInitialized (contextloaderlistener.java:103)
At Org.apache.catalina.core.StandardContext.listenerStart (standardcontext.java:4643)
At Org.apache.catalina.core.StandardContext.startInternal (standardcontext.java:5105)
At Org.apache.catalina.util.LifecycleBase.start (lifecyclebase.java:183)
At Org.apache.catalina.core.containerbase$startchild.call (containerbase.java:1425)
At Org.apache.catalina.core.containerbase$startchild.call (containerbase.java:1415)
At Java.util.concurrent.FutureTask.run (futuretask.java:266)
At Org.apache.tomcat.util.threads.InlineExecutorService.execute (inlineexecutorservice.java:75)
At Java.util.concurrent.AbstractExecutorService.submit (abstractexecutorservice.java:134)
At Org.apache.catalina.core.ContainerBase.startInternal (containerbase.java:941)
At Org.apache.catalina.core.StandardHost.startInternal (standardhost.java:839)
At Org.apache.catalina.util.LifecycleBase.start (lifecyclebase.java:183)
At Org.apache.catalina.core.containerbase$startchild.call (containerbase.java:1425)
At Org.apache.catalina.core.containerbase$startchild.call (containerbase.java:1415)
At Java.util.concurrent.FutureTask.run (futuretask.java:266)
At Org.apache.tomcat.util.threads.InlineExecutorService.execute (inlineexecutorservice.java:75)
At Java.util.concurrent.AbstractExecutorService.submit (abstractexecutorservice.java:134)
At Org.apache.catalina.core.ContainerBase.startInternal (containerbase.java:941)
At Org.apache.catalina.core.StandardEngine.startInternal (standardengine.java:258)
At Org.apache.catalina.util.LifecycleBase.start (lifecyclebase.java:183)
At Org.apache.catalina.core.StandardService.startInternal (standardservice.java:422)
At Org.apache.catalina.util.LifecycleBase.start (lifecyclebase.java:183)
At Org.apache.catalina.core.StandardServer.startInternal (standardserver.java:770)
At Org.apache.catalina.util.LifecycleBase.start (lifecyclebase.java:183)
At Org.apache.catalina.startup.Catalina.start (catalina.java:671)
At Sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
At Sun.reflect.NativeMethodAccessorImpl.invoke (nativemethodaccessorimpl.java:62)
At Sun.reflect.DelegatingMethodAccessorImpl.invoke (delegatingmethodaccessorimpl.java:43)
At Java.lang.reflect.Method.invoke (method.java:498)
At Org.apache.catalina.startup.Bootstrap.start (bootstrap.java:355)
At Org.apache.catalina.startup.Bootstrap.main (bootstrap.java:495)
caused By:java.lang.noclassdeffounderror:org/apache/ibatis/mapping/databaseidprovider
At Java.lang.Class.getDeclaredMethods0 (Native Method)
At Java.lang.Class.privateGetDeclaredMethods (class.java:2701)
At Java.lang.Class.privateGetPublicMethods (class.java:2902)
At Java.lang.Class.getMethods (class.java:1615)
At Org.springframework.beans.ExtendedBeanInfoFactory.supports (extendedbeaninfofactory.java:56)
At Org.springframework.beans.ExtendedBeanInfoFactory.getBeanInfo (extendedbeaninfofactory.java:48)
At Org.springframework.beans.CachedIntrospectionResults.getBeanInfo (cachedintrospectionresults.java:242)
At Org.springframework.beans.cachedintrospectionresults.<init> (cachedintrospectionresults.java:273)
At Org.springframework.beans.CachedIntrospectionResults.forClass (cachedintrospectionresults.java:177)
At Org.springframework.beans.BeanWrapperImpl.getCachedIntrospectionResults (beanwrapperimpl.java:174)
At Org.springframework.beans.BeanWrapperImpl.getLocalPropertyHandler (beanwrapperimpl.java:230)
At Org.springframework.beans.BeanWrapperImpl.getLocalPropertyHandler (beanwrapperimpl.java:63)
At Org.springframework.beans.AbstractNestablePropertyAccessor.getPropertyHandler ( abstractnestablepropertyaccessor.java:725)
At Org.springframework.beans.AbstractNestablePropertyAccessor.isWritableProperty ( abstractnestablepropertyaccessor.java:562)
At Org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues ( abstractautowirecapablebeanfactory.java:1607)
At Org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean ( abstractautowirecapablebeanfactory.java:1357)
At Org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean ( abstractautowirecapablebeanfactory.java:578)
... More
caused By:java.lang.ClassNotFoundException:org.apache.ibatis.mapping.DatabaseIdProvider
At Org.apache.catalina.loader.WebappClassLoaderBase.loadClass (webappclassloaderbase.java:1275)
At Org.apache.catalina.loader.WebappClassLoaderBase.loadClass (webappclassloaderbase.java:1104)
... More
May 21, 2018 11:26:24 am Org.apache.catalina.core.StandardContext listenerstart
Severity: Exception sending context initialized event to listener instance of class [Org.springframework.web.context.ContextLoa Derlistener]
Org.springframework.beans.factory.BeanCreationException:Error creating Bean with Name ' sqlsessionfactory ' defined in file [E:\work\2017.4.19\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\LOL_PJ\WEB-INF\classes\ Applicationcontext_dao.xml]: Initialization of Bean failed; Nested exception is Java.lang.noclassdeffounderror:org/apache/ibatis/mapping/databaseidprovider
At Org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean ( abstractautowirecapablebeanfactory.java:587)
At Org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean ( abstractautowirecapablebeanfactory.java:501)
At Org.springframework.beans.factory.support.abstractbeanfactory.lambda$dogetbean$0 (AbstractBeanFactory.java : 317)
At Org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton ( defaultsingletonbeanregistry.java:228)
At Org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean (abstractbeanfactory.java:315)
At Org.springframework.beans.factory.support.AbstractBeanFactory.getBean (abstractbeanfactory.java:199)
At Org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons ( defaultlistablebeanfactory.java:741)
At Org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization ( abstractapplicationcontext.java:869)
At Org.springframework.context.support.AbstractApplicationContext.refresh (abstractapplicationcontext.java:550)
At Org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext (Contextloader.java : 409)
At Org.springframework.web.context.ContextLoader.initWebApplicationContext (contextloader.java:291)
At Org.springframework.web.context.ContextLoaderListener.contextInitialized (contextloaderlistener.java:103)
At Org.apache.catalina.core.StandardContext.listenerStart (standardcontext.java:4643)
At Org.apache.catalina.core.StandardContext.startInternal (standardcontext.java:5105)
At Org.apache.catalina.util.LifecycleBase.start (lifecyclebase.java:183)
At Org.apache.catalina.core.containerbase$startchild.call (containerbase.java:1425)
At Org.apache.catalina.core.containerbase$startchild.call (containerbase.java:1415)
At Java.util.concurrent.FutureTask.run (futuretask.java:266)
At Org.apache.tomcat.util.threads.InlineExecutorService.execute (inlineexecutorservice.java:75)
At Java.util.concurrent.AbstractExecutorService.submit (abstractexecutorservice.java:134)
At Org.apache.catalina.core.ContainerBase.startInternal (containerbase.java:941)
At Org.apache.catalina.core.StandardHost.startInternal (standardhost.java:839)
At Org.apache.catalina.util.LifecycleBase.start (lifecyclebase.java:183)
At Org.apache.catalina.core.containerbase$startchild.call (containerbase.java:1425)
At Org.apache.catalina.core.containerbase$startchild.call (containerbase.java:1415)
At Java.util.concurrent.FutureTask.run (futuretask.java:266)
At Org.apache.tomcat.util.threads.InlineExecutorService.execute (inlineexecutorservice.java:75)
At Java.util.concurrent.AbstractExecutorService.submit (abstractexecutorservice.java:134)
At Org.apache.catalina.core.ContainerBase.startInternal (containerbase.java:941)
At Org.apache.catalina.core.StandardEngine.startInternal (standardengine.java:258)
At Org.apache.catalina.util.LifecycleBase.start (lifecyclebase.java:183)
At Org.apache.catalina.core.StandardService.startInternal (standardservice.java:422)
At Org.apache.catalina.util.LifecycleBase.start (lifecyclebase.java:183)
At Org.apache.catalina.core.StandardServer.startInternal (standardserver.java:770)
At Org.apache.catalina.util.LifecycleBase.start (lifecyclebase.java:183)
At Org.apache.catalina.startup.Catalina.start (catalina.java:671)
At Sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
At Sun.reflect.NativeMethodAccessorImpl.invoke (nativemethodaccessorimpl.java:62)
At Sun.reflect.DelegatingMethodAccessorImpl.invoke (delegatingmethodaccessorimpl.java:43)
At Java.lang.reflect.Method.invoke (method.java:498)
At Org.apache.catalina.startup.Bootstrap.start (bootstrap.java:355)
At Org.apache.catalina.startup.Bootstrap.main (bootstrap.java:495)
caused By:java.lang.noclassdeffounderror:org/apache/ibatis/mapping/databaseidprovider
At Java.lang.Class.getDeclaredMethods0 (Native Method)
At Java.lang.Class.privateGetDeclaredMethods (class.java:2701)
At Java.lang.Class.privateGetPublicMethods (class.java:2902)
At Java.lang.Class.getMethods (class.java:1615)
At Org.springframework.beans.ExtendedBeanInfoFactory.supports (extendedbeaninfofactory.java:56)
At Org.springframework.beans.ExtendedBeanInfoFactory.getBeanInfo (extendedbeaninfofactory.java:48)
At Org.springframework.beans.CachedIntrospectionResults.getBeanInfo (cachedintrospectionresults.java:242)
At Org.springframework.beans.cachedintrospectionresults.<init> (cachedintrospectionresults.java:273)
At Org.springframework.beans.CachedIntrospectionResults.forClass (cachedintrospectionresults.java:177)
At Org.springframework.beans.BeanWrapperImpl.getCachedIntrospectionResults (beanwrapperimpl.java:174)
At Org.springframework.beans.BeanWrapperImpl.getLocalPropertyHandler (beanwrapperimpl.java:230)
At Org.springframework.beans.BeanWrapperImpl.getLocalPropertyHandler (beanwrapperimpl.java:63)
At Org.springframework.beans.AbstractNestablePropertyAccessor.getPropertyHandler ( abstractnestablepropertyaccessor.java:725)
At Org.springframework.beans.AbstractNestablePropertyAccessor.isWritableProperty ( abstractnestablepropertyaccessor.java:562)
At Org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues ( abstractautowirecapablebeanfactory.java:1607)
At Org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean ( abstractautowirecapablebeanfactory.java:1357)
At Org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean ( abstractautowirecapablebeanfactory.java:578)
... More
caused By:java.lang.ClassNotFoundException:org.apache.ibatis.mapping.DatabaseIdProvider
At Org.apache.catalina.loader.WebappClassLoaderBase.loadClass (webappclassloaderbase.java:1275)
At Org.apache.catalina.loader.WebappClassLoaderBase.loadClass (webappclassloaderbase.java:1104)
... More
Cause of Error: Project Setup problem, not aware of compatibility relationship between jar packages (dependency)
Mybatis-spring,1.3.1.jar's dependency relationship
And the version of Spring-context,jar Spring-jdbc.jar in my project is 5.0.5.release
Modification method: Modify the corresponding jar package to the corresponding version
SPRINGMVC Project Deployment Server starts the Spring container error bean is not found in the ClassLoader