Home > front end >  SSM framework BeanCreationException: create a "yuangongServiceImpl" error bean: injection
SSM framework BeanCreationException: create a "yuangongServiceImpl" error bean: injection

Time:10-03

Org. Springframework. Beans. Factory. BeanCreationException: Error creating bean with the name 'yuangongServiceImpl: Injection of autowired dependencies failed; Nested exception is org. Springframework. Beans. Factory. BeanCreationException: Could not autowire field: private com. Jiyun. Mapper. IYuangongMapper com. Jiyun. Service. Impl. YuangongServiceImpl. AllYuangongMapper; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'IYuangongMapper' defined in file [G:\SSM05\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\Chiru1\WEB-INF\classes\com\jiyun\mapper\IYuangongMapper.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory': : Error creating bean with name 'sqlSessionFactoryBean' defined in class path resource [spring.xml]: Cannot resolve reference to bean 'dataSource' while setting bean property 'dataSource'; Nested exception is org. Springframework. Beans. Factory. BeanCreationException: Error creating bean with the name 'dataSource' defined in the class path resource [spring. XML] : Initialization of bean failed; Nested exception is org. Springframework. Beans. TypeMismatchException: Failed to convert the property value of type 'Java. Lang. String' to the required type 'int' for the property 'initialPoolSize'; Nested exception is Java. Lang. A NumberFormatException: For input string: "${JDBC. InitPoolSize}"; Nested exception is org. Springframework. Beans. Factory. BeanCreationException: Error creating bean with the name 'sqlSessionFactoryBean defined in the class path resource [spring. XML] : always resolve a reference to the bean' dataSource 'while setting the bean property' dataSource '; Nested exception is org. Springframework. Beans. Factory. BeanCreationException: Error creating bean with the name 'dataSource' defined in the class path resource [spring. XML] : Initialization of bean failed; Nested exception is org. Springframework. Beans. TypeMismatchException: Failed to convert the property value of type 'Java. Lang. String' to the required type 'int' for the property 'initialPoolSize'; Nested exception is Java. Lang. A NumberFormatException: For input string: "${JDBC. InitPoolSize}"
The at org. Springframework. Beans. Factory. The annotation. AutowiredAnnotationBeanPostProcessor. PostProcessPropertyValues (AutowiredAnnotationBeanPostProcessor. Java: 292)
The at org. Springframework. Beans. Factory. Support. AbstractAutowireCapableBeanFactory. PopulateBean (AbstractAutowireCapableBeanFactory. Java: 1185)
The at org. Springframework. Beans. Factory. Support. AbstractAutowireCapableBeanFactory. DoCreateBean (AbstractAutowireCapableBeanFactory. Java: 537)
The at org. Springframework. Beans. Factory. Support. AbstractAutowireCapableBeanFactory. CreateBean (AbstractAutowireCapableBeanFactory. Java: 475)
The at org. Springframework. Beans. Factory. Support. AbstractBeanFactory $1. GetObject (AbstractBeanFactory. Java: 304)
The at org. Springframework. Beans. Factory. Support. DefaultSingletonBeanRegistry. GetSingleton (DefaultSingletonBeanRegistry. Java: 228)
The at org. Springframework. Beans. Factory. Support. AbstractBeanFactory. DoGetBean (AbstractBeanFactory. Java: 300)
The at org. Springframework. Beans. Factory. Support. AbstractBeanFactory. GetBean (AbstractBeanFactory. Java: 195)
The at org. Springframework. Beans. Factory. Support. DefaultListableBeanFactory. PreInstantiateSingletons (DefaultListableBeanFactory. Java: 700)
The at org. Springframework. Context. Support. AbstractApplicationContext. FinishBeanFactoryInitialization (AbstractApplicationContext. Java: 760)
The at org. Springframework. Context. Support. AbstractApplicationContext. Refresh (AbstractApplicationContext. Java: 482)
The at org. Springframework. Web. Context. ContextLoader. ConfigureAndRefreshWebApplicationContext (ContextLoader. Java: 381)
The at org. Springframework. Web. Context. ContextLoader. InitWebApplicationContext (ContextLoader. Java: 293)
The at org. Springframework. Web. Context. ContextLoaderListener. ContextInitialized (ContextLoaderListener. Java: 106)
The at org. Apache. Catalina. Core. StandardContext. ListenerStart (StandardContext. Java: 4973)
The at org. Apache. Catalina. Core. StandardContext. StartInternal (StandardContext. Java: 5467)
The at org. Apache. Catalina. Util. LifecycleBase. Start (LifecycleBase. Java: 150)
The at org. Apache. Catalina. Core. ContainerBase $StartChild. Call (1559) ContainerBase. Java:
The at org. Apache. Catalina. Core. ContainerBase $StartChild. Call (1549) ContainerBase. Java:
The at Java. Util. Concurrent. FutureTask. Run (Unknown Source)
The at Java. Util. Concurrent. ThreadPoolExecutor. RunWorker (Unknown Source)
The at Java. Util. Concurrent. ThreadPoolExecutor $Worker. The run (Unknown Source)
The at Java. Lang. Thread. The run (Unknown Source)

CodePudding user response:

Find it, if you are all set, you die staring at the spring configuration file, see if there are any errors, or is not written, is a 30% chance to this problem,
null
  • Related