cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to run Getting started: 10 minute tutorial from user guide

manchandap
Champ in-the-making
Champ in-the-making
Respected Activiti Experts.

I am new to Activiti and evaluating (version 5.14) it for use in our organization. As a beginner, I am going through the User Guide available at http://www.activiti.org/userguide/index.html .

I am not able to deploy the Financial Report process definition provided in the 10 minutes tutorial (http://www.activiti.org/userguide/index.html#10minutetutorial). The new business process in not available in Activiti Explorer and I am getting an exception in the tomcat console during server start up.
<!–break–>
The details of the same are follows:

i am able to run both the web applications activiti-explorer and activiti-rest in Tomcat. To run the Financial Report process definition I have done the following:

# Deployed Activiti Explorer on Tomcat
# Started Tomcat
# Created a main class as provided in the 10 minute tutorial to run the Financial Report business process. I did following modification to code from tutorial, to add DB details

   private static final String DB_TYPE = "h2";
   private static final String JDBC_DRIVER = "org.h2.Driver";
   private static final String JDBC_URL = "jdbc:h2:mem:activiti;DB_CLOSE_DELAY=1000";
   private static final String JDBC_USERNAME = "sa";
   private static final String JDBC_PWD = "";

ProcessEngineConfiguration standAloneProcessConfig = (StandaloneProcessEngineConfiguration)ProcessEngineConfiguration
             .createStandaloneProcessEngineConfiguration();
      
       standAloneProcessConfig.setJdbcDriver(JDBC_DRIVER);
       standAloneProcessConfig.setJdbcPassword(JDBC_PWD);
       standAloneProcessConfig.setJdbcUrl(JDBC_URL);
       standAloneProcessConfig.setJdbcUsername(JDBC_USERNAME);
       standAloneProcessConfig.setDatabaseType(DB_TYPE);
       standAloneProcessConfig.setDatabaseSchemaUpdate("true");
      
        ProcessEngine processEngine = standAloneProcessConfig.buildProcessEngine();


The rest of the code is same as in the tutorial. On running the TenMinutesTutorial, I get following output in the java console:
<blockcode>
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Following task is available for accountancy group: Write monthly financial report
Task for fozzie: Write monthly financial report
Number of tasks for fozzie: 0
Following task is available for accountancy group: Verify monthly financial report
Process instance end time: Wed Mar 05 11:54:26 GMT+05:30 2014
</blockcode>
To me this indicates that the business process was deployed successfully to the same DB being used by Activiti Explorer, since the DB properties are same.

I restarted the tomcat after running this class

But this new process definition is not visible in the Activiti Explorer, as mentioned in the tutorial. Also, tomcat throws following exception on start up:
<blockcode>
11:13:30,384 [localhost-startStop-1] INFO  org.springframework.web.context.ContextLoader  - Root WebApplicationContext: initialization completed in 12752 ms
Mar 05, 2014 11:13:30 AM org.apache.catalina.session.StandardManager doLoad
SEVERE: IOException while loading persisted sessions: java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: org.activiti.workflow.simple.converter.json.SimpleWorkflowJsonConverter
java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException
: org.activiti.workflow.simple.converter.json.SimpleWorkflowJsonConverter
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1351)
        at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1964)
        at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1888)
        at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1771)
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1347)
        at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1964)
        at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1888)
        at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1771)
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1347)
        at java.io.ObjectInputStream.readObject(ObjectInputStream.java:369)
        at java.util.LinkedList.readObject(LinkedList.java:1136)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:1004)       
       at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1866)
        at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1771)
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1347)
        at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1964)
        at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1888)
        at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1771)
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1347)
        at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1964)
        at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1888)
        at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1771)
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1347)
        at java.io.ObjectInputStream.readObject(ObjectInputStream.java:369)
        at org.apache.catalina.session.StandardSession.readObject(StandardSession.java:1595)
        at org.apache.catalina.session.StandardSession.readObjectData(StandardSession.java:1060)
        at org.apache.catalina.session.StandardManager.doLoad(StandardManager.java:284)
        at org.apache.catalina.session.StandardManager.load(StandardManager.java:204)
        at org.apache.catalina.session.StandardManager.startInternal(StandardManager.java:491)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5294)
        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:618)
        at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:963)
        at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1600)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
        at java.util.concurrent.FutureTask.run(FutureTask.java:166)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
        at java.lang.Thread.run(Thread.java:722)
