I thought I will share on this forum an issue which we faced and maybe a suggestion on this.
We have a war running activiti as a jar withn it (Spring). When deploying to tomcat and starting up it worked fine.
The issue occurred when we used an automated tool which had fewer rights on this box. When deploying the server looked to hang after the first Activiti update statement was run.
We looked at everything but we could not understand the problem. When we looked at the thread dump the below showed up:
"main" prio=10 tid=0x000000000639e000 nid=0x5725 runnable [0x000000004060c000] java.lang.Thread.State: RUNNABLE at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method) at sun.awt.X11GraphicsEnvironment.access$200(X11GraphicsEnvironment.java:65) at sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment.java:110) at java.security.AccessController.doPrivileged(Native Method) at sun.awt.X11GraphicsEnvironment.<clinit>(X11GraphicsEnvironment.java:74) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:186) at java.awt.GraphicsEnvironment.createGE(GraphicsEnvironment.java:102) at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:81) - locked <0x00000000fbaae550> (a java.lang.Class for java.awt.GraphicsEnvironment) at java.awt.image.BufferedImage.createGraphics(BufferedImage.java:1152) at org.activiti.engine.impl.bpmn.diagram.ProcessDiagramCanvas.<init>(ProcessDiagramCanvas.java:148) at org.activiti.engine.impl.bpmn.diagram.ProcessDiagramCanvas.<init>(ProcessDiagramCanvas.java:172) at org.activiti.engine.impl.bpmn.diagram.ProcessDiagramGenerator.initProcessDiagramCanvas(ProcessDiagramGenerator.java:508) at org.activiti.engine.impl.bpmn.diagram.ProcessDiagramGenerator.generateDiagram(ProcessDiagramGenerator.java:300) at org.activiti.engine.impl.bpmn.diagram.ProcessDiagramGenerator.generateDiagram(ProcessDiagramGenerator.java:327) at org.activiti.engine.impl.bpmn.diagram.ProcessDiagramGenerator.generatePngDiagram(ProcessDiagramGenerator.java:285) at org.activiti.engine.impl.bpmn.deployer.BpmnDeployer.deploy(BpmnDeployer.java:106) at org.activiti.engine.impl.persistence.deploy.DeploymentCache.deploy(DeploymentCache.java:38) at org.activiti.engine.impl.persistence.entity.DeploymentManager.insertDeployment(DeploymentManager.java:44)
This led us to change the processEngineConfiguration setting to config.setCreateDiagramOnDeploy(false) which resolved this issue.
The suggestion is that would it be better if we keep this setting to false as a default. Especially with automated deployments this could come up as an issue. Wanted to know your thoughts on this?
What do you mean by "automated deployments"? If you deploy an activiti app, it should be configured correctly according to the environment it's going to be on. Exactly the same as with other properties, we try to select a sensible default, which we did: generate diagrams on deploy.
We are using a script which logs into the unix box and calls the tomcat start. When we did this using a manual login with the same user it was working fine. Still not sure if the automated script did not have all the rights to access the resources in the box which may have been the issue!