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

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • 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 at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:599)[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1173)[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1067)[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:513)[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE] at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:761)[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE] at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:866)[spring-context-4.3.6.RELEASE.jar:4.3.6.RELEASE] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:542)[spring-context-4.3.6.RELEASE.jar:4.3.6.RELEASE] at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122)[spring-boot-1.4.4.RELEASE.jar:1.4.4.RELEASE] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:762)[spring-boot-1.4.4.RELEASE.jar:1.4.4.RELEASE] at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:372)[spring-boot-1.4.4.RELEASE.jar:1.4.4.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:316)[spring-boot-1.4.4.RELEASE.jar:1.4.4.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1187)[spring-boot-1.4.4.RELEASE.jar:1.4.4.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1176)[spring-boot-1.4.4.RELEASE.jar:1.4.4.RELEASE] at org.hasancansaral.jpaknowledgeservicesample.JPAKnowledgeServiceSample.main(JPAKnowledgeServiceSample.java:15)[classes/:na] Caused by: 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 at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:189)[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE] at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:588)[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE] ... 18 more Caused by: java.lang.IllegalStateException: java.lang.reflect.InvocationTargetException at org.drools.persistence.jpa.KnowledgeStoreServiceImpl.buildCommandService(KnowledgeStoreServiceImpl.java:185)[drools-persistence-jpa-6.5.0.Final.jar:6.5.0.Final] at org.drools.persistence.jpa.KnowledgeStoreServiceImpl.newKieSession(KnowledgeStoreServiceImpl.java:70)[drools-persistence-jpa-6.5.0.Final.jar:6.5.0.Final] at org.drools.persistence.jpa.KnowledgeStoreServiceImpl.newKieSession(KnowledgeStoreServiceImpl.java:39)[drools-persistence-jpa-6.5.0.Final.jar:6.5.0.Final] at org.kie.internal.persistence.jpa.JPAKnowledgeService.newStatefulKnowledgeSession(JPAKnowledgeService.java:121)[kie-internal-6.5.0.Final.jar:6.5.0.Final] at org.hasancansaral.jpaknowledgeservicesample.JPAKnowledgeServiceConfiguration.JPAKnowledgeServiceFactory(JPAKnowledgeServiceConfiguration.java:43)[classes/:na] at org.hasancansaral.jpaknowledgeservicesample.JPAKnowledgeServiceConfiguration$$EnhancerBySpringCGLIB$$a75599c4.CGLIB$JPAKnowledgeServiceFactory$0(<generated>)[classes/:na] at org.hasancansaral.jpaknowledgeservicesample.JPAKnowledgeServiceConfiguration$$EnhancerBySpringCGLIB$$a75599c4$$FastClassBySpringCGLIB$$6a4558.invoke(<generated>)[classes/:na] at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)[spring-core-4.3.6.RELEASE.jar:4.3.6.RELEASE] at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:356)[spring-context-4.3.6.RELEASE.jar:4.3.6.RELEASE] at org.hasancansaral.jpaknowledgeservicesample.JPAKnowledgeServiceConfiguration$$EnhancerBySpringCGLIB$$a75599c4.JPAKnowledgeServiceFactory(<generated>)[classes/:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[na:1.8.0_121] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[na:1.8.0_121] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[na:1.8.0_121] at java.lang.reflect.Method.invoke(Method.java:498)[na:1.8.0_121] at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162)[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE] ... 19 more Caused by: java.lang.reflect.InvocationTargetException: null at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)[na:1.8.0_121] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)[na:1.8.0_121] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)[na:1.8.0_121] at java.lang.reflect.Constructor.newInstance(Constructor.java:423)[na:1.8.0_121] at org.drools.persistence.jpa.KnowledgeStoreServiceImpl.buildCommandService(KnowledgeStoreServiceImpl.java:171)[drools-persistence-jpa-6.5.0.Final.jar:6.5.0.Final] ... 33 more Caused by: java.lang.NullPointerException: null at org.drools.persistence.jta.JtaTransactionManager.getStatus(JtaTransactionManager.java:273)[drools-persistence-jpa-6.5.0.Final.jar:6.5.0.Final] at org.drools.persistence.jpa.AbstractPersistenceContextManager.getApplicationScopedEntityManager(AbstractPersistenceContextManager.java:78)[drools-persistence-jpa-6.5.0.Final.jar:6.5.0.Final] at org.drools.persistence.jpa.JpaPersistenceContextManager.getApplicationScopedPersistenceContext(JpaPersistenceContextManager.java:55)[drools-persistence-jpa-6.5.0.Final.jar:6.5.0.Final] at org.drools.persistence.SingleSessionCommandService.<init>(SingleSessionCommandService.java:103)[drools-persistence-jpa-6.5.0.Final.jar:6.5.0.Final] ... 38 more
No Bugmate found.