环境:tomcat + oracle
1-从官网下载
2-建立数据库模型
- 执行activiti-5.12.1\database\create下的activiti.oracle.create.*.sql的脚本
3-修改activiti-explorer.war
- 修改activiti-explorer.war\WEB-INF\classes\db.properties脚本为
db=oracle
jdbc.driver=oracle.jdbc.driver.OracleDriver
jdbc.url=jdbc:oracle:thin:@localhost:1521:orcl
jdbc.username=activiti
jdbc.password=activiti
4-发布activiti-explorer.war
5-登录activiti-explorer

6-再次登录
需要修改-查看:官网文档
As said in the one minute demo setup, the Activiti Explorer runs an in-memory H2 database by default. To run the Activiti Explorer with a standalone H2 or another database the db.properties in the WEB-INF/classes of the Activiti Explorer web application should be changed.
In addition, be aware that the Activiti Explorer generates demo user and groups, process definitions and models by default. To disable this, the activiti-standalone-context.xml file in the WEB-INF folder should be changed. To disable the demo setup fully
you can use the following snippet of the demoDataGenerator
bean definition. But as you can see you can also enable and disable items individually.
<bean id="demoDataGenerator" class="org.activiti.explorer.demo.DemoDataGenerator"> <property name="processEngine" ref="processEngine" /> <property name="createDemoUsersAndGroups" value="false" /> <property name="createDemoProcessDefinitions" value="false" /> <property name="createDemoModels" value="false" /> </bean>
否则在下次界面无法显示
若把数据库清空,则会出现
org.springframework.beans.factory.BeanCreationException: Error creating bean wit
h name 'demoDataGenerator' defined in ServletContext resource [/WEB-INF/activiti
-standalone-context.xml]: Cannot resolve reference to bean 'processEngine' while
setting bean property 'processEngine'; nested exception is org.springframework.
beans.factory.BeanCreationException: Error creating bean with name 'processEngin
e': FactoryBean threw exception on object creation; nested exception is java.lan
g.NullPointerException
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creati
ng bean with name 'processEngine': FactoryBean threw exception on object creatio
n; nested exception is java.lang.NullPointerException
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.
doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:149)
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.
getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:102)
ctionInterceptor.java:40)
at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterc
eptor.java:31)
at org.activiti.engine.impl.ProcessEngineImpl.<init>(ProcessEngineImpl.j
ava:76)
at org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl.buildProc
essEngine(ProcessEngineConfigurationImpl.java:365)
at org.activiti.spring.SpringProcessEngineConfiguration.buildProcessEngi
ne(SpringProcessEngineConfiguration.java:64)
at org.activiti.spring.ProcessEngineFactoryBean.getObject(ProcessEngineF
actoryBean.java:56)
at org.activiti.spring.ProcessEngineFactoryBean.getObject(ProcessEngineF
actoryBean.java:32)
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.
doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:142)
... 44 more
2013-7-3 22:28:58 org.apache.catalina.core.StandardContext start
严重: Error listenerStart
2013-7-3 22:28:58 org.apache.catalina.core.StandardContext start
严重: Context [/activiti-explorer] startup failed due to previous errors
2013-7-3 22:28:58 org.apache.catalina.loader.WebappClassLoader clearReferencesJd
bc
严重: A web application registered the JBDC driver [oracle.jdbc.driver.OracleDri
ver] but failed to unregister it when the web application was stopped. To preven
t a memory leak, the JDBC Driver has been forcibly unregistered.
2013-7-3 22:28:58 org.apache.catalina.startup.HostConfig deployDescript
需要把activiti-5.12.1\database\create
insert into ACT_GE_PROPERTY
values ('schema.version', '5.12', 1);
insert into ACT_GE_PROPERTY
values ('schema.history', 'create(5.12)', 1);
insert into ACT_GE_PROPERTY
values ('next.dbid', '1', 1);
脚本执行。
<bean
id="demoDataGenerator"
class="org.activiti.explorer.demo.DemoDataGenerator">
<property name="processEngine"
ref="processEngine"
/>
<property name="createDemoUsersAndGroups"
value="false"
/>
<property name="createDemoProcessDefinitions"
value="false"
/>
<property name="createDemoModels"
value="false"
/>
</bean>
还是修改为 true,待下次登录后修改为false。