cancel
Showing results for 
Search instead for 
Did you mean: 

creating bean with name 'processEngine'

jun
Champ in-the-making
Champ in-the-making
Error creating bean with name 'processEngine' defined in file [D:\tomcat6\apache-tomcat-6.0.32\webapps\sk\WEB-INF\classes\spring\applicationContext-activiti.xml]: Initialization of bean failed; nested exception is java.lang.reflect.MalformedParameterizedTypeException
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:480)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
   at java.security.AccessController.doPrivileged(Native Method)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
   at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
   at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
   at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
   at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:423)
   at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)
   at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)
   at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)
   at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)
   at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)
   at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4205)
3 REPLIES 3

jun
Champ in-the-making
Champ in-the-making
Error creating bean with name 'processEngine' defined in file [D:\tomcat6\apache-tomcat-6.0.32\webapps\sk\WEB-INF\classes\spring\applicationContext-activiti.xml]: Initialization of bean failed; nested exception is java.lang.reflect.MalformedParameterizedTypeException
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:480)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
at java.security.AccessController.doPrivileged(Native Method)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:423)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4205)



Spring configuration

<bean id="gdataSource" class="org.springframework.jdbc.datasource.SimpleDriverDataSource">
 
   <property name="driverClass" value="com.mysql.jdbc.Driver" />
    <property name="url" value="jdbc:mysql://localhost:3306/test?useUnicode=true&amp;characterEncoding=UTF-8" />
    <property name="username" value="root" />
    <property name="password" value="123456" />
   
  </bean>

  <bean id="gtransactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
    <property name="dataSource" ref="gdataSource" />
  </bean>
 
  <bean id="processEngineConfiguration" class="org.activiti.spring.SpringProcessEngineConfiguration">
    <property name="dataSource" ref="dataSource" />
    <property name="transactionManager" ref="gtransactionManager" />
    <property name="databaseSchemaUpdate" value="true" />
    <property name="jobExecutorActivate" value="true" />
  </bean>
 
  <bean id="processEngine" class="org.activiti.spring.ProcessEngineFactoryBean">
    <property name="processEngineConfiguration" ref="processEngineConfiguration" />
  </bean>

frederikherema1
Star Contributor
Star Contributor
Does the stacktrace (further down) say which property it is trying to set? The type of that property is wrong…

chaoyy
Champ in-the-making
Champ in-the-making
I have this problem also.
I defined the dataSource and transactionManager in OSGi evn,then open these by <osgi:service id="osgiDataSource" ref="dataSource" interface="javax.sql.DataSource"/> in other bundle,
then when conf it in activiti-conf.xml, cann't init the activiti's configuration.

what's wrong?