org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'grailsApplicationPostProcessor' defined in books.Application: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [grails.boot.config.GrailsApplicationPostProcessor]: Factory method 'grailsApplicationPostProcessor' threw exception; nested exception is org.grails.core.exceptions.GrailsRuntimeException: Error instantiated artefact class [class grails.plugins.elasticsearch.ElasticSearchAdminService] of type [class org.grails.core.DefaultGrailsServiceClass]: InvocationTargetException

GitHub | abrahaj | 9 months ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    SpringApplication & ClusterHealthStatus on Grails 3.1.x

    GitHub | 9 months ago | abrahaj
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'grailsApplicationPostProcessor' defined in books.Application: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [grails.boot.config.GrailsApplicationPostProcessor]: Factory method 'grailsApplicationPostProcessor' threw exception; nested exception is org.grails.core.exceptions.GrailsRuntimeException: Error instantiated artefact class [class grails.plugins.elasticsearch.ElasticSearchAdminService] of type [class org.grails.core.DefaultGrailsServiceClass]: InvocationTargetException
  2. 0

    ClusterHealthStatus not found

    GitHub | 7 months ago | simpss
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'grailsApplicationPostProcessor' defined in saasapi.Application: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [grails.boot.config.GrailsApplicationPostProcessor]: Factory method 'grailsApplicationPostProcessor' threw exception; nested exception is org.grails.core.exceptions.GrailsRuntimeException: Error instantiated artefact class [class grails.plugins.elasticsearch.ElasticSearchAdminService] of type [class org.grails.core.DefaultGrailsServiceClass]: InvocationTargetException
  3. 0

    java.lang.ClassNotFoundException: org.hibernate.cfg.Mappings

    Stack Overflow | 1 year ago | Bilal Shah
    java.lang.NoClassDefFoundError: org/hibernate/cfg/Mappings
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Using {{SingleConnectionFactory}} with JMS 1.1 results in a {{NoClassDefFoundError}}: {noformat} java.lang.NoClassDefFoundError: javax/jms/JMSContext at java.lang.Class.getDeclaredMethods0(Native Method) ~[na:1.8.0_102] at java.lang.Class.privateGetDeclaredMethods(Class.java:2701) ~[na:1.8.0_102] at java.lang.Class.getDeclaredMethods(Class.java:1975) ~[na:1.8.0_102] at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:628) ~[spring-core-5.0.0.BUILD-SNAPSHOT.jar:5.0.0.BUILD-SNAPSHOT] at org.springframework.util.ReflectionUtils.doWithLocalMethods(ReflectionUtils.java:505) ~[spring-core-5.0.0.BUILD-SNAPSHOT.jar:5.0.0.BUILD-SNAPSHOT] at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.buildLifecycleMetadata(InitDestroyAnnotationBeanPostProcessor.java:205) ~[spring-beans-5.0.0.BUILD-SNAPSHOT.jar:5.0.0.BUILD-SNAPSHOT] at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.findLifecycleMetadata(InitDestroyAnnotationBeanPostProcessor.java:186) ~[spring-beans-5.0.0.BUILD-SNAPSHOT.jar:5.0.0.BUILD-SNAPSHOT] at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessMergedBeanDefinition(InitDestroyAnnotationBeanPostProcessor.java:124) ~[spring-beans-5.0.0.BUILD-SNAPSHOT.jar:5.0.0.BUILD-SNAPSHOT] at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessMergedBeanDefinition(CommonAnnotationBeanPostProcessor.java:295) ~[spring-context-5.0.0.BUILD-SNAPSHOT.jar:5.0.0.BUILD-SNAPSHOT] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyMergedBeanDefinitionPostProcessors(AbstractAutowireCapableBeanFactory.java:940) ~[spring-beans-5.0.0.BUILD-SNAPSHOT.jar:5.0.0.BUILD-SNAPSHOT] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:518) ~[spring-beans-5.0.0.BUILD-SNAPSHOT.jar:5.0.0.BUILD-SNAPSHOT] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482) ~[spring-beans-5.0.0.BUILD-SNAPSHOT.jar:5.0.0.BUILD-SNAPSHOT] at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:304) ~[spring-beans-5.0.0.BUILD-SNAPSHOT.jar:5.0.0.BUILD-SNAPSHOT] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-5.0.0.BUILD-SNAPSHOT.jar:5.0.0.BUILD-SNAPSHOT] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:300) ~[spring-beans-5.0.0.BUILD-SNAPSHOT.jar:5.0.0.BUILD-SNAPSHOT] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:195) ~[spring-beans-5.0.0.BUILD-SNAPSHOT.jar:5.0.0.BUILD-SNAPSHOT] at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:741) ~[spring-beans-5.0.0.BUILD-SNAPSHOT.jar:5.0.0.BUILD-SNAPSHOT] at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:861) ~[spring-context-5.0.0.BUILD-SNAPSHOT.jar:5.0.0.BUILD-SNAPSHOT] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:541) ~[spring-context-5.0.0.BUILD-SNAPSHOT.jar:5.0.0.BUILD-SNAPSHOT] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:736) [spring-boot-2.0.0.BUILD-SNAPSHOT.jar:2.0.0.BUILD-SNAPSHOT] at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:369) [spring-boot-2.0.0.BUILD-SNAPSHOT.jar:2.0.0.BUILD-SNAPSHOT] at org.springframework.boot.SpringApplication.run(SpringApplication.java:313) [spring-boot-2.0.0.BUILD-SNAPSHOT.jar:2.0.0.BUILD-SNAPSHOT] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1161) [spring-boot-2.0.0.BUILD-SNAPSHOT.jar:2.0.0.BUILD-SNAPSHOT] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1150) [spring-boot-2.0.0.BUILD-SNAPSHOT.jar:2.0.0.BUILD-SNAPSHOT] at com.example.Application.main(Application.java:13) [classes/:na] Caused by: java.lang.ClassNotFoundException: javax.jms.JMSContext at java.net.URLClassLoader.findClass(URLClassLoader.java:381) ~[na:1.8.0_102] at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[na:1.8.0_102] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331) ~[na:1.8.0_102] at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[na:1.8.0_102] ... 25 common frames omitted {noformat} I believe it's happening when introspecting the various overloaded {{createContext}} methods.

    Spring JIRA | 6 months ago | Andy Wilkinson
    java.lang.NoClassDefFoundError: javax/jms/JMSContext
  6. 0

    Spring cloud consul class not found RestTemplateCustomizer

    Stack Overflow | 2 years ago | iamiddy
    java.lang.IllegalStateException: Could not evaluate condition on org.springframework.cloud.netflix.ribbon.RibbonAutoConfiguration#loadBalancerClient due to internal class not found. This can happen if you are @ComponentScanning a springframework package (e.g. if you put a @ComponentScan in the default package by mistake)

  1. SteVio1989 6 times, last 1 month ago
  2. tomthomas 6 times, last 2 months ago
  3. treefolk 6 times, last 2 months ago
  4. andyglick 70 times, last 3 months ago
  5. jpvee 1 times, last 3 months ago
