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


Solutions on the web

Solution icon of stackoverflow
[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

Solution icon of stackoverflow
Error creating bean with name 'demoApplication': Unsatisfied dependency expressed through field 'queryRepoImp'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'queryRepoImp' defined in file

Solution icon of stackoverflow
via Stack Overflow by Nithyananth
, 3 months ago
Error creating bean with name 'securityGroupController': Unsatisfied dependency expressed through field 'service'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'securityGroupServiceImpl

Solution icon of stackoverflow
via Stack Overflow by juliam
, 1 month ago
Error creating bean with name 'invoiceController': Unsatisfied dependency expressed through field 'impl'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'invoiceServiceImpl

Solution icon of stackoverflow
via Stack Overflow by InTheShell
, 5 months ago
name 'userDetailsServiceImpl' defined in file [/Users/intheshell/Desktop/Project_C/target/classes/com/hellokoding/account/service/UserDetailsServiceImpl.class]: Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: org/aspectj/util/PartialOrder$PartialComparable

Solution icon of github
': Unsatisfied dependency expressed through field 'studentMapper'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'studentMapper' defined in file [D:\ideaProjects\rainbow-api-server

Solution icon of stackoverflow
$$3331b939]: Constructor threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'springBootCouchbaseConfigurer' defined in class path resource [org/springframework/boot/autoconfigure/data

Solution icon of stackoverflow
Error creating bean with name 'propertySourceBootstrapConfiguration': Unsatisfied dependency expressed through field 'propertySourceLocators'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean

Solution icon of stackoverflow
Error creating bean with name 'FCMMessageHistoryDAOImpl': Unsatisfied dependency expressed through field 'session'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'session' defined in

Solution icon of github
': Cannot resolve reference to bean 'sessionFactory' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [org

Stack trace

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
	at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:588)[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]
	at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]
	at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:366)[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1264)[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553)[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:761)[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:866)[spring-context-4.3.6.RELEASE.jar:4.3.6.RELEASE]
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:542)[spring-context-4.3.6.RELEASE.jar:4.3.6.RELEASE]
	at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122)[spring-boot-1.5.1.RELEASE.jar:1.5.1.RELEASE]
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:737)[spring-boot-1.5.1.RELEASE.jar:1.5.1.RELEASE]
	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:370)[spring-boot-1.5.1.RELEASE.jar:1.5.1.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:314)[spring-boot-1.5.1.RELEASE.jar:1.5.1.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1162)[spring-boot-1.5.1.RELEASE.jar:1.5.1.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1151)[spring-boot-1.5.1.RELEASE.jar:1.5.1.RELEASE]
	at org.citi.sentimentapi.Sentiment.main(Sentiment.java:11)[classes/:na]
Caused by: 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
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1155)[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1099)[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:513)[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]
	at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:208)[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1138)[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1066)[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]
	at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:585)[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]
	... 19 more
Caused by: 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
	at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:154)[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]
	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:89)[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1147)[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]
	... 30 more
Caused by: java.lang.NullPointerException: in must not be null
	at java.util.Objects.requireNonNull(Objects.java:228)[na:1.8.0_121]
	at opennlp.tools.util.model.BaseModel.loadModel(BaseModel.java:194)[opennlp-tools-1.7.2.jar:1.7.2]
	at opennlp.tools.util.model.BaseModel.<init>(BaseModel.java:173)[opennlp-tools-1.7.2.jar:1.7.2]
	at opennlp.tools.postag.POSModel.<init>(POSModel.java:82)[opennlp-tools-1.7.2.jar:1.7.2]
	at org.citi.sentimentapi.SentimentService$POSTagger.<init>(SentimentService.java:120)[classes/:na]
	at org.citi.sentimentapi.SentimentService$SentimentAnalyzer.<init>(SentimentService.java:289)[classes/:na]
	at org.citi.sentimentapi.SentimentService.<init>(SentimentService.java:388)[classes/:na]
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)[na:1.8.0_121]
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)[na:1.8.0_121]
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)[na:1.8.0_121]
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)[na:1.8.0_121]
	at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:142)[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]
	... 32 more

Write tip

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

Users with the same issue

2 times, 3 weeks ago
Once, 3 months ago
33 times, 5 months ago
Once, 6 months ago
Once, 7 months ago
33 more bugmates