E Spark is the platform for all the IT Techie who want to explore the new areas of the Technology this platform is dedicated to those passionate Techie guys
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'messageController': Unsatisfied dependency expressed through field 'chatMessageService': Error creating bean with name 'chatMessageServiceImpl': Unsatisfied dependency expressed through field 'ChatMessageDao': Error creating bean with name 'chatMessageDaoImpl': Unsatisfied dependency expressed through field 'dataSource': No qualifying bean of type [org.apache.tomcat.jdbc.pool.DataSource] found for dependency [org.apache.tomcat.jdbc.pool.DataSource]: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [org.apache.tomcat.jdbc.pool.DataSource] found for dependency [org.apache.tomcat.jdbc.pool.DataSource]: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'chatMessageDaoImpl': Unsatisfied dependency expressed through field 'dataSource': No qualifying bean of type [org.apache.tomcat.jdbc.pool.DataSource] found for dependency [org.apache.tomcat.jdbc.pool.DataSource]: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [org.apache.tomcat.jdbc.pool.DataSource] found for dependency [org.apache.tomcat.jdbc.pool.DataSource]: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'chatMessageServiceImpl': Unsatisfied dependency expressed through field 'ChatMessageDao': Error creating bean with name 'chatMessageDaoImpl': Unsatisfied dependency expressed through field 'dataSource': No qualifying bean of type [org.apache.tomcat.jdbc.pool.DataSource] found for dependency [org.apache.tomcat.jdbc.pool.DataSource]: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type
you have defined the data source which u are trying to auto wired in chatMessageDaoImpl then this chatMessageDaoImpl u are trying to autowired in the chatMessageServiceImpl which u are trying to autowired in the messageController what i understand that u have to define the id for the datasource from tomcat which is this one org.apache.tomcat.jdbc.pool.DataSource so try to give id while defining the datasource and use qualifier while auto wiring this data source in dao or any where
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'messageController': Unsatisfied dependency expressed through field 'chatMessageService': Error creating bean with name 'chatMessageServiceImpl': Unsatisfied dependency expressed through field 'ChatMessageDao': Error creating bean with name 'chatMessageDaoImpl': Unsatisfied dependency expressed through field 'dataSource': No qualifying bean of type [org.apache.tomcat.jdbc.pool.DataSource] found for dependency [org.apache.tomcat.jdbc.pool.DataSource]: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [org.apache.tomcat.jdbc.pool.DataSource] found for dependency [org.apache.tomcat.jdbc.pool.DataSource]: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'chatMessageDaoImpl': Unsatisfied dependency expressed through field 'dataSource': No qualifying bean of type [org.apache.tomcat.jdbc.pool.DataSource] found for dependency [org.apache.tomcat.jdbc.pool.DataSource]: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [org.apache.tomcat.jdbc.pool.DataSource] found for dependency [org.apache.tomcat.jdbc.pool.DataSource]: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'chatMessageServiceImpl': Unsatisfied dependency expressed through field 'ChatMessageDao': Error creating bean with name 'chatMessageDaoImpl': Unsatisfied dependency expressed through field 'dataSource': No qualifying bean of type [org.apache.tomcat.jdbc.pool.DataSource] found for dependency [org.apache.tomcat.jdbc.pool.DataSource]: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type
ReplyDeletei got this error but cannot fix , please help!
ReplyDeleteyou have defined the data source which u are trying to auto wired in chatMessageDaoImpl then this chatMessageDaoImpl u are trying to autowired in the chatMessageServiceImpl which u are trying to autowired in the messageController
ReplyDeletewhat i understand that u have to define the id for the datasource from tomcat which is this one org.apache.tomcat.jdbc.pool.DataSource so try to give id while defining the datasource and use qualifier while auto wiring this data source in dao or any where
i hope this will help u to resolve issue