7 more registered users
84 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.ClassNotFoundException

    org.elasticsearch.cluster.health.ClusterHealthStatus

    at java.net.URLClassLoader.findClass()
  2. Java RT
    Class.getDeclaredMethods
    1. java.net.URLClassLoader.findClass(URLClassLoader.java:381)
    2. java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    3. sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
    4. java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    5. java.lang.Class.getDeclaredMethods0(Native Method)
    6. java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
    7. java.lang.Class.getDeclaredMethods(Class.java:1975)
    7 frames
  3. Springloaded
    ReflectiveInterceptor.jlClassGetDeclaredMethods
    1. org.springsource.loaded.ri.ReflectiveInterceptor.jlClassGetDeclaredMethods(ReflectiveInterceptor.java:153)
    1 frame
  4. Grails
    DefaultGrailsServiceClass.<init>
    1. org.grails.core.util.ClassPropertyFetcher.init(ClassPropertyFetcher.java:185)
    2. org.grails.core.util.ClassPropertyFetcher.<init>(ClassPropertyFetcher.java:95)
    3. org.grails.core.util.ClassPropertyFetcher.forClass(ClassPropertyFetcher.java:86)
    4. org.grails.core.util.ClassPropertyFetcher.forClass(ClassPropertyFetcher.java:61)
    5. org.grails.core.AbstractGrailsClass.<init>(AbstractGrailsClass.java:91)
    6. org.grails.core.AbstractInjectableGrailsClass.<init>(AbstractInjectableGrailsClass.java:31)
    7. org.grails.core.DefaultGrailsServiceClass.<init>(DefaultGrailsServiceClass.java:32)
    7 frames
  5. Java RT
    Constructor.newInstance
    1. sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    2. sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    3. sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    4. java.lang.reflect.Constructor.newInstance(Constructor.java:422)
    4 frames
  6. Springloaded
    ReflectiveInterceptor.jlrConstructorNewInstance
    1. org.springsource.loaded.ri.ReflectiveInterceptor.jlrConstructorNewInstance(ReflectiveInterceptor.java:1075)
    1 frame
  7. Grails
    GrailsAutoConfiguration.grailsApplicationPostProcessor
    1. grails.core.ArtefactHandlerAdapter.newArtefactClass(ArtefactHandlerAdapter.java:161)
    2. grails.core.DefaultGrailsApplication.addArtefact(DefaultGrailsApplication.java:784)
    3. grails.core.DefaultGrailsApplication.addOverridableArtefact(DefaultGrailsApplication.java:778)
    4. grails.core.DefaultGrailsApplication.addOverridableArtefact(DefaultGrailsApplication.java:763)
    5. org.grails.plugins.AbstractGrailsPluginManager.registerProvidedArtefacts(AbstractGrailsPluginManager.java:317)
    6. grails.boot.config.GrailsApplicationPostProcessor.performGrailsInitializationSequence(GrailsApplicationPostProcessor.groovy:104)
    7. grails.boot.config.GrailsApplicationPostProcessor.initializeGrailsApplication(GrailsApplicationPostProcessor.groovy:88)
    8. grails.boot.config.GrailsApplicationPostProcessor.setApplicationContext(GrailsApplicationPostProcessor.groovy:208)
    9. grails.boot.config.GrailsApplicationPostProcessor.<init>(GrailsApplicationPostProcessor.groovy:73)
    10. grails.boot.config.GrailsAutoConfiguration.grailsApplicationPostProcessor(GrailsAutoConfiguration.groovy:62)
    10 frames
  8. books
    Application.grailsApplicationPostProcessor
    1. books.Application.grailsApplicationPostProcessor(Application.groovy)
    1 frame
  9. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    4. java.lang.reflect.Method.invoke(Method.java:497)
    4 frames
  10. Springloaded
    ReflectiveInterceptor.jlrMethodInvoke
    1. org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1426)
    1 frame
  11. Spring Beans
    AbstractBeanFactory.getBean
    1. org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162)
    2. org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:588)
    3. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1123)
    4. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1018)
    5. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:510)
    6. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
    7. org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
    8. org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
    9. org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
    10. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
    10 frames
  12. Spring Context
    AbstractApplicationContext.refresh
    1. org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:120)
    2. org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:678)
    3. org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:520)
    3 frames
  13. Spring Boot
    SpringApplication.run
    1. org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:118)
    2. org.springframework.boot.SpringApplication.refresh(SpringApplication.java:766)
    3. org.springframework.boot.SpringApplication.createAndRefreshContext(SpringApplication.java:361)
    4. org.springframework.boot.SpringApplication.run(SpringApplication.java:307)
    4 frames
  14. Grails
    GrailsApp$run.call
    1. grails.boot.GrailsApp.run(GrailsApp.groovy:55)
    2. grails.boot.GrailsApp.run(GrailsApp.groovy:374)
    3. grails.boot.GrailsApp.run(GrailsApp.groovy:363)
    4. grails.boot.GrailsApp$run.call(Unknown Source)
    4 frames
  15. Groovy
    AbstractCallSite.call
    1. org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
    2. org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
    3. org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:133)
    3 frames
  16. books
    Application.main
    1. books.Application.main(Application.groovy:8)
    1 frame