org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mongoTemplate' defined in com.storeApp.config.SpringMongoConfig1: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.mongodb.core.MongoTemplate]: Factory method 'mongoTemplate' threw exception; nested exception is java.lang.NoSuchMethodError: org.springframework.data.util.ClassTypeInformation.from(Ljava/lang/Class;)Lorg/springframework/data/util/ClassTypeInformation;

Stack Overflow | anukuls | 7 months ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Error creating bean with name 'mongoTemplate' while connecting mongodb through Spring

    Stack Overflow | 7 months ago | anukuls
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mongoTemplate' defined in com.storeApp.config.SpringMongoConfig1: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.mongodb.core.MongoTemplate]: Factory method 'mongoTemplate' threw exception; nested exception is java.lang.NoSuchMethodError: org.springframework.data.util.ClassTypeInformation.from(Ljava/lang/Class;)Lorg/springframework/data/util/ClassTypeInformation;
  2. 0

    I have one error with Spring data MongoDB that java.lang.NoSuchMethodError:

    Stack Overflow | 1 year ago | Ganesh
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mongoTemplate' defined in class path resource [Beans.xml]: Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.mongodb.core.MongoTemplate]: Constructor threw exception; nested exception is java.lang.NoSuchMethodError: org.springframework.core.convert.support.ConversionServiceFactory.createDefaultConversionService()Lorg/springframework/core/convert/support/GenericConversionService;
  3. 0

    Error creating bean with name 'mongoTemplate' defined in ServletContext resource

    Stack Overflow | 8 months ago | Vipul Singh
    java.lang.NoSuchMethodError: org.springframework.core.convert.support.ConversionServiceFactory.createDefaultConversionService()Lorg/springframework/core/convert/support/GenericConversionService;
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

    1 unregistered visitors

    Root Cause Analysis

    1. java.lang.NoSuchMethodError

      org.springframework.data.util.ClassTypeInformation.from(Ljava/lang/Class;)Lorg/springframework/data/util/ClassTypeInformation;

      at org.springframework.data.mongodb.core.convert.DefaultMongoTypeMapper.<clinit>()
    2. Spring Data MongoDB - Core
      MongoTemplate.<init>
      1. org.springframework.data.mongodb.core.convert.DefaultMongoTypeMapper.<clinit>(DefaultMongoTypeMapper.java:49)
      2. org.springframework.data.mongodb.core.convert.MappingMongoConverter.<init>(MappingMongoConverter.java:111)
      3. org.springframework.data.mongodb.core.MongoTemplate.getDefaultMongoConverter(MongoTemplate.java:2039)
      4. org.springframework.data.mongodb.core.MongoTemplate.<init>(MongoTemplate.java:217)
      5. org.springframework.data.mongodb.core.MongoTemplate.<init>(MongoTemplate.java:202)
      5 frames
    3. com.storeApp.config
      SpringMongoConfig1$$EnhancerBySpringCGLIB$$81e5bc96$$FastClassBySpringCGLIB$$52d3ef2d.invoke
      1. com.storeApp.config.SpringMongoConfig1.mongoTemplate(SpringMongoConfig1.java:25)
      2. com.storeApp.config.SpringMongoConfig1$$EnhancerBySpringCGLIB$$81e5bc96.CGLIB$mongoTemplate$0(<generated>)
      3. com.storeApp.config.SpringMongoConfig1$$EnhancerBySpringCGLIB$$81e5bc96$$FastClassBySpringCGLIB$$52d3ef2d.invoke(<generated>)
      3 frames
    4. Spring Core
      MethodProxy.invokeSuper
      1. org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
      1 frame
    5. Spring Context
      ConfigurationClassEnhancer$BeanMethodInterceptor.intercept
      1. org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:309)
      1 frame
    6. com.storeApp.config
      SpringMongoConfig1$$EnhancerBySpringCGLIB$$81e5bc96.mongoTemplate
      1. com.storeApp.config.SpringMongoConfig1$$EnhancerBySpringCGLIB$$81e5bc96.mongoTemplate(<generated>)
      1 frame
    7. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      4. java.lang.reflect.Method.invoke(Method.java:483)
      4 frames
    8. Spring Beans
      DefaultListableBeanFactory.preInstantiateSingletons
      1. org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162)
      2. org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:588)
      3. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1119)
      4. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1014)
      5. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:504)
      6. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)
      7. org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303)
      8. org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
      9. org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299)
      10. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
      11. org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:755)
      11 frames
    9. Spring Context
      AnnotationConfigApplicationContext.<init>
      1. org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:757)
      2. org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:480)
      3. org.springframework.context.annotation.AnnotationConfigApplicationContext.<init>(AnnotationConfigApplicationContext.java:84)
      3 frames
    10. com.storeApp.core
      StoreMainApp.main
      1. com.storeApp.core.StoreMainApp.main(StoreMainApp.java:20)
      1 frame