I've uplifted the spring version to 5.2.1 and spring-boot to 2.2.1 in my pom, application fails to start with an error :
An attempt was made to call a method that does not exist. The attempt was made from the following location:
org.springframework.boot.autoconfigure.web.servlet.DispatcherServletAutoConfiguration$DispatcherServletConfiguration.dispatcherServlet(DispatcherServletAutoConfiguration.java:96)
The following method did not exist:
org.springframework.web.servlet.DispatcherServlet.setEnableLoggingRequestDetails(Z)V
The method's class, org.springframework.web.servlet.DispatcherServlet, is available from the following locations:
jar:file:/C:/Users/608216186/.m2/repository/org/springframework/spring-webmvc/4.3.9.RELEASE/spring-webmvc-4.3.9.RELEASE.jar!/org/springframework/web/servlet/DispatcherServlet.class
It was loaded from the following location:
file:/C:/Users/608216186/.m2/repository/org/springframework/spring-webmvc/4.3.9.RELEASE/spring-webmvc-4.3.9.RELEASE.jar
Action:
Correct the classpath of your application so that it contains a single, compatible version of org.springframework.web.servlet.DispatcherServlet
","logger":"org.springframework.boot.diagnostics.LoggingFailureAnalysisReporter","level":"ERROR"}
{"timestamp":"2019-12-03 17:35:45.412 UTC","text":"Caught exception while allowing TestExecutionListener [org.springframework.boot.test.mock.mockito.MockitoTestExecutionListener#4e858e0a] to prepare test instance [com.bt.vosp.voddiscovery.api.discoveryfeed.DiscoveryFeedRecommendationsCursorBasedPaginationIT#3359c3f6]","logger":"org.springframework.test.context.TestContextManager","level":"ERROR","throwable":"java.lang.IllegalStateException: Failed to load ApplicationContext, at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:132), at org.springframework.test.context.support.DefaultTestContext.getApplicationContext(DefaultTestContext.java:123), at org.springframework.boot.test.mock.mockito.MockitoTestExecutionListener.postProcessFields(MockitoTestExecutionListener.java:95), at org.springframework.boot.test.mock.mockito.MockitoTestExecutionListener.injectFields(MockitoTestExecutionListener.java:79), at org.springframework.boot.test.mock.mockito.MockitoTestExecutionListener.prepareTestInstance(MockitoTestExecutionListener.java:54), at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:244), at org.springframework.test.context.junit4.statements.RunPrepareTestInstanceCallbacks.evaluate(RunPrepareTestInstanceCallbacks.java:63), at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:84), at org.springframework.test.context.junit4.statements.SpringFailOnTimeout.evaluate(SpringFailOnTimeout.java:87), at org.springframework.test.context.junit4.statements.ProfileValueChecker.evaluate(ProfileValueChecker.java:103), at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325), at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78), at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57), at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290), at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71), at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288), at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58), at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268), at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26), at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61), at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70), at org.springframework.test.context.junit4.statements.ProfileValueChecker.evaluate(ProfileValueChecker.java:103), at org.springframework.test.context.junit4.rules.SpringClassRule$TestContextManagerCacheEvictor.evaluate(SpringClassRule.java:190), at org.junit.rules.RunRules.evaluate(RunRules.java:20), at org.junit.runners.ParentRunner.run(ParentRunner.java:363), at org.junit.runner.JUnitCore.run(JUnitCore.java:137), at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68), at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47), at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242), at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70), Caused by: org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'JettyServletWebServerFactory' defined in class path resource [org/springframework/boot/autoconfigure/web/servlet/ServletWebServerFactoryConfiguration$EmbeddedJetty.class]: Initialization of bean failed; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'errorPageCustomizer' defined in class path resource [org/springframework/boot/autoconfigure/web/servlet/error/ErrorMvcAutoConfiguration.class]: Unsatisfied dependency expressed through method 'errorPageCustomizer' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'dispatcherServletRegistration' defined in class path resource [org/springframework/boot/autoconfigure/web/servlet/DispatcherServletAutoConfiguration$DispatcherServletRegistrationConfiguration.class]: Unsatisfied dependency expressed through method 'dispatcherServletRegistration' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dispatcherServlet' defined in class path resource [org/springframework/boot/autoconfigure/web/servlet/DispatcherServletAutoConfiguration$DispatcherServletConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.web.servlet.DispatcherServlet]: Factory method 'dispatcherServlet' threw exception; nested exception is java.lang.NoSuchMethodError: org.springframework.web.servlet.DispatcherServlet.setEnableLoggingRequestDetails(Z)V, at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:156), at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:544), at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141), at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747), at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397), at org.springframework.boot.SpringApplication.run(SpringApplication.java:315), at org.springframework.boot.test.context.SpringBootContextLoader.loadContext(SpringBootContextLoader.java:125), at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContextInternal(DefaultCacheAwareContextLoaderDelegate.java:99), at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:124), ... 29 more, Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'JettyServletWebServerFactory' defined in class path resource [org/springframework/boot/autoconfigure/web/servlet/ServletWebServerFactoryConfiguration$EmbeddedJetty.class]: Initialization of bean failed; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'errorPageCustomizer' defined in class path resource [org/springframework/boot/autoconfigure/web/servlet/error/ErrorMvcAutoConfiguration.class]: Unsatisfied dependency expressed through method 'errorPageCustomizer' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'dispatcherServletRegistration' defined in class path resource [org/springframework/boot/autoconfigure/web/servlet/DispatcherServletAutoConfiguration$DispatcherServletRegistrationConfiguration.class]: Unsatisfied dependency expressed through method 'dispatcherServletRegistration' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dispatcherServlet' defined in class path resource [org/springframework/boot/autoconfigure/web/servlet/DispatcherServletAutoConfiguration$DispatcherServletConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.web.servlet.DispatcherServlet]: Factory method 'dispatcherServlet' threw exception; nested exception is java.lang.NoSuchMethodError: org.springframework.web.servlet.DispatcherServlet.setEnableLoggingRequestDetails(Z)V, at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:603), at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517), at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323), at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222), at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321), at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:207), at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.getWebServerFactory(ServletWebServerApplicationContext.java:210), at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.createWebServer(ServletWebServerApplicationContext.java:179), at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:153), ... 37 more, Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'errorPageCustomizer' defined in class path resource [org/springframework/boot/autoconfigure/web/servlet/error/ErrorMvcAutoConfiguration.class]: Unsatisfied dependency expressed through method 'errorPageCustomizer' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'dispatcherServletRegistration' defined in class path resource [org/springframework/boot/autoconfigure/web/servlet/DispatcherServletAutoConfiguration$DispatcherServletRegistrationConfiguration.class]: Unsatisfied dependency expressed through method 'dispatcherServletRegistration' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dispatcherServlet' defined in class path resource [org/springframework/boot/autoconfigure/web/servlet/DispatcherServletAutoConfiguration$DispatcherServletConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.web.servlet.DispatcherServlet]: Factory method 'dispatcherServlet' threw exception; nested exception is java.lang.NoSuchMethodError: org.springframework.web.servlet.DispatcherServlet.setEnableLoggingRequestDetails(Z)V, at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:787), at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:528), at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1338), at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1177), at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:557), at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517), at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323), at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222), at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321), at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202), at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:617), at org.springframework.boot.web.server.ErrorPageRegistrarBeanPostProcessor.getRegistrars(ErrorPageRegistrarBeanPostProcessor.java:76), at org.springframework.boot.web.server.ErrorPageRegistrarBeanPostProcessor.postProcessBeforeInitialization(ErrorPageRegistrarBeanPostProcessor.java:67), at org.springframework.boot.web.server.ErrorPageRegistrarBeanPostProcessor.postProcessBeforeInitialization(ErrorPageRegistrarBeanPostProcessor.java:56), at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:416), at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1795), at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:595), ... 45 more, Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'dispatcherServletRegistration' defined in class path resource [org/springframework/boot/autoconfigure/web/servlet/DispatcherServletAutoConfiguration$DispatcherServletRegistrationConfiguration.class]: Unsatisfied dependency expressed through method 'dispatcherServletRegistration' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dispatcherServlet' defined in class path resource [org/springframework/boot/autoconfigure/web/servlet/DispatcherServletAutoConfiguration$DispatcherServletConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.web.servlet.DispatcherServlet]: Factory method 'dispatcherServlet' threw exception; nested exception is java.lang.NoSuchMethodError: org.springframework.web.servlet.DispatcherServlet.setEnableLoggingRequestDetails(Z)V, at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:787), at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:528), at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1338), at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1177), at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:557), at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517), at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323), at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222), at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321), at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202), at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276), at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1287), at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1207), at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:874), at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:778), ... 61 more, Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dispatcherServlet' defined in class path resource [org/springframework/boot/autoconfigure/web/servlet/DispatcherServletAutoConfiguration$DispatcherServletConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.web.servlet.DispatcherServlet]: Factory method 'dispatcherServlet' threw exception; nested exception is java.lang.NoSuchMethodError: org.springframework.web.servlet.DispatcherServlet.setEnableLoggingRequestDetails(Z)V, at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:645), at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:625), at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1338), at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1177), at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:557), at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517), at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323), at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222), at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321), at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202), at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276), at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1287), at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1207), at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:874), at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:778), ... 75 more, Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.web.servlet.DispatcherServlet]: Factory method 'dispatcherServlet' threw exception; nested exception is java.lang.NoSuchMethodError: org.springframework.web.servlet.DispatcherServlet.setEnableLoggingRequestDetails(Z)V, at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185), at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:640), ... 89 more, Caused by: java.lang.NoSuchMethodError: org.springframework.web.servlet.DispatcherServlet.setEnableLoggingRequestDetails(Z)V, at org.springframework.boot.autoconfigure.web.servlet.DispatcherServletAutoConfiguration$DispatcherServletConfiguration.dispatcherServlet(DispatcherServletAutoConfiguration.java:96), 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.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154), ... 90 more, "}
java.lang.IllegalStateException: Failed to load ApplicationContext.
I'm new to Spring.
I created new maven project using eclipse IDE. I did nothing after creating the project, just try to run the project using run.bat command as said in the tutorial. (https://ecmarchitect.com/alfresco-developer-series-tutorials/maven-sdk/tutorial/tutorial.html) But now i am getting errors like 'Error creating bean with name 'actionService' defined in class path resource [alfresco/action-services-context.xml]'. I don't how to solve this. Please help me.
My error log is given below.
2019-05-05 00:08:54,285 WARN [context.support.XmlWebApplicationContext] [localhost-startStop-1] Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'authorityBridgeTableCache' defined in class path resource [alfresco/cache-context.xml]: Cannot resolve reference to bean 'tenantAdminService' while setting bean property 'tenantAdminService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'tenantAdminService' defined in URL [jar:file:/D:/$PUCSL_SNAIL/workflow-tutorial-test/target/tomcat/webapps/workflow-tutorial-test-platform/WEB-INF/lib/alfresco-repository-5.2.f.jar!/alfresco/mt/mt-admin-context.xml]: Cannot resolve reference to bean 'dbNodeServiceImpl' while setting bean property 'nodeService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dbNodeService' defined in class path resource [alfresco/node-services-context.xml]: Cannot resolve reference to bean 'permissionServiceImpl' while setting bean property 'permissionService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'permissionServiceImpl' defined in class path resource [alfresco/public-services-security-context.xml]: Cannot resolve reference to bean 'authorityService' while setting bean property 'authorityService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'authorityService' defined in class path resource [alfresco/authority-services-context.xml]: Cannot resolve reference to bean 'personService' while setting bean property 'personService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'personService' defined in class path resource [alfresco/authentication-services-context.xml]: Cannot resolve reference to bean 'personServicePermissionsManager' while setting bean property 'permissionsManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'personServicePermissionsManager' defined in class path resource [alfresco/authentication-services-context.xml]: Cannot resolve reference to bean 'ownableService' while setting bean property 'ownableService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ownableService' defined in class path resource [alfresco/ownable-services-context.xml]: Cannot resolve reference to bean 'renditionService' while setting bean property 'renditionService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'renditionService' defined in class path resource [alfresco/rendition-services-context.xml]: Cannot resolve reference to bean 'ActionService' while setting bean property 'actionService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ActionService' defined in class path resource [alfresco/public-services-context.xml]: Cannot resolve reference to bean 'actionService' while setting bean property 'target'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'actionService' defined in class path resource [alfresco/action-services-context.xml]: Cannot resolve reference to bean 'NodeService' while setting bean property 'nodeService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'NodeService': FactoryBean threw exception on object creation; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'AuditMethodInterceptor' defined in class path resource [alfresco/public-services-context.xml]: Cannot resolve reference to bean 'auditComponent' while setting bean property 'auditComponent'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'auditComponent' defined in class path resource [alfresco/audit-services-context.xml]: Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: javax/xml/bind/ValidationEventHandler
2019-05-05 00:08:54,323 ERROR [web.context.ContextLoader] [localhost-startStop-1] Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'authorityBridgeTableCache' defined in class path resource [alfresco/cache-context.xml]: Cannot resolve reference to bean 'tenantAdminService' while setting bean property 'tenantAdminService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'tenantAdminService' defined in URL [jar:file:/D:/$PUCSL_SNAIL/workflow-tutorial-test/target/tomcat/webapps/workflow-tutorial-test-platform/WEB-INF/lib/alfresco-repository-5.2.f.jar!/alfresco/mt/mt-admin-context.xml]: Cannot resolve reference to bean 'dbNodeServiceImpl' while setting bean property 'nodeService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dbNodeService' defined in class path resource [alfresco/node-services-context.xml]: Cannot resolve reference to bean 'permissionServiceImpl' while setting bean property 'permissionService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'permissionServiceImpl' defined in class path resource [alfresco/public-services-security-context.xml]: Cannot resolve reference to bean 'authorityService' while setting bean property 'authorityService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'authorityService' defined in class path resource [alfresco/authority-services-context.xml]: Cannot resolve reference to bean 'personService' while setting bean property 'personService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'personService' defined in class path resource [alfresco/authentication-services-context.xml]: Cannot resolve reference to bean 'personServicePermissionsManager' while setting bean property 'permissionsManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'personServicePermissionsManager' defined in class path resource [alfresco/authentication-services-context.xml]: Cannot resolve reference to bean 'ownableService' while setting bean property 'ownableService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ownableService' defined in class path resource [alfresco/ownable-services-context.xml]: Cannot resolve reference to bean 'renditionService' while setting bean property 'renditionService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'renditionService' defined in class path resource [alfresco/rendition-services-context.xml]: Cannot resolve reference to bean 'ActionService' while setting bean property 'actionService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ActionService' defined in class path resource [alfresco/public-services-context.xml]: Cannot resolve reference to bean 'actionService' while setting bean property 'target'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'actionService' defined in class path resource [alfresco/action-services-context.xml]: Cannot resolve reference to bean 'NodeService' while setting bean property 'nodeService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'NodeService': FactoryBean threw exception on object creation; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'AuditMethodInterceptor' defined in class path resource [alfresco/public-services-context.xml]: Cannot resolve reference to bean 'auditComponent' while setting bean property 'auditComponent'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'auditComponent' defined in class path resource [alfresco/audit-services-context.xml]: Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: javax/xml/bind/ValidationEventHandler
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:334)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:108)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1419)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1160)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:191)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:636)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:938)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:410)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)
at org.alfresco.web.app.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:70)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4939)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5434)
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.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1135)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:844)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'tenantAdminService' defined in URL [jar:file:/D:/$PUCSL_SNAIL/workflow-tutorial-test/target/tomcat/webapps/workflow-tutorial-test-platform/WEB-INF/lib/alfresco-repository-5.2.f.jar!/alfresco/mt/mt-admin-context.xml]: Cannot resolve reference to bean 'dbNodeServiceImpl' while setting bean property 'nodeService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dbNodeService' defined in class path resource [alfresco/node-services-context.xml]: Cannot resolve reference to bean 'permissionServiceImpl' while setting bean property 'permissionService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'permissionServiceImpl' defined in class path resource [alfresco/public-services-security-context.xml]: Cannot resolve reference to bean 'authorityService' while setting bean property 'authorityService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'authorityService' defined in class path resource [alfresco/authority-services-context.xml]: Cannot resolve reference to bean 'personService' while setting bean property 'personService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'personService' defined in class path resource [alfresco/authentication-services-context.xml]: Cannot resolve reference to bean 'personServicePermissionsManager' while setting bean property 'permissionsManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'personServicePermissionsManager' defined in class path resource [alfresco/authentication-services-context.xml]: Cannot resolve reference to bean 'ownableService' while setting bean property 'ownableService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ownableService' defined in class path resource [alfresco/ownable-services-context.xml]: Cannot resolve reference to bean 'renditionService' while setting bean property 'renditionService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'renditionService' defined in class path resource [alfresco/rendition-services-context.xml]: Cannot resolve reference to bean 'ActionService' while setting bean property 'actionService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ActionService' defined in class path resource [alfresco/public-services-context.xml]: Cannot resolve reference to bean 'actionService' while setting bean property 'target'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'actionService' defined in class path resource [alfresco/action-services-context.xml]: Cannot resolve reference to bean 'NodeService' while setting bean property 'nodeService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'NodeService': FactoryBean threw exception on object creation; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'AuditMethodInterceptor' defined in class path resource [alfresco/public-services-context.xml]: Cannot resolve reference to bean 'auditComponent' while setting bean property 'auditComponent'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'auditComponent' defined in class path resource [alfresco/audit-services-context.xml]: Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: javax/xml/bind/ValidationEventHandler
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:334)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:108)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1419)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1160)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:191)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:328)
... 25 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dbNodeService' defined in class path resource [alfresco/node-services-context.xml]: Cannot resolve reference to bean 'permissionServiceImpl' while setting bean property 'permissionService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'permissionServiceImpl' defined in class path resource [alfresco/public-services-security-context.xml]: Cannot resolve reference to bean 'authorityService' while setting bean property 'authorityService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'authorityService' defined in class path resource [alfresco/authority-services-context.xml]: Cannot resolve reference to bean 'personService' while setting bean property 'personService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'personService' defined in class path resource [alfresco/authentication-services-context.xml]: Cannot resolve reference to bean 'personServicePermissionsManager' while setting bean property 'permissionsManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'personServicePermissionsManager' defined in class path resource [alfresco/authentication-services-context.xml]: Cannot resolve reference to bean 'ownableService' while setting bean property 'ownableService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ownableService' defined in class path resource [alfresco/ownable-services-context.xml]: Cannot resolve reference to bean 'renditionService' while setting bean property 'renditionService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'renditionService' defined in class path resource [alfresco/rendition-services-context.xml]: Cannot resolve reference to bean 'ActionService' while setting bean property 'actionService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ActionService' defined in class path resource [alfresco/public-services-context.xml]: Cannot resolve reference to bean 'actionService' while setting bean property 'target'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'actionService' defined in class path resource [alfresco/action-services-context.xml]: Cannot resolve reference to bean 'NodeService' while setting bean property 'nodeService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'NodeService': FactoryBean threw exception on object creation; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'AuditMethodInterceptor' defined in class path resource [alfresco/public-services-context.xml]: Cannot resolve reference to bean 'auditComponent' while setting bean property 'auditComponent'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'auditComponent' defined in class path resource [alfresco/audit-services-context.xml]: Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: javax/xml/bind/ValidationEventHandler
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:334)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:108)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1419)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1160)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:191)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:328)
... 35 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'permissionServiceImpl' defined in class path resource [alfresco/public-services-security-context.xml]: Cannot resolve reference to bean 'authorityService' while setting bean property 'authorityService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'authorityService' defined in class path resource [alfresco/authority-services-context.xml]: Cannot resolve reference to bean 'personService' while setting bean property 'personService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'personService' defined in class path resource [alfresco/authentication-services-context.xml]: Cannot resolve reference to bean 'personServicePermissionsManager' while setting bean property 'permissionsManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'personServicePermissionsManager' defined in class path resource [alfresco/authentication-services-context.xml]: Cannot resolve reference to bean 'ownableService' while setting bean property 'ownableService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ownableService' defined in class path resource [alfresco/ownable-services-context.xml]: Cannot resolve reference to bean 'renditionService' while setting bean property 'renditionService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'renditionService' defined in class path resource [alfresco/rendition-services-context.xml]: Cannot resolve reference to bean 'ActionService' while setting bean property 'actionService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ActionService' defined in class path resource [alfresco/public-services-context.xml]: Cannot resolve reference to bean 'actionService' while setting bean property 'target'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'actionService' defined in class path resource [alfresco/action-services-context.xml]: Cannot resolve reference to bean 'NodeService' while setting bean property 'nodeService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'NodeService': FactoryBean threw exception on object creation; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'AuditMethodInterceptor' defined in class path resource [alfresco/public-services-context.xml]: Cannot resolve reference to bean 'auditComponent' while setting bean property 'auditComponent'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'auditComponent' defined in class path resource [alfresco/audit-services-context.xml]: Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: javax/xml/bind/ValidationEventHandler
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:334)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:108)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1419)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1160)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:191)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:328)
... 45 more
add jaxb-api dependency in your pom.xml file
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.3.0</version>
</dependency>
If you still face the same error even after adding the above dependency then try this StackOverflowQuestion answers
The proble is that, every time I run the project the error from org.springframework.beans.factory.UnsatisfiedDependencyException pop-up.
I've already tried several related questions in stack with answers but the problem isn't resolved yet.
FieldDataService.java
#Component
public interface FieldDataService {
public FieldData getFieldData() throws SQLException, Exception;
}
FieldDataServiceImpl.java
#Component
public class FieldDataServiceImpl implements FieldDataService {
#Autowired
FieldDataDao fieldDataDao;
#Override
public FieldData getFieldData() throws SQLException, Exception {
return this.fieldDataDao.getFieldData();
}
}
FieldDataDao.java
#Component
public interface FieldDataDao {
public FieldData getFieldData() throws SQLException, Exception;
}
FieldDataDaoImpl.java
#Component
public class FieldDataDaoImpl implements FieldDataDao{
#Autowired
private SqlSession sqlSession;
#Override
public FieldData getFieldData() throws SQLException, Exception {
FieldData result = new FieldData();
try {
result = this.sqlSession.selectOne("getFieldData");
} catch (Exception e) {
e.printStackTrace();
}
return result;
}
}
FieldData.java
#Component
public class FieldData {
private String transactionType;
private String distribution;
private Date startDate;
private Date endDate;
private String reportType;
public String getTransactionType() {
return transactionType;
}
public void setTransactionType(String transactionType) {
this.transactionType = transactionType;
}
public String getDistribution() {
return distribution;
}
public void setDistribution(String distribution) {
this.distribution = distribution;
}
public Date getStartDate() {
return startDate;
}
public void setStartDate(Date startDate) {
this.startDate = startDate;
}
public Date getEndDate() {
return endDate;
}
public void setEndDate(Date endDate) {
this.endDate = endDate;
}
public String getReportType() {
return reportType;
}
public void setReportType(String reportType) {
this.reportType = reportType;
}
#Override
public String toString() {
return "FieldData [transactionType=" + transactionType + ", distribution=" + distribution + ", startDate="
+ startDate + ", endDate=" + endDate + ", reportType=" + reportType + "]";
}
}
FieldData.xml
<mapper namespace="com.pnb.allianz.jdt.maper.FieldData">
<resultMap id="FieldDataResultMap" type="FielData">
<result column="LF2S_TRAN_TYPE" property="transactionType"/>
<result column="LF2S_DISTRIBUTION" property="distribution"/>
<result column="LF2S_REPORT_TYPE" property="reportType"/>
</resultMap>
<select id="getFieldData" resultMap="FieldDataResultMap">
SELECT * FROM LF2S_MR_PARAMETERS
WHERE rownum =1
</select>
</mapper>
..and the error goes like this
Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'generateJdtController': Unsatisfied dependency expressed through field 'fieldDataService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'fieldDataServiceImpl': Unsatisfied dependency expressed through field 'fieldDataDao'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'fieldDataDaoImpl': Unsatisfied dependency expressed through field 'sqlSession'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'sqlSessionTemplate' defined in class path resource [org/mybatis/spring/boot/autoconfigure/MybatisAutoConfiguration.class]: Unsatisfied dependency expressed through method 'sqlSessionTemplate' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [org/mybatis/spring/boot/autoconfigure/MybatisAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.ibatis.session.SqlSessionFactory]: Factory method 'sqlSessionFactory' threw exception; nested exception is java.lang.NullPointerException
Related cause: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'fieldDataService' defined in file [C:\Users\markanthony.ragay\Desktop\julia-document-tracking\julia-document-tracking\target\classes\com\pnb\allianz\jdt\service\FieldDataService.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [org/mybatis/spring/boot/autoconfigure/MybatisAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.ibatis.session.SqlSessionFactory]: Factory method 'sqlSessionFactory' threw exception; nested exception is java.lang.NullPointerException
Related cause: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'fieldDataService' defined in file [C:\Users\markanthony.ragay\Desktop\julia-document-tracking\julia-document-tracking\target\classes\com\pnb\allianz\jdt\service\FieldDataService.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'sqlSessionFactory': Requested bean is currently in creation: Is there an unresolvable circular reference?
Related cause: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'fieldDataDao' defined in file [C:\Users\markanthony.ragay\Desktop\julia-document-tracking\julia-document-tracking\target\classes\com\pnb\allianz\jdt\dao\FieldDataDao.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [org/mybatis/spring/boot/autoconfigure/MybatisAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.ibatis.session.SqlSessionFactory]: Factory method 'sqlSessionFactory' threw exception; nested exception is java.lang.NullPointerException
Related cause: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'fieldDataDao' defined in file [C:\Users\markanthony.ragay\Desktop\julia-document-tracking\julia-document-tracking\target\classes\com\pnb\allianz\jdt\dao\FieldDataDao.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [org/mybatis/spring/boot/autoconfigure/MybatisAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.ibatis.session.SqlSessionFactory]: Factory method 'sqlSessionFactory' threw exception; nested exception is java.lang.NullPointerException
Related cause: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'fieldDataDao' defined in file [C:\Users\markanthony.ragay\Desktop\julia-document-tracking\julia-document-tracking\target\classes\com\pnb\allianz\jdt\dao\FieldDataDao.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'sqlSessionFactory': Requested bean is currently in creation: Is there an unresolvable circular reference?
Related cause: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'fieldDataService' defined in file [C:\Users\markanthony.ragay\Desktop\julia-document-tracking\julia-document-tracking\target\classes\com\pnb\allianz\jdt\service\FieldDataService.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [org/mybatis/spring/boot/autoconfigure/MybatisAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.ibatis.session.SqlSessionFactory]: Factory method 'sqlSessionFactory' threw exception; nested exception is java.lang.NullPointerException
Related cause: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'fieldDataService' defined in file [C:\Users\markanthony.ragay\Desktop\julia-document-tracking\julia-document-tracking\target\classes\com\pnb\allianz\jdt\service\FieldDataService.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [org/mybatis/spring/boot/autoconfigure/MybatisAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.ibatis.session.SqlSessionFactory]: Factory method 'sqlSessionFactory' threw exception; nested exception is java.lang.NullPointerException
Related cause: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'fieldDataService' defined in file [C:\Users\markanthony.ragay\Desktop\julia-document-tracking\julia-document-tracking\target\classes\com\pnb\allianz\jdt\service\FieldDataService.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'sqlSessionFactory': Requested bean is currently in creation: Is there an unresolvable circular reference?
Related cause: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'fieldDataDao' defined in file [C:\Users\markanthony.ragay\Desktop\julia-document-tracking\julia-document-tracking\target\classes\com\pnb\allianz\jdt\dao\FieldDataDao.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [org/mybatis/spring/boot/autoconfigure/MybatisAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.ibatis.session.SqlSessionFactory]: Factory method 'sqlSessionFactory' threw exception; nested exception is java.lang.NullPointerException
Related cause: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'fieldDataDao' defined in file [C:\Users\markanthony.ragay\Desktop\julia-document-tracking\julia-document-tracking\target\classes\com\pnb\allianz\jdt\dao\FieldDataDao.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [org/mybatis/spring/boot/autoconfigure/MybatisAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.ibatis.session.SqlSessionFactory]: Factory method 'sqlSessionFactory' threw exception; nested exception is java.lang.NullPointerException
Related cause: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'fieldDataDao' defined in file [C:\Users\markanthony.ragay\Desktop\julia-document-tracking\julia-document-tracking\target\classes\com\pnb\allianz\jdt\dao\FieldDataDao.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'sqlSessionFactory': Requested bean is currently in creation: Is there an unresolvable circular reference?
Related cause: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'fieldDataService' defined in file [C:\Users\markanthony.ragay\Desktop\julia-document-tracking\julia-document-tracking\target\classes\com\pnb\allianz\jdt\service\FieldDataService.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [org/mybatis/spring/boot/autoconfigure/MybatisAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.ibatis.session.SqlSessionFactory]: Factory method 'sqlSessionFactory' threw exception; nested exception is java.lang.NullPointerException
Related cause: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'fieldDataService' defined in file [C:\Users\markanthony.ragay\Desktop\julia-document-tracking\julia-document-tracking\target\classes\com\pnb\allianz\jdt\service\FieldDataService.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [org/mybatis/spring/boot/autoconfigure/MybatisAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.ibatis.session.SqlSessionFactory]: Factory method 'sqlSessionFactory' threw exception; nested exception is java.lang.NullPointerException
Related cause: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'fieldDataService' defined in file [C:\Users\markanthony.ragay\Desktop\julia-document-tracking\julia-document-tracking\target\classes\com\pnb\allianz\jdt\service\FieldDataService.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'sqlSessionFactory': Requested bean is currently in creation: Is there an unresolvable circular reference?
Related cause: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'fieldDataDao' defined in file [C:\Users\markanthony.ragay\Desktop\julia-document-tracking\julia-document-tracking\target\classes\com\pnb\allianz\jdt\dao\FieldDataDao.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [org/mybatis/spring/boot/autoconfigure/MybatisAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.ibatis.session.SqlSessionFactory]: Factory method 'sqlSessionFactory' threw exception; nested exception is java.lang.NullPointerException
Related cause: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'fieldDataDao' defined in file [C:\Users\markanthony.ragay\Desktop\julia-document-tracking\julia-document-tracking\target\classes\com\pnb\allianz\jdt\dao\FieldDataDao.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [org/mybatis/spring/boot/autoconfigure/MybatisAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.ibatis.session.SqlSessionFactory]: Factory method 'sqlSessionFactory' threw exception; nested exception is java.lang.NullPointerException
Related cause: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'fieldDataDao' defined in file [C:\Users\markanthony.ragay\Desktop\julia-document-tracking\julia-document-tracking\target\classes\com\pnb\allianz\jdt\dao\FieldDataDao.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'sqlSessionFactory': Requested bean is currently in creation: Is there an unresolvable circular reference?
Related cause: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'fieldDataService' defined in file [C:\Users\markanthony.ragay\Desktop\julia-document-tracking\julia-document-tracking\target\classes\com\pnb\allianz\jdt\service\FieldDataService.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [org/mybatis/spring/boot/autoconfigure/MybatisAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.ibatis.session.SqlSessionFactory]: Factory method 'sqlSessionFactory' threw exception; nested exception is java.lang.NullPointerException
Related cause: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'fieldDataService' defined in file [C:\Users\markanthony.ragay\Desktop\julia-document-tracking\julia-document-tracking\target\classes\com\pnb\allianz\jdt\service\FieldDataService.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [org/mybatis/spring/boot/autoconfigure/MybatisAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.ibatis.session.SqlSessionFactory]: Factory method 'sqlSessionFactory' threw exception; nested exception is java.lang.NullPointerException
Related cause: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'fieldDataService' defined in file [C:\Users\markanthony.ragay\Desktop\julia-document-tracking\julia-document-tracking\target\classes\com\pnb\allianz\jdt\service\FieldDataService.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'sqlSessionFactory': Requested bean is currently in creation: Is there an unresolvable circular reference?
Related cause: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'fieldDataDao' defined in file [C:\Users\markanthony.ragay\Desktop\julia-document-tracking\julia-document-tracking\target\classes\com\pnb\allianz\jdt\dao\FieldDataDao.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [org/mybatis/spring/boot/autoconfigure/MybatisAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.ibatis.session.SqlSessionFactory]: Factory method 'sqlSessionFactory' threw exception; nested exception is java.lang.NullPointerException
Related cause: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'fieldDataDao' defined in file [C:\Users\markanthony.ragay\Desktop\julia-document-tracking\julia-document-tracking\target\classes\com\pnb\allianz\jdt\dao\FieldDataDao.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [org/mybatis/spring/boot/autoconfigure/MybatisAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.ibatis.session.SqlSessionFactory]: Factory method 'sqlSessionFactory' threw exception; nested exception is java.lang.NullPointerException
Related cause: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'fieldDataDao' defined in file [C:\Users\markanthony.ragay\Desktop\julia-document-tracking\julia-document-tracking\target\classes\com\pnb\allianz\jdt\dao\FieldDataDao.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'sqlSessionFactory': Requested bean is currently in creation: Is there an unresolvable circular reference?
Related cause: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'fieldDataService' defined in file [C:\Users\markanthony.ragay\Desktop\julia-document-tracking\julia-document-tracking\target\classes\com\pnb\allianz\jdt\service\FieldDataService.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [org/mybatis/spring/boot/autoconfigure/MybatisAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.ibatis.session.SqlSessionFactory]: Factory method 'sqlSessionFactory' threw exception; nested exception is java.lang.NullPointerException
Related cause: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'fieldDataDao' defined in file [C:\Users\markanthony.ragay\Desktop\julia-document-tracking\julia-document-tracking\target\classes\com\pnb\allianz\jdt\dao\FieldDataDao.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'sqlSessionFactory': Requested bean is currently in creation: Is there an unresolvable circular reference?
Related cause: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'fieldDataDao' defined in file [C:\Users\markanthony.ragay\Desktop\julia-document-tracking\julia-document-tracking\target\classes\com\pnb\allianz\jdt\dao\FieldDataDao.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'sqlSessionFactory': Requested bean is currently in creation: Is there an unresolvable circular reference?
Related cause: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'fieldDataService' defined in file [C:\Users\markanthony.ragay\Desktop\julia-document-tracking\julia-document-tracking\target\classes\com\pnb\allianz\jdt\service\FieldDataService.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'sqlSessionFactory': Requested bean is currently in creation: Is there an unresolvable circular reference?
2019-04-08 14:30:32.380 INFO 2284 --- [ restartedMain] o.apache.catalina.core.StandardService : Stopping service [Tomcat]
2019-04-08 14:30:32.410 INFO 2284 --- [ restartedMain] ConditionEvaluationReportLoggingListener :
Thanks in advance guys. Hope you can help me.
You need to check your sqlSessionFactory. this exception is NullPointerException.
Your error message
Unsatisfied dependency expressed through method 'sqlSessionTemplate'
parameter 0; nested exception is
org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'sqlSessionFactory' defined in class path
resource [
org/mybatis/spring/boot/autoconfigure/MybatisAutoConfiguration.class]:
Bean instantiation via factory method failed; nested exception is
org.springframework.beans.BeanInstantiationException: Failed to
instantiate [org.apache.ibatis.session.SqlSessionFactory]: Factory
method 'sqlSessionFactory' threw exception; nested exception is
java.lang.NullPointerException
I have a java application in which one of the classes has ContextRefresher autowired:
public abstract class AbstractConfigurationPersister implements IConfigurationPersister {
#Autowired
private ContextRefresher contextRefresher;
#Override
public void forceRefresh() {
contextRefresher.refresh();
}
}
This autowired bean is giving me problems as from the logs, it says that paramater 1 has an unsatisfied dependency.
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration$DataSourceTransactionManagerConfiguration':
Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'application':
Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException:
Error creating bean with name
'ktc.tanalytics.prediction.PredictionBeanConfiguration':
Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'configurationService' defined in ktc.tanalytics.commons.CommonsBeanConfiguration:
Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'zookeeperConfigurationPersister' defined in ktc.tanalytics.commons.CommonsBeanConfiguration:
Initialization of bean failed; nested exception is
org.springframework.beans.factory.UnsatisfiedDependencyException:
Error creating bean with name 'contextRefresher' defined in class path resource [org/springframework/cloud/autoconfigure/RefreshAutoConfiguration.class]:
Unsatisfied dependency expressed through method 'contextRefresher' parameter 1; nested exception is org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'refreshScope':
Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'org.springframework.transaction.config.internalTransactionAdvisor'
defined in class path resource [org/springframework/transaction/annotation/ProxyTransactionManagementConfiguration.class]:
Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException:
Failed to instantiate [org.springframework.transaction.interceptor.BeanFactoryTransactionAttributeSourceAdvisor]:
Factory method 'transactionAdvisor' threw exception; nested exception is java.lang.NullPointerException
Now, I have checked the code of ContextRefresher in spring (https://github.com/spring-cloud/spring-cloud-commons/blob/master/spring-cloud-context/src/main/java/org/springframework/cloud/context/refresh/ContextRefresher.java) and it receives two arguments.
I suppose that Spring is responsible of creating this ContextRefresher object since it is basically #Autowired. However I do not know why parameter 1 is missing as the log says
Factory method 'transactionAdvisor' threw exception; nested exception is java.lang.NullPointerException
As I focus on the above nested exception, probably transactionAdvisor
is a factory method which tries to create something and while
creating, it is performing some operation on null object.
Just inspect or debug the method: transactionAdvisor , in your code.