Using Swagger 2 in Spring 6 project throws java.lang ...

Using Swagger 2 in Spring 6 project throws java.lang ...