AnsweredAssumed Answered

Failed to instantiate factory method 'ldapContextSource' NoClassDefFoundError

Question asked by abhitorem on Aug 1, 2017

We are migrating from Enterprise Activiti to Community Version. copied all the customized code in a new project moved the workflows into it and tried to run. Our application is a Spring boot application which we are trying to deploy our code at every deploy, when running of Tomcat. Can anybody help what this issue is and how to resolve it. 

Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled.
2017-08-01 13:54:38.781 ERROR 8460 --- [ost-startStop-1] o.s.boot.SpringApplication               : Application startup failed

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ldapContextSource' defined in class path resource [org/springframework/boot/autoconfigure/ldap/LdapAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.ldap.core.ContextSource]: Factory method 'ldapContextSource' threw exception; nested exception is java.lang.NoClassDefFoundError: org/springframework/beans/factory/InitializingBean
     at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:599) ~[spring-beans-4.3.8.RELEASE.jar:4.3.8.RELEASE]
     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1173) ~[spring-beans-4.3.8.RELEASE.jar:4.3.8.RELEASE]
     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1067) ~[spring-beans-4.3.8.RELEASE.jar:4.3.8.RELEASE]
     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:513) ~[spring-beans-4.3.8.RELEASE.jar:4.3.8.RELEASE]
     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483) ~[spring-beans-4.3.8.RELEASE.jar:4.3.8.RELEASE]
     at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) ~[spring-beans-4.3.8.RELEASE.jar:4.3.8.RELEASE]
     at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.3.8.RELEASE.jar:4.3.8.RELEASE]......
Caused by: java.lang.ClassNotFoundException: org.springframework.beans.factory.InitializingBean
     at java.net.URLClassLoader.findClass(URLClassLoader.java:381) ~[na:1.8.0_131]
     at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[na:1.8.0_131]
     at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[na:1.8.0_131]

Outcomes