spring+activiti启动报错Tables missing
 <bean id="processEngineConfiguration" class="org.activiti.spring.SpringProcessEngineConfiguration">
        <property name="dataSource" ref="dataSource" />
        <property name="transactionManager" ref="transactionManager" />
        <property name="databaseSchemaUpdate" value="false" />
        <property name="jobExecutorActivate" value="false" />
        <property name="databaseType" value="mysql" />
        <property name="activityFontName" value="宋体" />
        <property name="labelFontName" value="宋体" />
    </bean> 

    <bean id="processEngine" class="org.activiti.spring.ProcessEngineFactoryBean">
        <property name="processEngineConfiguration" ref="processEngineConfiguration" />
    </bean>

    <bean id="repositoryService" factory-bean="processEngine"
        factory-method="getRepositoryService" />
    <bean id="runtimeService" factory-bean="processEngine"
        factory-method="getRuntimeService" />
    <bean id="formService" factory-bean="processEngine"
        factory-method="getFormService" />
    <bean id="identityService" factory-bean="processEngine"
        factory-method="getIdentityService" />
    <bean id="taskService" factory-bean="processEngine"
        factory-method="getTaskService" />
    <bean id="historyService" factory-bean="processEngine"
        factory-method="getHistoryService" />
    <bean id="managementService" factory-bean="processEngine"
        factory-method="getManagementService" />

spring+activiti启动报错org.activiti.engine.ActivitiException: Activiti database problem: Tables missing for component(s) engine, history, identity
请求大神指教

0

3个回答

pom.xml

 <activiti.version>5.15.1</activiti.version>
        <activiti.engine.version>5.15.1</activiti.engine.version>

        <!-- activiti -->
            <dependency>
                <groupId>org.activiti</groupId>
                <artifactId>activiti-engine</artifactId>
                <version>${activiti.engine.version}</version>
            </dependency>
            <dependency>
                <groupId>org.activiti</groupId>
                <artifactId>activiti-spring</artifactId>
                <version>${activiti.version}</version>
            </dependency>
            <dependency>
                <groupId>org.activiti</groupId>
                <artifactId>activiti-json-converter</artifactId>
                <version>${activiti.version}</version>
            </dependency>

            <dependency>
                <groupId>org.activiti</groupId>
                <artifactId>activiti-explorer</artifactId>
                <version>${activiti.version}</version>
                <exclusions>
                    <exclusion>
                        <artifactId>vaadin</artifactId>
                        <groupId>com.vaadin</groupId>
                    </exclusion>
                    <exclusion>
                        <artifactId>dcharts-widget</artifactId>
                        <groupId>org.vaadin.addons</groupId>
                    </exclusion>
                    <exclusion>
                        <artifactId>activiti-simple-workflow</artifactId>
                        <groupId>org.activiti</groupId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.activiti</groupId>
                <artifactId>activiti-modeler</artifactId>
                <version>${activiti.version}</version>
            </dependency>
            <dependency>
                <groupId>org.activiti</groupId>
                <artifactId>activiti-rest</artifactId>
                <version>${activiti.version}</version>
            </dependency>
            <dependency>
                <groupId>org.activiti</groupId>
                <artifactId>activiti-diagram-rest</artifactId>
                <version>${activiti.version}</version>
            </dependency>
            <dependency>
                <groupId>org.activiti</groupId>
                <artifactId>activiti-cxf</artifactId>
                <version>${activiti.version}</version>
            </dependency>
            <dependency>
                <groupId>org.mybatis</groupId>
                <artifactId>mybatis</artifactId>
                <version>3.2.7</version>
            </dependency>
            <!-- activiti end -->

