org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping#0': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'schedulerController' defined in URL [jar:file:/D:/Pankaj_Workspace/IRST_TRUNK_PANKANIS_GATEWAY_NEW/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/mgw/WEB-INF/lib/irst_rest_siebel.jar!/pankanis/gateway/IRSTWebServiceApplicationContext.xml]: Cannot resolve reference to bean 'BaseRestContext' while setting bean property 'restContext'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'BaseRestContext' defined in URL [jar:file:/D:/Pankaj_Workspace/IRST_TRUNK_PANKANIS_GATEWAY_NEW/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/mgw/WEB-INF/lib/mgw.core.jar!/pankanis/gateway/mgwdataApplicationContext.xml]: Cannot resolve reference to bean 'usrService' while setting bean property 'authService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'usrService' defined in URL [jar:file:/D:/Pankaj_Workspace/IRST_TRUNK_PANKANIS_GATEWAY_NEW/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/mgw/WEB-INF/lib/mgw.core.jar!/pankanis/gateway/mgwdataApplicationContext.xml]: Cannot resolve reference to bean 'userDao' while setting bean property '_userDao'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userDao' defined in URL [jar:file:/D:/Pankaj_Workspace/IRST_TRUNK_PANKANIS_GATEWAY_NEW/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/mgw/WEB-INF/lib/mgw.core.jar!/pankanis/gateway/mgwdataApplicationContext.xml]: Cannot resolve reference to bean 'sqlMapClient' while setting bean property 'sqlMapClient'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlMapClient' defined in URL [jar:file:/D:/Pankaj_Workspace/IRST_TRUNK_PANKANIS_GATEWAY_NEW/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/mgw/WEB-INF/lib/mgw.core.jar!/pankanis/gateway/mgwdataApplicationContext.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse config resource: ServletContext resource [/WEB-INF/mysql/mgw-sqlmap-config.xml]; nested exception is com.ibatis.common.xml.NodeletException: Error parsing XML. Cause: java.lang.RuntimeException: Error parsing XPath '/sqlMapConfig/sqlMap'. Cause: com.ibatis.common.xml.NodeletException: Error parsing XML. Cause: java.lang.RuntimeException: Error parsing XPath '/sqlMap/cacheModel/end()'. Cause: java.lang.RuntimeException: Error setting Cache Controller Class. Cause: java.lang.InstantiationException: org.mybatis.caches.ehcache.EhcacheCache


Samebug tips1

This happens when you try to instantiate a class that can't be instantiated, either because the class object is abstract, an interface, an array class, a primitive type, void, or because the class has no nullary constructor.


7 months ago
Expert tip

Solutions on the web1477

Solution icon of coderanch
via Coderanch by Pankaj Shet, 9 months ago
[jar:file:/D:/Pankaj_Workspace/IRST_TRUNK_PANKANIS_GATEWAY_NEW/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/mgw/WEB-INF/lib/mgw.core.jar!/pankanis/gateway/mgwdataApplicationContext.xml]: Cannot resolve reference to bean 'usrService' while