Caused by: java.io.NotSerializableException: org.activiti.workflow.simple.converter.json.SimpleWorkflowJsonConverter
        at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1180)
        at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1528)
        at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1493)
        at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1416)
        at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1174)
        at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1528)
        at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1493)
        at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1416)
        at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1174)
        at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:346)
        at java.util.LinkedList.writeObject(LinkedList.java:1118)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:975)
        at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1480)
        at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1416)
        at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1174)
        at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1528)
        at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1493)
        at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1416)
        at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1174)
        at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1528)
        at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1493)
        at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1416)
        at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1174)
        at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:346)
        at org.apache.catalina.session.StandardSession.writeObject(StandardSession.java:1671)
        at org.apache.catalina.session.StandardSession.writeObjectData(StandardSession.java:1077)
        at org.apache.catalina.session.StandardManager.doUnload(StandardManager.java:432)
        at org.apache.catalina.session.StandardManager.unload(StandardManager.java:353)
        at org.apache.catalina.session.StandardManager.stopInternal(StandardManager.java:518)
        at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)
        at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5474)
        at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)
        at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1575)
        at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1564)
        … 5 more

Mar 05, 2014 11:13:31 AM org.apache.catalina.session.StandardManager startInternal
SEVERE: Exception loading sessions from persistent storage java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException
: org.activiti.workflow.simple.converter.json.SimpleWorkflowJsonConverter
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1351)
        at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1964)
        at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1888)
        at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1771)
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1347)
        at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1964)
        at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1888)
        at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1771)
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1347)
        at java.io.ObjectInputStream.readObject(ObjectInputStream.java:369)
        at java.util.LinkedList.readObject(LinkedList.java:1136)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:1004)
        at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1866)
        at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1771)
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1347)
        at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1964)
        at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1888)
        at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1771)
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1347)
        at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1964)
        at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1888)
        at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1771)
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1347)
        at java.io.ObjectInputStream.readObject(ObjectInputStream.java:369)
        at org.apache.catalina.session.StandardSession.readObject(StandardSession.java:1595)
        at org.apache.catalina.session.StandardSession.readObjectData(StandardSession.java:1060)
        at org.apache.catalina.session.StandardManager.doLoad(StandardManager.java:284)
        at org.apache.catalina.session.StandardManager.load(StandardManager.java:204)
        at org.apache.catalina.session.StandardManager.startInternal(StandardManager.java:491)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5294)
        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:618)
        at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:963)
        at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1600)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
        at java.util.concurrent.FutureTask.run(FutureTask.java:166)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
        at java.lang.Thread.run(Thread.java:722)
Caused by: java.io.NotSerializableException: org.activiti.workflow.simple.converter.json.SimpleWorkflowJsonConverter
        at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1180)
        at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1528)
        at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1493)
        at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1416)
        at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1174)
        at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1528)
        at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1493)
        at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1416)
        at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1174)
        at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:346)
        at java.util.LinkedList.writeObject(LinkedList.java:1118)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:975)
        at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1480)
        at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1416)
        at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1174)
        at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1528)
        at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1493)
        at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1416)
        at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1174)
        at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1528)
        at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1493)
        at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1416)
        at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1174)
        at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:346)
        at org.apache.catalina.session.StandardSession.writeObject(StandardSession.java:1671)
        at org.apache.catalina.session.StandardSession.writeObjectData(StandardSession.java:1077)
        at org.apache.catalina.session.StandardManager.doUnload(StandardManager.java:432)
        at org.apache.catalina.session.StandardManager.unload(StandardManager.java:353)
        at org.apache.catalina.session.StandardManager.stopInternal(StandardManager.java:518)
        at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)
        at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5474)
        at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)
        at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1575)
        at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1564)
        … 5 more

Mar 05, 2014 11:13:32 AM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive C:\myApp\apache-tomcat-7.0.29\webapps\activiti-rest.war
</blockcode>
Any pointers towards the reason for the same would be really helpful.
3 REPLIES 3

frederikherema1
Star Contributor
Star Contributor
That exception can be safely ignored. This is just telling you the previous sessions (stored by the container after shutdown) cannot be loaded. This has NO effect on the engine itself, whatsoever, only on the sessions created before the container rebooted…

manchandap
Champ in-the-making
Champ in-the-making
Thanks for the reply. I tried another example (from Activiti in Action source) code and landed into the similar problem. After server reboot I am not able to log on into the Activiti Explorer. I am attaching the process definition for the same.

Also, I noticed (with both the process definitions) that when i deploy them programmatically, the deployment process name is null. I think I need to call some method on the API to set the name explicitly. My DB entries show:
<code>
Select * from ACT_RE_DEPLOYMENT
</code>
<blockcode>
ID_ NAME_                                  CATEGORY_ DEPLOY_TIME_
23 Demo processes             NULL  2014-03-06 17:32:09.127
41 Demo reports                     NULL  2014-03-06 17:32:10.303
6617 MyFinancialReportTimerProcess.bpmn20.xml NULL  2014-03-10 10:21:04.663
6701 NULL                              NULL  2014-03-10 16:15:35.187
6801 NULL                              NULL  2014-03-10 16:19:50.400
</blockcode>
The last 2 processes (6701 and 6801) are deployed programmatically

jbarrez
Star Contributor
Star Contributor
Deployments don't need a name to be functional, so that's ok.

You can provide a name during deployment if you want it.

Not being able to log in is more cumbersome? Do you see your user still in the db after reboot?