spring-activiti.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:p="http://www.springframework.org/schema/p"
    xmlns:context="http://www.springframework.org/schema/context"
    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
        http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd">

    <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource">
        <property name="driverClassName" value="${jdbc.driverClassName}" />
        <property name="url" value="${jdbc.url}" />
        <property name="username" value="${jdbc.username}" />
        <property name="password" value="${jdbc.password}" />
    </bean>

    <bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
        <property name="dataSource" ref="dataSource" />
    </bean>

    <!-- Activiti begin -->
    <bean id="processEngineConfiguration" class="org.activiti.spring.SpringProcessEngineConfiguration">
        <property name="dataSource" ref="dataSource" />
        <property name="transactionManager" ref="transactionManager" />
        <property name="databaseSchemaUpdate" value="false" />
        <property name="jobExecutorActivate" value="false" />
        <property name="databaseType" value="mysql" />
        <property name="activityFontName" value="宋体" />
        <property name="labelFontName" value="宋体" />
    </bean> 

    <bean id="processEngine" class="org.activiti.spring.ProcessEngineFactoryBean">
        <property name="processEngineConfiguration" ref="processEngineConfiguration" />
    </bean>

    <bean id="repositoryService" factory-bean="processEngine"
        factory-method="getRepositoryService" />
    <bean id="runtimeService" factory-bean="processEngine"
        factory-method="getRuntimeService" />
    <bean id="formService" factory-bean="processEngine"
        factory-method="getFormService" />
    <bean id="identityService" factory-bean="processEngine"
        factory-method="getIdentityService" />
    <bean id="taskService" factory-bean="processEngine"
        factory-method="getTaskService" />
    <bean id="historyService" factory-bean="processEngine"
        factory-method="getHistoryService" />
    <bean id="managementService" factory-bean="processEngine"
        factory-method="getManagementService" />
    <!-- Activiti end -->
</beans>  

生成表如下:
图片说明

项目启动报错如下(尝试过只导入activiti-engine和activiti-spring依然报错):

 [org.activiti.engine.impl.interceptor.LogInterceptor] -                                                                                                     
  [org.activiti.engine.impl.interceptor.LogInterceptor] - --- starting SchemaOperationsProcessEngineBuild --------------------------------------------------------
  [org.activiti.spring.SpringTransactionInterceptor] - Running command with propagation NOT_SUPPORTED
  [org.apache.ibatis.transaction.managed.ManagedTransaction] - Opening JDBC Connection
  [org.activiti.engine.impl.persistence.entity.PropertyEntity.selectDbSchemaVersion] - ==>  Preparing: select VALUE_ from ACT_GE_PROPERTY where NAME_ = 'schema.version' 
  [org.springframework.jdbc.datasource.DataSourceUtils] - Fetching JDBC Connection from DataSource
  [org.springframework.jdbc.datasource.DataSourceUtils] - Registering transaction synchronization for JDBC Connection
  [org.activiti.engine.impl.persistence.entity.PropertyEntity.selectDbSchemaVersion] - ==> Parameters: 
  [org.activiti.engine.impl.persistence.entity.PropertyEntity.selectDbSchemaVersion] - <==      Total: 1
  [org.activiti.engine.impl.interceptor.CommandContext] - Error while closing command context
  org.activiti.engine.ActivitiException: Activiti database problem: Tables missing for component(s) engine, history, identity
    at org.activiti.engine.impl.db.DbSqlSession.dbSchemaCheckVersion(DbSqlSession.java:673)
    at org.activiti.engine.impl.db.DbSqlSession.performSchemaOperationsProcessEngineBuild(DbSqlSession.java:1142)
    at org.activiti.engine.impl.SchemaOperationsProcessEngineBuild.execute(SchemaOperationsProcessEngineBuild.java:25)
    at org.activiti.engine.impl.interceptor.CommandInvoker.execute(CommandInvoker.java:24)
    at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:57)
    at org.activiti.spring.SpringTransactionInterceptor$1.doInTransaction(SpringTransactionInterceptor.java:47)
    at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:130)
    at org.activiti.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:45)
    at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:37)
    at org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:40)
    at org.activiti.engine.impl.ProcessEngineImpl.<init>(ProcessEngineImpl.java:74)
    at org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl.buildProcessEngine(ProcessEngineConfigurationImpl.java:390)
    at org.activiti.spring.SpringProcessEngineConfiguration.buildProcessEngine(SpringProcessEngineConfiguration.java:61)
    at org.activiti.spring.ProcessEngineFactoryBean.getObject(ProcessEngineFactoryBean.java:56)
    at org.activiti.spring.ProcessEngineFactoryBean.getObject(ProcessEngineFactoryBean.java:32)
    at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:142)
    at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:102)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1442)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:248)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
    at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:353)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1015)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:911)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:485)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:609)
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:918)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:469)
    at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:383)
    at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:283)
    at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:111)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4939)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5434)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
    at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:663)
    at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1642)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)