Solution icon of stackoverflow
Error creating bean with name 'org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping#0': Initialization of bean failed; nested exception is java.lang.IllegalStateException: Cannot map handler [clients] to URL path [//save]: There is already handler [crm.venkat.controller.Clients@7e47dc12] mapped.

Solution icon of web
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in URL [jar:file:/home/ouadi/ETUDES/MS-SID/infos_Stage/Projet_Workflow_Monetique/workspace_stage/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/portal-web/WEB-INF/lib/portal-persistence-1.0.0-SNAPSHOT.jar!/selectsystem-persistence-context.xml]:

Solution icon of github
via GitHub by zhaopengme
, 1 year ago
name 'entityManagerFactory' defined in URL [file:/D:/Workspaces/ss4/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/quickstart/WEB-INF/classes/applicationContext.xml]: Cannot resolve reference to bean 'hibernateJpaVendorAdapter' while

Solution icon of github
' while setting bean property 'jpaVendorAdapter'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hibernateJpaVendorAdapter' defined in URL [file:/D:/i_work/springsource/vfabric-tc-server

Solution icon of googlegroups
via Google Groups by erha, 1 year ago
Error creating bean with name 'menuInfoService' defined in file [Y:\Projects \Alexander\Workspace\.metadata\.plugins\org.eclipse.wst.server.core \tmp0\wtpwebapps\Alexander\WEB-INF\classes\alexander\service \MenuInfoService.class]: Initialization of

Solution icon of stackoverflow
Error creating bean with name 'sessionFactoryPER' defined in URL [jar:file:/C:/Users/STG/Desktop/woork/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps/perWeb/WEB-INF/lib/perDao-2.0.jar!/applicationContext-datasource.xml]: Initialization of bean failed; nested exception is java.lang.reflect.MalformedParameterizedTypeException

Solution icon of stackoverflow
via Stack Overflow by Unknown author, 1 year ago
Error creating bean with name 'optimusMQ' defined in file [D:\Projects\ESS\optimus_java8_workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\optimus\WEB-INF\classes\META-INF\spring\web-applicationContext-jms.xml]: Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: Ljavax/transaction/TransactionSynchronizationRegistry;

Solution icon of stackoverflow
Error creating bean with name 'transactionManager' defined in ServletContext resource [/WEB-INF/xyzApplication-servlet.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating

Solution icon of web
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flowController' defined in ServletContext resource [/WEB-INF/config/webmvc-config.xml]: Cannot resolve reference to bean 'flowExecutor' while setting bean property 'flowExecutor'; nested

Stack trace

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping#0': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'schedulerController' defined in URL [jar:file:/D:/Pankaj_Workspace/IRST_TRUNK_PANKANIS_GATEWAY_NEW/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/mgw/WEB-INF/lib/irst_rest_siebel.jar!/pankanis/gateway/IRSTWebServiceApplicationContext.xml]: Cannot resolve reference to bean 'BaseRestContext' while setting bean property 'restContext'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'BaseRestContext' defined in URL [jar:file:/D:/Pankaj_Workspace/IRST_TRUNK_PANKANIS_GATEWAY_NEW/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/mgw/WEB-INF/lib/mgw.core.jar!/pankanis/gateway/mgwdataApplicationContext.xml]: Cannot resolve reference to bean 'usrService' while setting bean property 'authService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'usrService' defined in URL [jar:file:/D:/Pankaj_Workspace/IRST_TRUNK_PANKANIS_GATEWAY_NEW/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/mgw/WEB-INF/lib/mgw.core.jar!/pankanis/gateway/mgwdataApplicationContext.xml]: Cannot resolve reference to bean 'userDao' while setting bean property '_userDao'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userDao' defined in URL [jar:file:/D:/Pankaj_Workspace/IRST_TRUNK_PANKANIS_GATEWAY_NEW/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/mgw/WEB-INF/lib/mgw.core.jar!/pankanis/gateway/mgwdataApplicationContext.xml]: Cannot resolve reference to bean 'sqlMapClient' while setting bean property 'sqlMapClient'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlMapClient' defined in URL [jar:file:/D:/Pankaj_Workspace/IRST_TRUNK_PANKANIS_GATEWAY_NEW/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/mgw/WEB-INF/lib/mgw.core.jar!/pankanis/gateway/mgwdataApplicationContext.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse config resource: ServletContext resource [/WEB-INF/mysql/mgw-sqlmap-config.xml]; nested exception is com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause: java.lang.RuntimeException: Error parsing XPath '/sqlMapConfig/sqlMap'.  Cause: com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause: java.lang.RuntimeException: Error parsing XPath '/sqlMap/cacheModel/end()'.  Cause: java.lang.RuntimeException: Error setting Cache Controller Class.  Cause: java.lang.InstantiationException: org.mybatis.caches.ehcache.EhcacheCache
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:527)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:574)
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
	at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
	at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
	at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4791)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5285)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
	at java.util.concurrent.FutureTask.run(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'schedulerController' defined in URL [jar:file:/D:/Pankaj_Workspace/IRST_TRUNK_PANKANIS_GATEWAY_NEW/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/mgw/WEB-INF/lib/irst_rest_siebel.jar!/pankanis/gateway/IRSTWebServiceApplicationContext.xml]: Cannot resolve reference to bean 'BaseRestContext' while setting bean property 'restContext'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'BaseRestContext' defined in URL [jar:file:/D:/Pankaj_Workspace/IRST_TRUNK_PANKANIS_GATEWAY_NEW/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/mgw/WEB-INF/lib/mgw.core.jar!/pankanis/gateway/mgwdataApplicationContext.xml]: Cannot resolve reference to bean 'usrService' while setting bean property 'authService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'usrService' defined in URL [jar:file:/D:/Pankaj_Workspace/IRST_TRUNK_PANKANIS_GATEWAY_NEW/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/mgw/WEB-INF/lib/mgw.core.jar!/pankanis/gateway/mgwdataApplicationContext.xml]: Cannot resolve reference to bean 'userDao' while setting bean property '_userDao'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userDao' defined in URL [jar:file:/D:/Pankaj_Workspace/IRST_TRUNK_PANKANIS_GATEWAY_NEW/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/mgw/WEB-INF/lib/mgw.core.jar!/pankanis/gateway/mgwdataApplicationContext.xml]: Cannot resolve reference to bean 'sqlMapClient' while setting bean property 'sqlMapClient'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlMapClient' defined in URL [jar:file:/D:/Pankaj_Workspace/IRST_TRUNK_PANKANIS_GATEWAY_NEW/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/mgw/WEB-INF/lib/mgw.core.jar!/pankanis/gateway/mgwdataApplicationContext.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse config resource: ServletContext resource [/WEB-INF/mysql/mgw-sqlmap-config.xml]; nested exception is com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause: java.lang.RuntimeException: Error parsing XPath '/sqlMapConfig/sqlMap'.  Cause: com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause: java.lang.RuntimeException: Error parsing XPath '/sqlMap/cacheModel/end()'.  Cause: java.lang.RuntimeException: Error setting Cache Controller Class.  Cause: java.lang.InstantiationException: org.mybatis.caches.ehcache.EhcacheCache
	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:328)
	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:106)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1317)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1076)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
	at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1075)
	at org.springframework.web.servlet.handler.AbstractUrlHandlerMapping.registerHandler(AbstractUrlHandlerMapping.java:383)
	at org.springframework.web.servlet.handler.AbstractUrlHandlerMapping.registerHandler(AbstractUrlHandlerMapping.java:362)
	at org.springframework.web.servlet.handler.AbstractDetectingUrlHandlerMapping.detectHandlers(AbstractDetectingUrlHandlerMapping.java:82)
	at org.springframework.web.servlet.handler.AbstractDetectingUrlHandlerMapping.initApplicationContext(AbstractDetectingUrlHandlerMapping.java:58)
	at org.springframework.context.support.ApplicationObjectSupport.initApplicationContext(ApplicationObjectSupport.java:119)
	at org.springframework.web.context.support.WebApplicationObjectSupport.initApplicationContext(WebApplicationObjectSupport.java:72)
	at org.springframework.context.support.ApplicationObjectSupport.setApplicationContext(ApplicationObjectSupport.java:73)
	at org.springframework.context.support.ApplicationContextAwareProcessor.invokeAwareInterfaces(ApplicationContextAwareProcessor.java:106)
	at org.springframework.context.support.ApplicationContextAwareProcessor.postProcessBeforeInitialization(ApplicationContextAwareProcessor.java:85)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:394)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1405)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
	... 20 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'BaseRestContext' defined in URL [jar:file:/D:/Pankaj_Workspace/IRST_TRUNK_PANKANIS_GATEWAY_NEW/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/mgw/WEB-INF/lib/mgw.core.jar!/pankanis/gateway/mgwdataApplicationContext.xml]: Cannot resolve reference to bean 'usrService' while setting bean property 'authService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'usrService' defined in URL [jar:file:/D:/Pankaj_Workspace/IRST_TRUNK_PANKANIS_GATEWAY_NEW/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/mgw/WEB-INF/lib/mgw.core.jar!/pankanis/gateway/mgwdataApplicationContext.xml]: Cannot resolve reference to bean 'userDao' while setting bean property '_userDao'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userDao' defined in URL [jar:file:/D:/Pankaj_Workspace/IRST_TRUNK_PANKANIS_GATEWAY_NEW/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/mgw/WEB-INF/lib/mgw.core.jar!/pankanis/gateway/mgwdataApplicationContext.xml]: Cannot resolve reference to bean 'sqlMapClient' while setting bean property 'sqlMapClient'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlMapClient' defined in URL [jar:file:/D:/Pankaj_Workspace/IRST_TRUNK_PANKANIS_GATEWAY_NEW/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/mgw/WEB-INF/lib/mgw.core.jar!/pankanis/gateway/mgwdataApplicationContext.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse config resource: ServletContext resource [/WEB-INF/mysql/mgw-sqlmap-config.xml]; nested exception is com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause: java.lang.RuntimeException: Error parsing XPath '/sqlMapConfig/sqlMap'.  Cause: com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause: java.lang.RuntimeException: Error parsing XPath '/sqlMap/cacheModel/end()'.  Cause: java.lang.RuntimeException: Error setting Cache Controller Class.  Cause: java.lang.InstantiationException: org.mybatis.caches.ehcache.EhcacheCache
	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:328)
	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:106)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1317)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1076)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:322)
	... 42 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'usrService' defined in URL [jar:file:/D:/Pankaj_Workspace/IRST_TRUNK_PANKANIS_GATEWAY_NEW/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/mgw/WEB-INF/lib/mgw.core.jar!/pankanis/gateway/mgwdataApplicationContext.xml]: Cannot resolve reference to bean 'userDao' while setting bean property '_userDao'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userDao' defined in URL [jar:file:/D:/Pankaj_Workspace/IRST_TRUNK_PANKANIS_GATEWAY_NEW/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/mgw/WEB-INF/lib/mgw.core.jar!/pankanis/gateway/mgwdataApplicationContext.xml]: Cannot resolve reference to bean 'sqlMapClient' while setting bean property 'sqlMapClient'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlMapClient' defined in URL [jar:file:/D:/Pankaj_Workspace/IRST_TRUNK_PANKANIS_GATEWAY_NEW/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/mgw/WEB-INF/lib/mgw.core.jar!/pankanis/gateway/mgwdataApplicationContext.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse config resource: ServletContext resource [/WEB-INF/mysql/mgw-sqlmap-config.xml]; nested exception is com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause: java.lang.RuntimeException: Error parsing XPath '/sqlMapConfig/sqlMap'.  Cause: com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause: java.lang.RuntimeException: Error parsing XPath '/sqlMap/cacheModel/end()'.  Cause: java.lang.RuntimeException: Error setting Cache Controller Class.  Cause: java.lang.InstantiationException: org.mybatis.caches.ehcache.EhcacheCache
	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:328)
	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:106)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1317)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1076)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:322)
	... 52 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userDao' defined in URL [jar:file:/D:/Pankaj_Workspace/IRST_TRUNK_PANKANIS_GATEWAY_NEW/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/mgw/WEB-INF/lib/mgw.core.jar!/pankanis/gateway/mgwdataApplicationContext.xml]: Cannot resolve reference to bean 'sqlMapClient' while setting bean property 'sqlMapClient'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlMapClient' defined in URL [jar:file:/D:/Pankaj_Workspace/IRST_TRUNK_PANKANIS_GATEWAY_NEW/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/mgw/WEB-INF/lib/mgw.core.jar!/pankanis/gateway/mgwdataApplicationContext.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse config resource: ServletContext resource [/WEB-INF/mysql/mgw-sqlmap-config.xml]; nested exception is com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause: java.lang.RuntimeException: Error parsing XPath '/sqlMapConfig/sqlMap'.  Cause: com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause: java.lang.RuntimeException: Error parsing XPath '/sqlMap/cacheModel/end()'.  Cause: java.lang.RuntimeException: Error setting Cache Controller Class.  Cause: java.lang.InstantiationException: org.mybatis.caches.ehcache.EhcacheCache
	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:328)
	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:106)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1317)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1076)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:322)
	... 62 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlMapClient' defined in URL [jar:file:/D:/Pankaj_Workspace/IRST_TRUNK_PANKANIS_GATEWAY_NEW/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/mgw/WEB-INF/lib/mgw.core.jar!/pankanis/gateway/mgwdataApplicationContext.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse config resource: ServletContext resource [/WEB-INF/mysql/mgw-sqlmap-config.xml]; nested exception is com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause: java.lang.RuntimeException: Error parsing XPath '/sqlMapConfig/sqlMap'.  Cause: com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause: java.lang.RuntimeException: Error parsing XPath '/sqlMap/cacheModel/end()'.  Cause: java.lang.RuntimeException: Error setting Cache Controller Class.  Cause: java.lang.InstantiationException: org.mybatis.caches.ehcache.EhcacheCache
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1412)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:322)
	... 72 more
