title: Error creating bean with name: Lookup method resolution failed; nested exception is IllegalStateException: Failed to introspect Class from ClassLoader
body: <p>I am able to run this application in Eclipse IDE and everything is running fine but not able to run via <strong>java -jar payment_internal_portal-0.0.1-SNAPSHOT.jar</strong>.
  I have tried various approaches but I am not able to deploy this application in embedded tomcat via [<strong>java -jar payment_internal_portal-0.0.1-SNAPSHOT.jar</strong>] and that is causing below error.</p>
  <p>What do I have to do run application via [ <strong>java -jar payment_internal_portal-0.0.1-SNAPSHOT.jar</strong> ]?</p>
  <pre><code>  .   ____          _            __ _ _
  /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
  ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
  \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
    '  |____| .__|_| |_|_| |_\__, | / / / /
  =========|_|==============|___/=/_/_/_/
  :: Spring Boot ::                (v2.4.2)
   
  2021-07-29 04:02:18.604  INFO 19080 --- [           main] p.InternalPortalApplication : Starting PaymentInternalPortalApplication 
  2021-07-29 04:02:18.608  INFO 19080 --- [           main] p.PaymentInternalPortalApplication : The following profiles are active: devp
  2021-07-29 04:02:21.206  INFO 19080 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode.
  2021-07-29 04:02:23.395  INFO 19080 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 2166 ms. Found 115 JPA repository interfaces.
  2021-07-29 04:02:25.679  INFO 19080 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 8082 (http)
  2021-07-29 04:02:25.693  INFO 19080 --- [           main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
  2021-07-29 04:02:25.694  INFO 19080 --- [           main] org.apache.catalina.core.StandardEngine  : Starting Servlet engine: [Apache Tomcat/9.0.41]
  2021-07-29 04:02:26.980  INFO 19080 --- [           main] org.apache.jasper.servlet.TldScanner     : At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
  2021-07-29 04:02:27.195  INFO 19080 --- [           main] o.a.c.c.C.[.[.[/payment]           : Initializing Spring embedded WebApplicationContext
  2021-07-29 04:02:27.196  INFO 19080 --- [           main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 8357 ms
  2021-07-29 04:02:27.674  INFO 19080 --- [           main] o.hibernate.jpa.internal.util.LogHelper  : HHH000204: Processing PersistenceUnitInfo [name: default]
  2021-07-29 04:02:27.755  INFO 19080 --- [           main] org.hibernate.Version                    : HHH000412: Hibernate ORM core version 5.4.27.Final
  2021-07-29 04:02:27.920  INFO 19080 --- [           main] o.hibernate.annotations.common.Version   : HCANN000001: Hibernate Commons Annotations {5.1.2.Final}
  2021-07-29 04:02:28.089  INFO 19080 --- [           main] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Starting...
  2021-07-29 04:02:28.815  INFO 19080 --- [           main] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Start completed.
  2021-07-29 04:02:28.842  INFO 19080 --- [           main] org.hibernate.dialect.Dialect            : HHH000400: Using dialect: org.hibernate.dialect.MySQL5InnoDBDialect
  2021-07-29 04:02:39.694  INFO 19080 --- [           main] o.h.e.t.j.p.i.JtaPlatformInitiator       : HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform]
  2021-07-29 04:02:39.704  INFO 19080 --- [           main] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default'
  2021-07-29 04:02:39.976  WARN 19080 --- [           main] JpaBaseConfiguration$JpaWebConfiguration : spring.jpa.open-in-view is enabled by default. Therefore, database queries may be performed during view rendering. Explicitly configure spring.jpa.open-in-view to disable this warning
  log4j:WARN No appenders could be found for logger (freemarker.configuration).
  log4j:WARN Please initialize the log4j system properly.
  log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
  **2021-07-29 04:02:43.256  WARN 19080 --- [           main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'onboardMerchantController': Lookup method resolution failed; nested exception is java.lang.IllegalStateException: Failed to introspect Class [com.pp.internal.portal.controller.OnboardMerchantController] from ClassLoader [org.springframework.boot.loader.LaunchedURLClassLoader@7daf6ecc]**
  2021-07-29 04:02:43.281  INFO 19080 --- [           main] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'default'
  2021-07-29 04:02:43.284  INFO 19080 --- [           main] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Shutdown initiated...
  2021-07-29 04:02:43.401  INFO 19080 --- [           main] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Shutdown completed.
  2021-07-29 04:02:43.405  INFO 19080 --- [           main] o.apache.catalina.core.StandardService   : Stopping service [Tomcat]
  2021-07-29 04:02:43.462  INFO 19080 --- [           main] ConditionEvaluationReportLoggingListener :
   
  Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
  2021-07-29 04:02:43.514 ERROR 19080 --- [           main] o.s.boot.SpringApplication               : Application run failed
   
  **org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'onboardMerchantController': Lookup method resolution failed; nested exception is java.lang.IllegalStateException: Failed to introspect Class [com.pp.internal.portal.controller.OnboardMerchantController] from ClassLoader [org.springframework.boot.loader.LaunchedURLClassLoader@7daf6ecc]**
          at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.determineCandidateConstructors(AutowiredAnnotationBeanPostProcessor.java:289) ~[spring-beans-5.3.3.jar!/:5.3.3]
          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.determineConstructorsFromBeanPostProcessors(AbstractAutowireCapableBeanFactory.java:1286) ~[spring-beans-5.3.3.jar!/:5.3.3]
          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1203) ~[spring-beans-5.3.3.jar!/:5.3.3]
          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:571) ~[spring-beans-5.3.3.jar!/:5.3.3]
          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:531) ~[spring-beans-5.3.3.jar!/:5.3.3]
          at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.3.jar!/:5.3.3]
          at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.3.jar!/:5.3.3]
          at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.3.jar!/:5.3.3]
          at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[spring-beans-5.3.3.jar!/:5.3.3]
          at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:944) ~[spring-beans-5.3.3.jar!/:5.3.3]
          at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:923) ~[spring-context-5.3.3.jar!/:5.3.3]
          at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:588) ~[spring-context-5.3.3.jar!/:5.3.3]
          at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:144) ~[spring-boot-2.4.2.jar!/:2.4.2]
          at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:767) [spring-boot-2.4.2.jar!/:2.4.2]
          at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:759) [spring-boot-2.4.2.jar!/:2.4.2]
          at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:426) [spring-boot-2.4.2.jar!/:2.4.2]
          at org.springframework.boot.SpringApplication.run(SpringApplication.java:326) [spring-boot-2.4.2.jar!/:2.4.2]
          at org.springframework.boot.SpringApplication.run(SpringApplication.java:1311) [spring-boot-2.4.2.jar!/:2.4.2]
          at org.springframework.boot.SpringApplication.run(SpringApplication.java:1300) [spring-boot-2.4.2.jar!/:2.4.2]
          at com.pp.internal.portal.PaymentInternalPortalApplication.main(PaymentInternalPortalApplication.java:49) [classes!/:0.0.1-SNAPSHOT]
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_281]
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_281]
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_281]
          at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_281]
          at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49) [payment_internal_portal-0.0.1-SNAPSHOT.jar:0.0.1-SNAPSHOT]
          at org.springframework.boot.loader.Launcher.launch(Launcher.java:107) [payment_internal_portal-0.0.1-SNAPSHOT.jar:0.0.1-SNAPSHOT]
          at org.springframework.boot.loader.Launcher.launch(Launcher.java:58) [payment_internal_portal-0.0.1-SNAPSHOT.jar:0.0.1-SNAPSHOT]
          at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:88) [payment_internal_portal-0.0.1-SNAPSHOT.jar:0.0.1-SNAPSHOT]
  **Caused by: java.lang.IllegalStateException: Failed to introspect Class [com.pp.internal.portal.controller.OnboardMerchantController] from ClassLoader [org.springframework.boot.loader.LaunchedURLClassLoader@7daf6ecc]**
          at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:481) ~[spring-core-5.3.3.jar!/:5.3.3]
          at org.springframework.util.ReflectionUtils.doWithLocalMethods(ReflectionUtils.java:321) ~[spring-core-5.3.3.jar!/:5.3.3]
          at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.determineCandidateConstructors(AutowiredAnnotationBeanPostProcessor.java:267) ~[spring-beans-5.3.3.jar!/:5.3.3]
          ... 27 common frames omitted
  **Caused by: java.lang.NoClassDefFoundError: org/springframework/boot/configurationprocessor/json/JSONException**
          at java.lang.Class.getDeclaredMethods0(Native Method) ~[na:1.8.0_281]
          at java.lang.Class.privateGetDeclaredMethods(Class.java:2701) ~[na:1.8.0_281]
          at java.lang.Class.getDeclaredMethods(Class.java:1975) ~[na:1.8.0_281]
          at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:463) ~[spring-core-5.3.3.jar!/:5.3.3]
          ... 29 common frames omitted
  **Caused by: java.lang.ClassNotFoundException: org.springframework.boot.configurationprocessor.json.JSONException**
          at java.net.URLClassLoader.findClass(URLClassLoader.java:382) ~[na:1.8.0_281]
          at java.lang.ClassLoader.loadClass(ClassLoader.java:418) ~[na:1.8.0_281]
          at org.springframework.boot.loader.LaunchedURLClassLoader.loadClass(LaunchedURLClassLoader.java:151) ~[payment_internal_portal-0.0.1-SNAPSHOT.jar:0.0.1-SNAPSHOT]
          at java.lang.ClassLoader.loadClass(ClassLoader.java:351) ~[na:1.8.0_281]
          ... 33 common frames omitted
  </code></pre>