[org.springframework.jdbc.datasource.DataSourceTransactionManager] - Creating new transaction with name [null]: PROPAGATION_REQUIRED,ISOLATION_DEFAULT
  [org.springframework.jdbc.datasource.DataSourceTransactionManager] - Acquired Connection [jdbc:mysql://localhost:3306/mysql, UserName=root@localhost, MySQL Connector Java] for JDBC transaction
  [org.springframework.jdbc.datasource.DataSourceTransactionManager] - Switching JDBC Connection [jdbc:mysql://localhost:3306/mysql, UserName=root@localhost, MySQL Connector Java] to manual commit
  [org.apache.ibatis.transaction.managed.ManagedTransaction] - Closing JDBC Connection [Transaction-aware proxy for target Connection [jdbc:mysql://localhost:3306/mysql, UserName=root@localhost, MySQL Connector Java]]
  [org.springframework.jdbc.datasource.DataSourceUtils] - Returning JDBC Connection to DataSource
  [org.springframework.transaction.support.TransactionTemplate] - Initiating transaction rollback on application exception
  org.activiti.engine.ActivitiException: Activiti database problem: Tables missing for component(s) engine, history, identity
    at org.activiti.engine.impl.db.DbSqlSession.dbSchemaCheckVersion(DbSqlSession.java:673)
    at org.activiti.engine.impl.db.DbSqlSession.performSchemaOperationsProcessEngineBuild(DbSqlSession.java:1142)
    at org.activiti.engine.impl.SchemaOperationsProcessEngineBuild.execute(SchemaOperationsProcessEngineBuild.java:25)
    at org.activiti.engine.impl.interceptor.CommandInvoker.execute(CommandInvoker.java:24)
    at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:57)
    at org.activiti.spring.SpringTransactionInterceptor$1.doInTransaction(SpringTransactionInterceptor.java:47)
    at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:130)
    at org.activiti.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:45)
    at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:37)
    at org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:40)
    at org.activiti.engine.impl.ProcessEngineImpl.<init>(ProcessEngineImpl.java:74)
    at org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl.buildProcessEngine(ProcessEngineConfigurationImpl.java:390)
    at org.activiti.spring.SpringProcessEngineConfiguration.buildProcessEngine(SpringProcessEngineConfiguration.java:61)
    at org.activiti.spring.ProcessEngineFactoryBean.getObject(ProcessEngineFactoryBean.java:56)
    at org.activiti.spring.ProcessEngineFactoryBean.getObject(ProcessEngineFactoryBean.java:32)
    at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:142)
    at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:102)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1442)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:248)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
    at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:353)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1015)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:911)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:485)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:609)
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:918)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:469)
    at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:383)
    at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:283)
    at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:111)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4939)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5434)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
    at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:663)
    at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1642)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)