Caused by: org.springframework.core.NestedIOException: Failed to parse config resource: ServletContext resource [/WEB-INF/mysql/mgw-sqlmap-config.xml]; nested exception is com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause: java.lang.RuntimeException: Error parsing XPath '/sqlMapConfig/sqlMap'.  Cause: com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause: java.lang.RuntimeException: Error parsing XPath '/sqlMap/cacheModel/end()'.  Cause: java.lang.RuntimeException: Error setting Cache Controller Class.  Cause: java.lang.InstantiationException: org.mybatis.caches.ehcache.EhcacheCache
	at org.springframework.orm.ibatis.SqlMapClientFactoryBean.buildSqlMapClient(SqlMapClientFactoryBean.java:341)
	at org.springframework.orm.ibatis.SqlMapClientFactoryBean.afterPropertiesSet(SqlMapClientFactoryBean.java:291)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1469)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1409)
	... 79 more
Caused by: com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause: java.lang.RuntimeException: Error parsing XPath '/sqlMapConfig/sqlMap'.  Cause: com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause: java.lang.RuntimeException: Error parsing XPath '/sqlMap/cacheModel/end()'.  Cause: java.lang.RuntimeException: Error setting Cache Controller Class.  Cause: java.lang.InstantiationException: org.mybatis.caches.ehcache.EhcacheCache
	at com.ibatis.common.xml.NodeletParser.parse(NodeletParser.java:62)
	at com.ibatis.sqlmap.engine.builder.xml.SqlMapConfigParser.parse(SqlMapConfigParser.java:106)
	at com.ibatis.sqlmap.engine.builder.xml.SqlMapConfigParser.parse(SqlMapConfigParser.java:95)
	at org.springframework.orm.ibatis.SqlMapClientFactoryBean.buildSqlMapClient(SqlMapClientFactoryBean.java:338)
	... 82 more
