close

[Solved] Exception encountered during context initialization – cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException

Hello Guys, How are you all? Hope You all Are Fine. Today I am facing the following error Exception encountered during context initialization – cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException in Java. So Here I am Explain to you all the possible solutions here.

Without wasting your time, Let’s start This Article to Solve This Error.

How Exception encountered during context initialization – cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException Error Occurs?

Today I am facing the following error Exception encountered during context initialization – cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException in Java.

How To Solve Exception encountered during context initialization – cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException Error ?

  1. How To Solve Exception encountered during context initialization – cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException Error ?

    To Solve Exception encountered during context initialization – cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException Error The Id of Doctor is doctorId, so
    Doctor findById(... void deleteById(...

  2. Exception encountered during context initialization – cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException

    To Solve Exception encountered during context initialization – cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException Error The Id of Doctor is doctorId, so
    Doctor findById(... void deleteById(...

Solution 1

The Id of Doctor is doctorId, so

 Doctor findById(...
 void deleteById(...

should be

Doctor findByDoctorId(...
void deleteByDoctorId(...

or change doctorId to simply id, with getter and setter.

Summery

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you? Thank You.

Also, Read