ClassCastException : cannot be cast to class and are in unnamed module of loader 'app'

Viewed 3547

I am trying to build a simple email sending application in visual studio code.

The tutorial that I am following is this:

https://www.technicalkeeda.com/spring-boot-tutorials/how-to-send-email-using-spring-boot

When I run my project I am getting this exception error:

Exception in thread "main" java.lang.ClassCastException: class 
MailServiceImplementation cannot be cast to class 
MailService 
MailServiceImplementation and 
MailService are in unnamed module of loader 'app')

To see my MailService and MailServiceImplementation classes, please visit the above mentioned link. Kindly help me with this error.

0 Answers
Related