Caused by: java.lang.RuntimeException: Error parsing XPath '/sqlMapConfig/sqlMap'.  Cause: com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause: java.lang.RuntimeException: Error parsing XPath '/sqlMap/cacheModel/end()'.  Cause: java.lang.RuntimeException: Error setting Cache Controller Class.  Cause: java.lang.InstantiationException: org.mybatis.caches.ehcache.EhcacheCache
	at com.ibatis.common.xml.NodeletParser.processNodelet(NodeletParser.java:123)
	at com.ibatis.common.xml.NodeletParser.process(NodeletParser.java:84)
	at com.ibatis.common.xml.NodeletParser.process(NodeletParser.java:102)
	at com.ibatis.common.xml.NodeletParser.parse(NodeletParser.java:72)
	at com.ibatis.common.xml.NodeletParser.parse(NodeletParser.java:60)
	... 85 more
Caused by: com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause: java.lang.RuntimeException: Error parsing XPath '/sqlMap/cacheModel/end()'.  Cause: java.lang.RuntimeException: Error setting Cache Controller Class.  Cause: java.lang.InstantiationException: org.mybatis.caches.ehcache.EhcacheCache
	at com.ibatis.common.xml.NodeletParser.parse(NodeletParser.java:62)
	at com.ibatis.sqlmap.engine.builder.xml.SqlMapParser.parse(SqlMapParser.java:55)
	at com.ibatis.sqlmap.engine.builder.xml.SqlMapConfigParser$11.process(SqlMapConfigParser.java:394)
	at com.ibatis.common.xml.NodeletParser.processNodelet(NodeletParser.java:121)
	... 89 more
