Error deploying an app containing a mule task ro flowable-task webappp

Hi Guys,

I have a workflow with a muletask. When I try to include it in an app and Publish the app it fails and logs that the a class cannot be found for the mule task. I therefore included the mule module as a dependency in the flowable-ui-task-app module as follows:

<!-- Mule Dependency -->
	<dependency>
        <groupId>org.flowable</groupId>
        <artifactId>flowable-mule</artifactId>
	</dependency>

Once I have updated the POM for the flowable-ui-task-app I build it using:

mvn package clean install -DskipTests

I then copy the generated flowable-tasks war to tomcat and restart the container. On restart it is failing when it tries to load the tasks webapp with the following error (See below).

Can anyone point me out where I am going wrong:

Regards

Brian

03-May-2019 16:29:42.304 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive [/opt/tomcat/webapps/flowable-task.war]
03-May-2019 16:29:56.524 INFO [localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
03-May-2019 16:29:58.301 SEVERE [localhost-startStop-1] org.apache.catalina.core.ContainerBase.addChildInternal ContainerBase.addChild: start:
org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/flowable-task]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:754)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:730)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:985)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1857)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NoSuchMethodError: com.lmax.disruptor.dsl.Disruptor.(Lcom/lmax/disruptor/EventFactory;ILjava/util/concurrent/ThreadFactory;Lcom/lmax/disruptor/dsl/ProducerType;Lcom/lmax/disruptor/WaitStrategy;)V
at org.apache.logging.log4j.core.async.AsyncLoggerConfigDisruptor.start(AsyncLoggerConfigDisruptor.java:229)
at org.apache.logging.log4j.core.config.AbstractConfiguration.start(AbstractConfiguration.java:257)
at org.apache.logging.log4j.core.LoggerContext.setConfiguration(LoggerContext.java:545)
at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:617)
at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:634)
at org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:229)
at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:153)
at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:45)
at org.apache.logging.log4j.LogManager.getContext(LogManager.java:194)
at org.apache.commons.logging.LogFactory$Log4jLog.(LogFactory.java:199)
at org.apache.commons.logging.LogFactory$Log4jDelegate.createLog(LogFactory.java:166)
at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:109)
at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:99)
at org.springframework.boot.web.servlet.support.SpringBootServletInitializer.onStartup(SpringBootServletInitializer.java:90)
at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:172)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5245)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
… 10 more

03-May-2019 16:29:58.310 SEVERE [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Error deploying web application archive [/opt/tomcat/webapps/flowable-task.war]
java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/flowable-task]]
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:758)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:730)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:985)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1857)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)

03-May-2019 16:29:58.311 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive [/opt/tomcat/webapps/flowable-task.war] has finished in [16,007] ms

Hi Guys,
Can anyone tell me how I can troubleshoot this. There is nothing in the log that gives me a clue to why it would be failing to deploy. Have I missed anything in adding this module to the task app?
Regards
Brian

Hey Brian,

I think that the flowable-mule artifact is not compatible with Spring Boot 2.x and Spring 5. I think that due to that you are having that exception. I would advise you to use Spring Boot 1.x and Spring 4 if you want to use Mule.

Cheers,
Filip

Hi Filip,

Thanks for that insight.

So if I wanted to build the task-app to use spring boot 1 and spring 4 how should I do this. I tried changing the root pom for the flowable engine to boot 1 and spring 4 but once I do that and then try to build the task app I get missing dependencies. Should I change the task app only?

Alternatively, for now should I consider using an earlier version of flowable that uses spring 4 and boot 1? Is there a flowable version I should consider?

Regards

Brian

In theory you need to align

<spring.framework.version>5.1.6.RELEASE</spring.framework.version>
<spring.security.version>5.1.5.RELEASE</spring.security.version>
<jackson.version>2.9.8</jackson.version>

in the flowable-ui-task/pom.xml. You can have a look at the flowable-spring-boot-sample-rest-1.5.x as well.

NOTE: I am not sure that the Task UI App will work out of the box with Spring Boot, as it might be using some 2.0 features. You might need to do some more changes in there.

Cheers,
Filip