org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'sentimentController': Unsatisfied dependency expressed through field 'sv'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sentimentService' defined in file [C:\Users\MG23625\Desktop\workspace\sentiment-apiImproved\target\classes\org\citi\sentimentapi\SentimentService.class]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.citi.sentimentapi.SentimentService]: Constructor threw exception; nested exception is java.lang.NullPointerException: in must not be null

Stack Overflow | user2641094 | 1 month ago
tip
Do you find the tips below useful? Click on the to mark them and say thanks to rp . Or join the community to write better ones.
  1. 0
    samebug tip
    Spring expects that the EntityManagerFactory has to be called "entityManagerFactory". It uses convention over configuration to make it easier to use.
  2. 0
    samebug tip
    Check Servers Launch Configuration in Eclipse. See the details below.
  3. 0

    GitHub comment 1099#271315604

    GitHub | 3 months ago | sankintoo
    org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'documentationPluginsBootstrapper' defined in URL [jar:file:/C:/Users/kumasan2/.m2/repository/io/springfox/springfox-spring-web/2.6.0/springfox-spring-web-2.6.0.jar!/springfox/documentation/spring/web/plugins/DocumentationPluginsBootstrapper.class]: Unsatisfied dependency expressed through constructor parameter 1; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'webMvcRequestHandlerProvider' defined in URL [jar:file:/C:/Users/kumasan2/.m2/repository/io/springfox/springfox-spring-web/2.6.0/springfox-spring-web-2.6.0.jar!/springfox/documentation/spring/web/plugins/WebMvcRequestHandlerProvider.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.boot.autoconfigure.web.WebMvcAutoConfiguration$EnableWebMvcConfiguration': Unsatisfied dependency expressed through method 'setConfigurers' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.boot.autoconfigure.web.WebMvcAutoConfiguration$WebMvcAutoConfigurationAdapter': Unsatisfied dependency expressed through constructor parameter 3; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.boot.autoconfigure.web.HttpMessageConvertersAutoConfiguration': Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.autoconfigure.web.HttpMessageConvertersAutoConfiguration$$EnhancerBySpringCGLIB$$4460c3e1]: Constructor threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'mappingJackson2HttpMessageConverter' defined in class path resource [org/springframework/boot/autoconfigure/web/JacksonHttpMessageConvertersConfiguration$MappingJackson2HttpMessageConverterConfiguration.class]: Unsatisfied dependency expressed through method 'mappingJackson2HttpMessageConverter' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'jacksonObjectMapper' defined in class path resource [org/springframework/boot/autoconfigure/jackson/JacksonAutoConfiguration$JacksonObjectMapperConfiguration.class]: Unsatisfied dependency expressed through method 'jacksonObjectMapper' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jacksonObjectMapperBuilder' defined in class path resource [org/springframework/boot/autoconfigure/jackson/JacksonAutoConfiguration$JacksonObjectMapperBuilderConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.http.converter.json.Jackson2ObjectMapperBuilder]: Factory method 'jacksonObjectMapperBuilder' threw exception; nested exception is java.lang.IllegalArgumentException: Illegal pattern character 'i'
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    I try use undertow in spring boot ,but it's error

    Stack Overflow | 4 months ago | avlin han
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'embeddedServletContainerCustomizerBeanPostProcessor': BeanPostProcessor before instantiation of bean failed; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.cache.annotation.ProxyCachingConfiguration': Unsatisfied dependency expressed through method 'setConfigurers' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cachingConfig' defined in file [D:\workspace\test\build\classes\main\com\test\config\CachingConfig.class]: Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: Could not initialize class org.hibernate.validator.internal.engine.ConfigurationImpl
  6. 0

    Auto-configuration should have a dedicated exception type and failure analyzer for known scenario

    GitHub | 2 months ago | snicoll
    org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is org.springframework.boot.context.embedded.EmbeddedServletContainerException: Unable to start embedded Tomcat
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.NullPointerException

    in must not be null

    at java.util.Objects.requireNonNull()
  2. Java RT
    Objects.requireNonNull
    1. java.util.Objects.requireNonNull(Objects.java:228)[na:1.8.0_121]
    1 frame
  3. opennlp.tools.util
    BaseModel.<init>
    1. opennlp.tools.util.model.BaseModel.loadModel(BaseModel.java:194)[opennlp-tools-1.7.2.jar:1.7.2]
    2. opennlp.tools.util.model.BaseModel.<init>(BaseModel.java:173)[opennlp-tools-1.7.2.jar:1.7.2]
    2 frames
  4. opennlp.tools.postag
    POSModel.<init>
    1. opennlp.tools.postag.POSModel.<init>(POSModel.java:82)[opennlp-tools-1.7.2.jar:1.7.2]
    1 frame
  5. org.citi.sentimentapi
    SentimentService.<init>
    1. org.citi.sentimentapi.SentimentService$POSTagger.<init>(SentimentService.java:120)[classes/:na]
    2. org.citi.sentimentapi.SentimentService$SentimentAnalyzer.<init>(SentimentService.java:289)[classes/:na]
    3. org.citi.sentimentapi.SentimentService.<init>(SentimentService.java:388)[classes/:na]
    3 frames
  6. Java RT
    Constructor.newInstance
    1. sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)[na:1.8.0_121]
    2. sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)[na:1.8.0_121]
    3. sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)[na:1.8.0_121]
    4. java.lang.reflect.Constructor.newInstance(Constructor.java:423)[na:1.8.0_121]
    4 frames
  7. Spring Beans
    DefaultListableBeanFactory.preInstantiateSingletons
    1. org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:142)[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]
    2. org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:89)[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]
    3. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1147)[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]
    4. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1099)[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]
    5. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:513)[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]
    6. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]
    7. org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]
    8. org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]
    9. org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]
    10. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]
    11. org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:208)[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]
    12. org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1138)[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]
    13. org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1066)[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]
    14. org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:585)[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]
    15. org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]
    16. org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:366)[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]
    17. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1264)[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]
    18. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553)[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]
    19. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]
    20. org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]
    21. org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]
    22. org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]
    23. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]
    24. org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:761)[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]
    24 frames
  8. Spring Context
    AbstractApplicationContext.refresh
    1. org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:866)[spring-context-4.3.6.RELEASE.jar:4.3.6.RELEASE]
    2. org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:542)[spring-context-4.3.6.RELEASE.jar:4.3.6.RELEASE]
    2 frames
  9. Spring Boot
    SpringApplication.run
    1. org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122)[spring-boot-1.5.1.RELEASE.jar:1.5.1.RELEASE]
    2. org.springframework.boot.SpringApplication.refresh(SpringApplication.java:737)[spring-boot-1.5.1.RELEASE.jar:1.5.1.RELEASE]
    3. org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:370)[spring-boot-1.5.1.RELEASE.jar:1.5.1.RELEASE]
    4. org.springframework.boot.SpringApplication.run(SpringApplication.java:314)[spring-boot-1.5.1.RELEASE.jar:1.5.1.RELEASE]
    5. org.springframework.boot.SpringApplication.run(SpringApplication.java:1162)[spring-boot-1.5.1.RELEASE.jar:1.5.1.RELEASE]
    6. org.springframework.boot.SpringApplication.run(SpringApplication.java:1151)[spring-boot-1.5.1.RELEASE.jar:1.5.1.RELEASE]
    6 frames
  10. org.citi.sentimentapi
    Sentiment.main
    1. org.citi.sentimentapi.Sentiment.main(Sentiment.java:11)[classes/:na]
    1 frame