[org.springframework.jdbc.datasource.DataSourceTransactionManager] - Should roll back transaction but cannot - no transaction available
  [org.activiti.engine.impl.interceptor.LogInterceptor] - --- SchemaOperationsProcessEngineBuild finished --------------------------------------------------------
  [org.activiti.engine.impl.interceptor.LogInterceptor] -                                                                                                     
  [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@5aa4a4a9: defining beans [transactionManager_activiti,processEngineConfiguration,processEngine,repositoryService,runtimeService,formService,identityService,taskService,historyService,managementService,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,IUserServiceImpl,activitiController,IUserController,org.springframework.context.support.PropertySourcesPlaceholderConfigurer#0,dataSource,sqlSessionFactory,org.mybatis.spring.mapper.MapperScannerConfigurer#0,transactionManager,org.springframework.aop.config.internalAutoProxyCreator,org.springframework.transaction.annotation.AnnotationTransactionAttributeSource#0,org.springframework.transaction.interceptor.TransactionInterceptor#0,org.springframework.transaction.config.internalTransactionAdvisor,cachManager,credentialsMatcher,userRealm,securityManager,shiroFilter,lifecycleBeanPostProcessor,ehcache,org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping#0,org.springframework.format.support.FormattingConversionServiceFactoryBean#0,org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter#0,org.springframework.web.servlet.handler.MappedInterceptor#0,org.springframework.web.servlet.mvc.method.annotation.ExceptionHandlerExceptionResolver#0,org.springframework.web.servlet.mvc.annotation.ResponseStatusExceptionResolver#0,org.springframework.web.servlet.mvc.support.DefaultHandlerExceptionResolver#0,org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping,org.springframework.web.servlet.mvc.HttpRequestHandlerAdapter,org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter,org.springframework.web.servlet.resource.DefaultServletHttpRequestHandler#0,org.springframework.web.servlet.handler.SimpleUrlHandlerMapping#0,org.springframework.web.servlet.view.InternalResourceViewResolver#0,org.springframework.context.annotation.ConfigurationClassPostProcessor$ImportAwareBeanPostProcessor#0,IUserDao]; root of factory hierarchy
  [org.springframework.beans.factory.support.DisposableBeanAdapter] - Invoking destroy() on bean with name 'processEngine'
  [org.apache.shiro.spring.LifecycleBeanPostProcessor] - Destroying bean [securityManager]...
  [org.apache.shiro.spring.LifecycleBeanPostProcessor] - Destroying bean [cachManager]...
  [org.springframework.web.context.ContextLoader] - Context initialization failed
  org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'processEngine': FactoryBean threw exception on object creation; nested exception is org.activiti.engine.ActivitiException: Activiti database problem: Tables missing for component(s) engine, history, identity
    at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:149)
    at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:102)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1442)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:248)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
    at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:353)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1015)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:911)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:485)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:609)
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:918)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:469)
    at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:383)
    at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:283)
    at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:111)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4939)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5434)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
    at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:663)
    at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1642)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)
Caused by: org.activiti.engine.ActivitiException: Activiti database problem: Tables missing for component(s) engine, history, identity
    at org.activiti.engine.impl.db.DbSqlSession.dbSchemaCheckVersion(DbSqlSession.java:673)
    at org.activiti.engine.impl.db.DbSqlSession.performSchemaOperationsProcessEngineBuild(DbSqlSession.java:1142)
    at org.activiti.engine.impl.SchemaOperationsProcessEngineBuild.execute(SchemaOperationsProcessEngineBuild.java:25)
    at org.activiti.engine.impl.interceptor.CommandInvoker.execute(CommandInvoker.java:24)
    at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:57)
    at org.activiti.spring.SpringTransactionInterceptor$1.doInTransaction(SpringTransactionInterceptor.java:47)
    at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:130)
    at org.activiti.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:45)
    at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:37)
    at org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:40)
    at org.activiti.engine.impl.ProcessEngineImpl.<init>(ProcessEngineImpl.java:74)
    at org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl.buildProcessEngine(ProcessEngineConfigurationImpl.java:390)
    at org.activiti.spring.SpringProcessEngineConfiguration.buildProcessEngine(SpringProcessEngineConfiguration.java:61)
    at org.activiti.spring.ProcessEngineFactoryBean.getObject(ProcessEngineFactoryBean.java:56)
    at org.activiti.spring.ProcessEngineFactoryBean.getObject(ProcessEngineFactoryBean.java:32)
    at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:142)
    ... 32 more