Caused by: java.lang.RuntimeException: Error parsing XPath '/sqlMap/cacheModel/end()'.  Cause: java.lang.RuntimeException: Error setting Cache Controller Class.  Cause: java.lang.InstantiationException: org.mybatis.caches.ehcache.EhcacheCache
	at com.ibatis.common.xml.NodeletParser.processNodelet(NodeletParser.java:123)
	at com.ibatis.common.xml.NodeletParser.process(NodeletParser.java:105)
	at com.ibatis.common.xml.NodeletParser.process(NodeletParser.java:102)
	at com.ibatis.common.xml.NodeletParser.parse(NodeletParser.java:72)
	at com.ibatis.common.xml.NodeletParser.parse(NodeletParser.java:60)
	... 92 more
Caused by: java.lang.RuntimeException: Error setting Cache Controller Class.  Cause: java.lang.InstantiationException: org.mybatis.caches.ehcache.EhcacheCache
	at com.ibatis.sqlmap.engine.builder.xml.SqlMapParser$6.process(SqlMapParser.java:149)
	at com.ibatis.common.xml.NodeletParser.processNodelet(NodeletParser.java:121)
	... 96 more
Caused by: java.lang.InstantiationException: org.mybatis.caches.ehcache.EhcacheCache
	at java.lang.Class.newInstance(Unknown Source)
	at com.ibatis.common.resources.Resources.instantiate(Resources.java:294)
	at com.ibatis.sqlmap.engine.cache.CacheModel.setControllerClassName(CacheModel.java:156)
	at com.ibatis.sqlmap.engine.builder.xml.SqlMapParser$6.process(SqlMapParser.java:147)
	... 97 more

Write tip

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

Users with the same issue

Samebug visitor profile picture
Unknown user
Once, 1 year ago
178 times, 4 months ago
2 times, 5 months ago
8 times, 7 months ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
39 more bugmates