Posts

Showing posts from April, 2021

IOC Container

 IOC Container(Spring) The IoC container is responsible to instantiate, configure and assemble the objects. The IoC container gets informations from the XML file and works accordingly. The main tasks performed by IoC container are: 1. Create the object  2. Hold them in a memory 3. Inject them in another object as required 4. Maintain the whole lifecycle of objects There are two type of  IOC container 1. BeanFactory 2.  ApplicationContext

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaConfiguration': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Hikari.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.zaxxer.hikari.HikariDataSource]: Factory method 'dataSource' threw exception; nested exception is java.lang.IllegalStateException: Cannot load driver class: com.mysql.jdbc.Driver

Image
 this error occurs in springboot application solution goto application.properties file and enable spring.autoconfigure.exclude=org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. [2m2021-04-04 21:55:17.475 [0;39m [31mERROR [0;39m [35m18524 [0;39m [2m--- [0;39m [2m[ main] [0;39m [36mo.s.boot.SpringApplication [0;39m [2m: [0;39m Application run failed

Image
This error arise while run springboot application Solution step1    open application.properties file then enable         debug=true          server.port=8014