十二月 06, 2017 7:20:17 下午 org.apache.catalina.core.StandardContext listenerStart
严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'processEngine': FactoryBean threw exception on object creation; nested exception is org.activiti.engine.ActivitiException: Activiti database problem: Tables missing for component(s) engine, history, identity
    at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:149)
    at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:102)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1442)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:248)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
    at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:353)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1015)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:911)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:485)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:609)
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:918)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:469)
    at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:383)
    at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:283)
    at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:111)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4939)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5434)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
    at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:663)
    at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1642)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)
Caused by: org.activiti.engine.ActivitiException: Activiti database problem: Tables missing for component(s) engine, history, identity
    at org.activiti.engine.impl.db.DbSqlSession.dbSchemaCheckVersion(DbSqlSession.java:673)
    at org.activiti.engine.impl.db.DbSqlSession.performSchemaOperationsProcessEngineBuild(DbSqlSession.java:1142)
    at org.activiti.engine.impl.SchemaOperationsProcessEngineBuild.execute(SchemaOperationsProcessEngineBuild.java:25)
    at org.activiti.engine.impl.interceptor.CommandInvoker.execute(CommandInvoker.java:24)
    at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:57)
    at org.activiti.spring.SpringTransactionInterceptor$1.doInTransaction(SpringTransactionInterceptor.java:47)
    at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:130)
    at org.activiti.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:45)
    at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:37)
    at org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:40)
    at org.activiti.engine.impl.ProcessEngineImpl.<init>(ProcessEngineImpl.java:74)
    at org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl.buildProcessEngine(ProcessEngineConfigurationImpl.java:390)
    at org.activiti.spring.SpringProcessEngineConfiguration.buildProcessEngine(SpringProcessEngineConfiguration.java:61)
    at org.activiti.spring.ProcessEngineFactoryBean.getObject(ProcessEngineFactoryBean.java:56)
    at org.activiti.spring.ProcessEngineFactoryBean.getObject(ProcessEngineFactoryBean.java:32)
    at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:142)
    ... 32 more

哪位前辈大神能指点一下是什么原因吗?

0

尝试将processEngineConfiguration中的属性修改:

true时,会自动更新表,插入版本数据

0

问题已解决,可以看我的博客

