JBPM 6.2 -Spring Integration
maulee17 Dec 11, 2015 8:00 AMHi I am using Spring based configuration for my JBPM spring integration. Following is my spring config, giving exception in creating task service. Spring version is 4.0.2.
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) |
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'taskService' defined in class path resource [com/citi/earth/jbpm/resource/earth-jbpm-config.xml]: Cannot create inner bean 'org.jbpm.services.task.audit.JPATaskLifeCycleEventListener#6bf9b5' of type [org.jbpm.services.task.audit.JPATaskLifeCycleEventListener] while setting bean property 'listeners' with key [0]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.jbpm.services.task.audit.JPATaskLifeCycleEventListener#6bf9b5' defined in class path resource [com/citi/earth/jbpm/resource/earth-jbpm-config.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.jbpm.services.task.audit.JPATaskLifeCycleEventListener]: No default constructor found; nested exception is java.lang.NoSuchMethodException: org.jbpm.services.task.audit.JPATaskLifeCycleEventListener.<init>()
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:282) | |
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:121) | |
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveManagedList(BeanDefinitionValueResolver.java:351) | |
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:154) | |
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1456) | |
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1197) | |
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:537) | |
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475) | |
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:304) | |
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228) | |
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:300) | |
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:195) | |
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:320) | |
... 40 more |
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.jbpm.services.task.audit.JPATaskLifeCycleEventListener#6bf9b5' defined in class path resource [com/citi/earth/jbpm/resource/earth-jbpm-config.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.jbpm.services.task.audit.JPATaskLifeCycleEventListener]: No default constructor found; nested exception is java.lang.NoSuchMethodException: org.jbpm.services.task.audit.JPATaskLifeCycleEventListener.<init>()
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1076) | |
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1021) | |
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:504) | |
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475) | |
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:269) | |
... 52 more |
Caused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.jbpm.services.task.audit.JPATaskLifeCycleEventListener]: No default constructor found; nested exception is java.lang.NoSuchMethodException: org.jbpm.services.task.audit.JPATaskLifeCycleEventListener.<init>()
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:85) | |
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1069) | |
... 56 more |
Caused by: java.lang.NoSuchMethodException: org.jbpm.services.task.audit.JPATaskLifeCycleEventListener.<init>()
at java.lang.Class.getConstructor0(Class.java:2902) | |
at java.lang.Class.getDeclaredConstructor(Class.java:2066) | |
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:80) | |
... 57 more
spring-config.xml ============= <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:drools="http://drools.org/schema/drools-spring" xmlns:jee="http://www.springframework.org/schema/jee" xmlns:util="http://www.springframework.org/schema/util" xmlns:context="http://www.springframework.org/schema/context" xmlns:tx="http://www.springframework.org/schema/tx" xmlns:aop="http://www.springframework.org/schema/aop" xsi:schemaLocation="http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-3.0.xsd http://drools.org/schema/drools-spring http://drools.org/schema/drools-spring.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd">
<!-- <context:annotation-config /> <context:component-scan base-package="com.citi.earth.jbpm" />
<bean class="org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor" />-->
<bean id="btmConfig" factory-method="getConfiguration" class="bitronix.tm.TransactionManagerServices"> </bean>
<bean id="BitronixTransactionManager" factory-method="getTransactionManager" class="bitronix.tm.TransactionManagerServices" depends-on="btmConfig" destroy-method="shutdown"> </bean>
<bean id="jbpmTxManager" class="org.springframework.transaction.jta.JtaTransactionManager"> <property name="transactionManager" ref="BitronixTransactionManager" /> <property name="userTransaction" ref="BitronixTransactionManager" /> <property name="allowCustomIsolationLevels" value="true" /> </bean>
<bean id="runtimeEnvironment" class="org.kie.spring.factorybeans.RuntimeEnvironmentFactoryBean"> <property name="type" value="DEFAULT" /> <property name="entityManagerFactory" ref="entityManagerFactory" /> <property name="transactionManager" ref="jbpmTxManager" /> <property name="userGroupCallback" ref="userGroupCallBackImpl" /> <property name="taskService" ref="taskService" /> <property name="assets"> <map> <entry key-ref="process"> <util:constant static-field="org.kie.api.io.ResourceType.BPMN2" /> </entry> </map> </property> </bean>
<bean id="userGroupCallBackImpl" class="com.jbpm.workflow.UserGroupCallbackImpl"> </bean>
<bean id="runtimeManager" class="org.kie.spring.factorybeans.RuntimeManagerFactoryBean" destroy-method="close"> <property name="type" value="PER_REQUEST" /> <property name="identifier" value="spring-rm" /> <property name="runtimeEnvironment" ref="runtimeEnvironment" /> </bean>
<bean id="taskService" class="org.kie.spring.factorybeans.TaskServiceFactoryBean" destroy-method="close"> <property name="entityManagerFactory" ref="entityManagerFactory" /> <property name="transactionManager" ref="jbpmTxManager" /> <property name="listeners"> <list> <bean class="org.jbpm.services.task.audit.JPATaskLifeCycleEventListener" /> </list> </property> </bean>
<bean id="logService" class="org.jbpm.process.audit.JPAAuditLogService"> <constructor-arg> <ref bean="entityManagerFactory" /> </constructor-arg> </bean>
<bean id="jbpmMessageSource" class="org.springframework.context.support.ReloadableResourceBundleMessageSource"> <property name="basenames"> <list> <value>classpath:jBPMEarthFaultMessage</value> <!-- <value>classpath:com/jbpm/config/jBPMFaultMessage </value> --> </list> </property> <property name="defaultEncoding" value="UTF-8" /> </bean>
<bean id="taskTimeout" class="java.lang.Long"> <constructor-arg type="long"> <value>500000</value> </constructor-arg> </bean>
</beans> |