close

[Solved] Error creating bean with name: Lookup method resolution failed; nested exception is IllegalStateException: Failed to introspect Class from ClassLoader

Hello Guys, How are you all? Hope You all Are Fine. Today I am facing the following error Error creating bean with name: Lookup method resolution failed; nested exception is IllegalStateException: Failed to introspect Class from ClassLoader 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 Error creating bean with name: Lookup method resolution failed; nested exception is IllegalStateException: Failed to introspect Class from ClassLoader Error Occurs?

Today I am facing the following error Error creating bean with name: Lookup method resolution failed; nested exception is IllegalStateException: Failed to introspect Class from ClassLoader in Java.

How To Solve Error creating bean with name: Lookup method resolution failed; nested exception is IllegalStateException: Failed to introspect Class from ClassLoader Error ?

  1. How To Solve Error creating bean with name: Lookup method resolution failed; nested exception is IllegalStateException: Failed to introspect Class from ClassLoader Error ?

    To Solve Error creating bean with name: Lookup method resolution failed; nested exception is IllegalStateException: Failed to introspect Class from ClassLoader Error Please check your project dependency jar or library files included or not. E.g. Spring Boot project, we need to check this on pom.xml file.

  2. Error creating bean with name: Lookup method resolution failed; nested exception is IllegalStateException: Failed to introspect Class from ClassLoader

    To Solve Error creating bean with name: Lookup method resolution failed; nested exception is IllegalStateException: Failed to introspect Class from ClassLoader Error Please check your project dependency jar or library files included or not. E.g. Spring Boot project, we need to check this on pom.xml file.

Solution 1

I had resolved this issue, Actually, I was using Spring’s “configuration processor” which is annotation processor used to build (to generate configuration metadata). It’s not a module that we can use for dependency. So when I used JSON-java that resolve above issue.

This cause given me hint Caused by: java.lang.NoClassDefFoundError: org/springframework/boot/configurationprocessor/json/JSONException

Solution 2

Please check your project dependency jar or library files included or not. E.g. Spring Boot project, we need to check this on pom.xml file.

Problem I faced:

Error creating bean with name 'xxxxxxx': Lookup method resolution failed; nested exception is java.lang.IllegalStateException: Failed to introspect Class 

Problem I resolved: ‘xxxxxxx’ is in a external library file and ‘xxxxxxx’ class referring to another ‘yyy’ class which should be resolved by Spring Webflux dependency.

Then I included <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-webflux</artifactId> </dependency>

so that ‘yyy’ class could be imported by webflux Spring JAR. Then the problem was resolved.

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