org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'JPAKnowledgeServiceFactory' defined in class path resource [org/hasancansaral/jpaknowledgeservicesample/JPAKnowledgeServiceConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.kie.internal.runtime.StatefulKnowledgeSession]: Factory method 'JPAKnowledgeServiceFactory' threw exception; nested exception is java.lang.IllegalStateException: java.lang.reflect.InvocationTargetException

tip
Do you find the tips below useful? Click on the to mark them and say thanks to poroszd . Or join the community to write better ones.
  1. 0
    samebug tip
    You need to deploy aspectJ (aspectjweaver.jar) together with your application. Add it to your pom.xml
  2. 0

    Factory method 'hystrixCommandAspect' threw exception; nested exception is java.lang.NoClassDefFoundError: org/aspectj/lang/JoinPoint

    Stack Overflow | 5 months ago | 赵祥宇
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hystrixCommandAspect' defined in class path resource [org/springframework/cloud/netflix/hystrix/HystrixCircuitBreakerConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.netflix.hystrix.contrib.javanica.aop.aspectj.HystrixCommandAspect]: Factory method 'hystrixCommandAspect' threw exception; nested exception is java.lang.NoClassDefFoundError: org/aspectj/lang/JoinPoint
  3. 0

    Starting Problem

    GitHub | 1 year ago | elerion
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'preDecorationFilter' defined in class de.codecentric.boot.admin.config.RevereseZuulProxyConfiguration: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.cloud.netflix.zuul.filters.pre.PreDecorationFilter]: Factory method 'preDecorationFilter' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'routeLocator' defined in class de.codecentric.boot.admin.config.RevereseZuulProxyConfiguration: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [de.codecentric.boot.admin.zuul.ApplicationRouteLocator]: Factory method 'routeLocator' threw exception; nested exception is java.lang.NullPointerException
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    running Spring Boot for REST

    Stack Overflow | 3 months ago | Sumit sagar
    org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Tomcat.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.tomcat.jdbc.pool.DataSource]: Factory method 'dataSource' threw exception; nested exception is java.lang.IllegalStateException: Cannot load driver class: oracle.jdbc.driver.OracleDriver
  6. 0

    Has LocalContainerEntityManagerFactoryBean.setPersistenceUnitRootLocation been removed in Spring-Boot 1.4.1

    Stack Overflow | 6 months ago | DaFoot
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean]: Factory method 'entityManagerFactory' threw exception; nested exception is java.lang.NoSuchMethodError: org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.setPersistenceUnitRootLocation(Ljava/lang/String;)V

    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.NullPointerException

      null

      at org.drools.persistence.jta.JtaTransactionManager.getStatus()
    2. Drools :: Persistence :: JPA
      SingleSessionCommandService.<init>
      1. org.drools.persistence.jta.JtaTransactionManager.getStatus(JtaTransactionManager.java:273)[drools-persistence-jpa-6.5.0.Final.jar:6.5.0.Final]
      2. org.drools.persistence.jpa.AbstractPersistenceContextManager.getApplicationScopedEntityManager(AbstractPersistenceContextManager.java:78)[drools-persistence-jpa-6.5.0.Final.jar:6.5.0.Final]
      3. org.drools.persistence.jpa.JpaPersistenceContextManager.getApplicationScopedPersistenceContext(JpaPersistenceContextManager.java:55)[drools-persistence-jpa-6.5.0.Final.jar:6.5.0.Final]
      4. org.drools.persistence.SingleSessionCommandService.<init>(SingleSessionCommandService.java:103)[drools-persistence-jpa-6.5.0.Final.jar:6.5.0.Final]
      4 frames
    3. Java RT
      Constructor.newInstance
      1. sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)[na:1.8.0_121]
      2. sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)[na:1.8.0_121]
      3. sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)[na:1.8.0_121]
      4. java.lang.reflect.Constructor.newInstance(Constructor.java:423)[na:1.8.0_121]
      4 frames
    4. Drools :: Persistence :: JPA
      KnowledgeStoreServiceImpl.newKieSession
      1. org.drools.persistence.jpa.KnowledgeStoreServiceImpl.buildCommandService(KnowledgeStoreServiceImpl.java:171)[drools-persistence-jpa-6.5.0.Final.jar:6.5.0.Final]
      2. org.drools.persistence.jpa.KnowledgeStoreServiceImpl.newKieSession(KnowledgeStoreServiceImpl.java:70)[drools-persistence-jpa-6.5.0.Final.jar:6.5.0.Final]
      3. org.drools.persistence.jpa.KnowledgeStoreServiceImpl.newKieSession(KnowledgeStoreServiceImpl.java:39)[drools-persistence-jpa-6.5.0.Final.jar:6.5.0.Final]
      3 frames
    5. KIE Internal
      JPAKnowledgeService.newStatefulKnowledgeSession
      1. org.kie.internal.persistence.jpa.JPAKnowledgeService.newStatefulKnowledgeSession(JPAKnowledgeService.java:121)[kie-internal-6.5.0.Final.jar:6.5.0.Final]
      1 frame
    6. org.hasancansaral.jpaknowledgeservicesample
      JPAKnowledgeServiceConfiguration$$EnhancerBySpringCGLIB$$a75599c4$$FastClassBySpringCGLIB$$6a4558.invoke
      1. org.hasancansaral.jpaknowledgeservicesample.JPAKnowledgeServiceConfiguration.JPAKnowledgeServiceFactory(JPAKnowledgeServiceConfiguration.java:43)[classes/:na]
      2. org.hasancansaral.jpaknowledgeservicesample.JPAKnowledgeServiceConfiguration$$EnhancerBySpringCGLIB$$a75599c4.CGLIB$JPAKnowledgeServiceFactory$0(<generated>)[classes/:na]
      3. org.hasancansaral.jpaknowledgeservicesample.JPAKnowledgeServiceConfiguration$$EnhancerBySpringCGLIB$$a75599c4$$FastClassBySpringCGLIB$$6a4558.invoke(<generated>)[classes/:na]
      3 frames
    7. Spring Core
      MethodProxy.invokeSuper
      1. org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)[spring-core-4.3.6.RELEASE.jar:4.3.6.RELEASE]
      1 frame
    8. Spring Context
      ConfigurationClassEnhancer$BeanMethodInterceptor.intercept
      1. org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:356)[spring-context-4.3.6.RELEASE.jar:4.3.6.RELEASE]
      1 frame
    9. org.hasancansaral.jpaknowledgeservicesample
      JPAKnowledgeServiceConfiguration$$EnhancerBySpringCGLIB$$a75599c4.JPAKnowledgeServiceFactory
      1. org.hasancansaral.jpaknowledgeservicesample.JPAKnowledgeServiceConfiguration$$EnhancerBySpringCGLIB$$a75599c4.JPAKnowledgeServiceFactory(<generated>)[classes/:na]
      1 frame
    10. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[na:1.8.0_121]
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[na:1.8.0_121]
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[na:1.8.0_121]
      4. java.lang.reflect.Method.invoke(Method.java:498)[na:1.8.0_121]
      4 frames
    11. Spring Beans
      DefaultListableBeanFactory.preInstantiateSingletons
      1. org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162)[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]
      2. org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:588)[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]
      3. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1173)[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]
      4. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1067)[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]
      5. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:513)[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]
      6. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]
      7. org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]
      8. org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]
      9. org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]
      10. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]
      11. org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:761)[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]
      11 frames
    12. Spring Context
      AbstractApplicationContext.refresh
      1. org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:866)[spring-context-4.3.6.RELEASE.jar:4.3.6.RELEASE]
      2. org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:542)[spring-context-4.3.6.RELEASE.jar:4.3.6.RELEASE]
      2 frames
    13. Spring Boot
      SpringApplication.run
      1. org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122)[spring-boot-1.4.4.RELEASE.jar:1.4.4.RELEASE]
      2. org.springframework.boot.SpringApplication.refresh(SpringApplication.java:762)[spring-boot-1.4.4.RELEASE.jar:1.4.4.RELEASE]
      3. org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:372)[spring-boot-1.4.4.RELEASE.jar:1.4.4.RELEASE]
      4. org.springframework.boot.SpringApplication.run(SpringApplication.java:316)[spring-boot-1.4.4.RELEASE.jar:1.4.4.RELEASE]
      5. org.springframework.boot.SpringApplication.run(SpringApplication.java:1187)[spring-boot-1.4.4.RELEASE.jar:1.4.4.RELEASE]
      6. org.springframework.boot.SpringApplication.run(SpringApplication.java:1176)[spring-boot-1.4.4.RELEASE.jar:1.4.4.RELEASE]
      6 frames
    14. org.hasancansaral.jpaknowledgeservicesample
      JPAKnowledgeServiceSample.main
      1. org.hasancansaral.jpaknowledgeservicesample.JPAKnowledgeServiceSample.main(JPAKnowledgeServiceSample.java:15)[classes/:na]
      1 frame