-1
an341221
欣赏月光 回复sinat_27815631: https://blog.csdn.net/an341221/article/details/79003035
大约一年之前 回复
sinat_27815631
软件猿 给个链接啊,兄dei
大约一年之前 回复
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
2-activiti数据库介绍以及配置文件
activiti与spring整合需要的jar包 &amp;lt;!-- activiti jar --&amp;gt; &amp;lt;dependency&amp;gt; &amp;lt;groupId&amp;gt;org.activiti&amp;lt;/groupId&amp;gt; &amp;lt;artifactId&amp;gt;activiti-engine&amp;lt;/artifactId&amp;gt; ...
【持续更新】activiti+boot配置入门各种坑以及出现问题解决
初创文章,麻烦大家给出批评意见。 由于是跟随大佬的脚步走,附上大佬的学习的地址: ----------------------------------------------------------------------------------》 原创作者链接:http://blog.csdn.net/acmman/article/details/60466278 ---------
解决activiti-explorer在tomcat启动中报错
首先下载activiti的压缩包后,去下面的war包中找到activiti-explorer.war,然后用WinRAR解压出来,将解压的放在tomcat的wabapps下,去运行tomcat的bin下的startup.bat,启动。由于我在启动前,在数据库中将表已经建好,所以启动时报错。并且通过他的命令行的窗口并不能看到错误信息,要看到错误信息,可以通过在项目的WEB-INF下的class中创建
解决内网开发springboot整合activiti无法引入或者启动报错问题,自己做记录用的
在开发中遇到的问题:在局域网中开发,springboot整合activiti 在pom 文件中引入 &amp;lt;dependency&amp;gt; &amp;lt;groupId&amp;gt;org.activiti&amp;lt;/groupId&amp;gt; &amp;lt;artifactId&amp;gt;activiti-spring-boot-starter-basic&amp;lt;/artifactId&amp;gt; ...
SpringBoot启动执行activiti时数据库报错解决办法
SpringBoot启动的时候报了如下错误: java.sql.SQLException: sql injection violation, syntax error: syntax error, error in :'cade on update cascade',expect ON, actual ON on : alter table ACT_RU_EXECUTION  add cons...
activit流程引擎启动流程报错
代码如下: 目录结构 ProcessEngine processEngine = ProcessEngines.getDefaultProcessEngine(); @Test public void deploymentProcessEngines(){ InputStream inputStreamBpmn = this.getClass().getResourceA
Activit新特性
1、DML规则引擎2、Decision Table决策表3、CallActivity调用活动新增BusinessKey
springboot整合activiti报错[processes/]不存在解决方案
springboot整合activiti时,启动抛异常 nested exception is java.io.FileNotFoundException: class path resource [processes/] cannot be resolved to URL because it does not exist。两种处理方法 (1)在resource目录下添加processes文...
activiti工作流过程中报错
流程中自动生成的表act_property中的版本最好不要去修改这个表里的数据最好不要去改动,如果遇到什么数据库的版本高于引擎版本,空指针或者其他错误需要改到这里的话,执行JUnit Test,跑通了后改回最初自动创建表时的版本,不然后面还会有很多错误,可能很难找出来,但是可能都是这个版本的问题,所以不要动到这里。错误1:org.activiti.engine.ActivitiException:...
Activiti启动项目不能自动创建和更新表的问题
activiti配置文件的配置如下:                                                                          根据activiti官方文档的配置要求来看,没有什么问题,但是启动后报错 ### The error may exist in org/activiti/db/mapping/ent
springboot2 与activiti7(官方)
springboot2和activity7的集成。包括代码和pom文件。有问题留言
【求助】Spring Boot 2 与Activiti 7 整合出现打开URL出现signin问题
Spring Boot 2 与Activiti 7 整合出现,打开URL出现signin问题,界面如下: 感觉有点莫名其妙,在pom.xml中没有引用spring-boot-starter-security。通过查看maven项目依赖jar中,确实有security相关的包。 后来查看,项目的dependencies关系,发现是activiti-spring-boot-starter包的依赖项中存...
关于activiti的springMVC + myBatis项目pom.xml文件的简单配置
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">   4.0.0   com.activiti.test   springMVCMaven   war   0.0.1-SNAPSHOT   springMVCMaven Maven Webapp
spring boot 整合 activiti 踩过的坑 (持续更新)
1.首先是maven添加依赖各种报错。 org.activiti activiti-spring-boot-starter-basic 5.22.0 尝试数次,无效,改天再次尝试,成功。 2.后来使用5.17版本,成功 org.activiti spring-boot-starter-basic 5.17
activiti监听类加载不了spring
获取springbean的方法 package com.zjxx.jp.Util; import org.springframework.beans.BeansException; import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationConte
有关使用Drools的Decision Tables(决策表)注意事项
1.使用EXCEL作为决策表时,如果单元格中有设置“12,23”形式的参数值,请注意一定将所有这些单元格的格式设置为文本格式,如果是数字格式,表面看似完全正确的表格,却无法正常运行,耽误你很多的时间去发现这个小错误。比如我就在使用Rule Templates时,用EXCEL作为数据来源,在测试过程中,始终报告“[color=red]org.drools.runtime.rule.Consequen...
activiti自定义流程之Spring整合activiti-modeler实例(一):环境搭建
项目中需要整合activiti-modeler自定义流程,找了很多资料后,终于成功的跳转到activiti-modeler流程设计界面,以下是记录: 一、整合基础:eclipse4.4.1、tomcat7、jdk1.7、mysql5.6.25、maven3.2.5、activiti5.16.3、spring4.0.9 二、步骤:    1、下载activiti-5.16.3.zip: h
spring cloud踩坑集锦
1.启动spring cloud,创建完成后页面出现报错 FreeMarker template error (DEBUG mode; use RETHROW in production!): The following has evaluated to null or missing: ==&amp;gt; replica.key [in template &quot;eureka/navbar.ftl&quot; at...
activiti Spring集成activiti工作流中没有表报错解决方案
在Spring的bean.xml中配置的连接中作如下修改 databaseSchemaUpdate属性的取值: flase: 默认值。activiti在启动时,会对比数据库表中保存的版本,如果没有表或者版本不匹配,将抛出异常。 true: activiti会对数据库中所有表进行更新操作。如果表不存在,则自动创建。 create_drop: 在acti
Activiti工作流引擎web设计器activiti-webapp-explorer2-5.22.0(已汉化)
Activiti工作流引擎web设计器activiti-webapp-explorer2-5.22.0(已汉化) 修改数据库配置,直接运行tomcat即可
SpringBoot集成Java Mail邮箱发送邮件以及异步发送邮件
1.Maven jar包依赖 &amp;amp;amp;amp;amp;amp;amp;lt;!-- Inherit defaults from Spring Boot --&amp;amp;amp;amp;amp;amp;amp;gt; &amp;amp;amp;amp;amp;amp;amp;lt;parent&amp;amp;amp;amp;amp;amp;amp;gt; &amp;amp;amp;amp;amp;amp;amp;lt;groupId&amp;amp;amp;amp;am
activiti designer 5.18.0和eclipse补丁
eclipse插件activiti designer 5.18.0和对应补丁 org.eclipse.emf.transaction_1.4.0.201306111400.jar org.eclipse.emf.validation.ui_1.7.0.201403111711.jar org.eclipse.emf.validation_1.8.0.201403111711.jar org.eclipse.emf.workspace_1.5.1.201306111400.jar
activiti在使用oracle数据库时出现建表错误
activiti在使用oracle数据库时出现建表错误 错误出现环境 在activiti中配置了oracle作为数据源,刚开始的时候没有在ProcessEngineConfiguration或SpringProcessEngineConfiguration中配置DatabaseSchema属性,导致创建数据库出错(该错误在mysql中没有出现),后来参考网上的方法添加了该属性,具体原因请点击这里
eclipse安装activiti报错
eclipse安装activiti报错,缺少jar包。具体报错如下: Cannot complete the install because one or more required items could not be found. Software being installed: Activiti Eclipse BPMN 2.0 Designer 5.18.0.201508100929 (org.activiti.designer.feature.feature.group 5.18.0.201508100929) Missing requirement: Activiti Eclipse BPMN 2.0 Designer 5.18.0.201508100929 (org.activiti.designer.feature.feature.group 5.18.0.201508100929) requires 'org.eclipse.emf.transaction 1.4.0' but it could not be found
Spring启动报错
启动报错 Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.   Error starting ApplicationContext. To display the conditions report re-run ...
activiti官方demo在Tomcat中报错启动不了问题
下载了最新的activiti-explorer,然后把war包放Tomcat的webapps目录下,启动Tomcat,报错了,就一个error,找不到原因,后来查看各种 2016-12-28 8:33:01 org.apache.catalina.core.AprLifecycleListener init 信息: The APR based Apache Tomcat Native libr
工作流Activiti的学习总结(一)安装条件以及各步骤的作用以及不同环境需要lib包
 最近项目中使用工作流activiti,采用activiti-rest方式。下载将activiti学习过程总的总结作一下分享。希望大家拍砖。谢谢!   工作流activiti的下载地址:      http://activiti.org/download.html 工作流activiti的必须的软件 JDK5+,Ant1.81+,Eclipse3.6.2 JDK:查看版本 jav
ACTIVITI工作流(其他)-Activiti 监听器中获得Spring容器
在Activiti工作流与spring集成过程中,因为activiti监听器的实例化不是通过spring容器,由activiti自己控制。所以如果监听器想要获取spring容器。通过servletContext获取spring容器。(本方法的实现依赖于spring mvc)
activiti-eclipse插件5.18.0,可直接本地安装,不需联网
activitii 插件,5.18.0可直接本地安装,亲测有效,photon也可安装
Activiti使用oracle数据库部署流程实例启动流程实例报错
create table ACT_GE_PROPERTY (  NAME_ NVARCHAR2(64),  VALUE_ NVARCHAR2(300),  REV_ INTEGER,  primary key (NAME_)  ) java.sql.SQLSyntaxErrorException: ORA-00955: 名称已由现有对象使用 java.sql.SQLIntegrityConstr...
spring boot整合activiti modeler实例源码下载
spring boot 1.5.3整合activiti modeler 5.22.0,详细参考:http://blog.csdn.net/chenhai201/article/details/72668275
activiti工作流的监听类调用spring中的been
在我们使用activiti监听类的时候有时需要调用spring中的been,但是你会发现如果在监听类中直接引入been会报null指针异常。
Activiti 6.0快速体验~!
今天我们测试一下Activiti6.0快速体验一下,简单的了解下流程,首先我们说明下我们的环境,主要是在linux上进行体验,具体环境如下: java 1.8.0_111 tomcat 8 contOS 7 1、首先通过wget方法获取activiti6.0版本的zip包,进行解压。 wget https://github.com/Activiti/Activiti/releases/d...
activiti工作流与Spring整合配置
Spring版本:4.2.6.RELEASEactiviti版本:5.18.0版本号:applicationContext-activiti.xml   &amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&amp;gt; &amp;lt;beans xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xmlns=&quot;http:/...
activiti-explorer 与spring整合
activiti-explorer 与spring整合,可在浏览器进行流程图编辑
Activiti5.20.0整合spring4.15示例,整合流程编辑器modeler
Activiti5.20.0整合spring4.15示例,整合流程编辑器modeler; 项目导入myeclipse后,请先看doc文件夹下的readme.txt说明文档!
Activiti集成到spring中配置
1、导入activiti相应的jar包 适用maven,在pox.xml中配置&amp;amp;amp;lt;dependency&amp;amp;amp;gt; &amp;amp;amp;lt;groupId&amp;amp;amp;gt;org.activiti&amp;amp;amp;lt;/groupId&amp;amp;amp;gt; &amp;amp;amp;lt;artifactId&amp;amp;amp;gt;activiti-en
使用assembly打出的独立可执行jar包启动时报错spring错误的解决方法
<br />      有一个小工程,使用了spring,在使用maven的assembly打包成独立可执行的jar包后,在执行时报如下错误:<br /> Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace<br />       网上对这个问题也有提及,这是assembly的一个bug.参见:http://jira.codehaus.org/browse/MASSEMBLY-3
activiti之spring管理监听器的方法
以下博客为转载,原文博客:http://blog.csdn.net/v_will/article/details/78001453这篇文章主要记录流程监听器的部分用法,整个环境实在集成在spring下,ssm环境: 三个监听器:A:普通javaBean: package com.abc.activiti.listenner; import org.activiti.engine
Spring事务和Activiti事务
一、Spring事务   1、事务传播行为种类(注解方式)    参考文章:http://blog.csdn.net/nyistzp/article/details/9012275 @Transactional(propagation=Propagation.REQUIRED) public Integer initOrderSeqProcess(OrderSeq or
文章热词 机器学习教程 Objective-C培训 交互设计视频教程 颜色模型 设计制作学习
相关热词 mysql关联查询两次本表 native底部 react extjs glyph 图标 怎么学习互联网大数据 村干部学习大数据心得