Mvn clean compile install of camunda-webapp

Hi @Deniss_Makarenkov,

could you please describe steps that you did so far? You added custom plugin as I understand, which extra files have you added and which guidelines have you been following?

Cheers,
Askar

Hi @aakhmerov ,

thanks for your quick reply. Currently I am just trying to clean compile install the initial camunda web app from your git repository. No changes or additions whatsoever :slight_smile:

Regards,
Deniss Makarenkov

Hi @Deniss_Makarenkov,

ok, that sounds fine. So which steps have you performed exactly to build and deploy?

Cheers,
Askar

Hey @aakhmerov,

I clone the webapp repo, use the master branch and do mvn clean package install. There are some JS related dependancy errors during the process but the build succeeds.

After that I deploy the compiled WAR file to Camunda Tomcat distribution. I try to access the camunda-webapp application, but I get a lot of errors. Basically the application doesn’t work.

Are there any specific requirements for npm, node, grunt version installations?
Thanks and kind regards,
Deniss Makarenkov

@Deniss_Makarenkov,

I am using node version v4.7.2. There should be no errors in maven build process related to JS build. And I am not sure that you can just deploy that .war file in tomcat, it is usually used as dependency during distro packaging, so I would assume you need to build your distro after webapp is installed to your local maven repository.

Cheers,
Askar

@aakhmerov what do you mean by ‘build your distro’? Use vanilla tomcat and setup my built camunda webapp on it?

That’s a bit strange, because I do not remember doing that a few years ago while also doing something similar. I do however remember that I had a few problems while building the web application and those were related to versions of npm.

If you want I can give you the log of the build process.

My npm and node versions are the following:
npm: 3.10.10
node: v6.9.5

I really need to build it, because I want to implement custom angular directives and modules and other js dependencies…

Kind regards,
Deniss

@Deniss_Makarenkov,

the distro is built from this repository: https://github.com/camunda/camunda-bpm-platform

please try downgrading your node to 4.7.x that might help.

Cheers,
Askar.

@aakhmerov ahh you may be right. I may have built the whole bpm-platform before a few years back.
I will try out now and will let you know.

Thanks a lot for your help!

Kind regards,
Deniss

@aakhmerov The build of the distro fails on this test:

org.camunda.bpm.engine.test.bpmn.async.AsyncEmailTaskTest

with the following error stack.

Tests run: 2, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 30.77 sec <<< FAILURE! - in     org.camunda.bpm.engine.test.bpmn.async.AsyncEmailTaskTest
    testSimpleTextMail(org.camunda.bpm.engine.test.bpmn.async.AsyncEmailTaskTest)  Time elapsed: 15.468 sec  <<< ERROR!
    org.camunda.bpm.engine.ProcessEngineException: time limit of 10000 was exceeded
            at org.camunda.bpm.engine.impl.test.AbstractProcessEngineTestCase.waitForJobExecutorToProcessAllJobs(AbstractProcessEngineTestCase.java:276)
            at org.camunda.bpm.engine.test.bpmn.async.AsyncEmailTaskTest.testSimpleTextMail(AsyncEmailTaskTest.java:38)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            at java.lang.reflect.Method.invoke(Method.java:498)
            at junit.framework.TestCase.runTest(TestCase.java:176)
            at junit.framework.TestCase.runBare(TestCase.java:141)
            at org.camunda.bpm.engine.impl.test.AbstractProcessEngineTestCase.runBare(AbstractProcessEngineTestCase.java:111)
            at junit.framework.TestResult$1.protect(TestResult.java:122)
            at junit.framework.TestResult.runProtected(TestResult.java:142)
            at junit.framework.TestResult.run(TestResult.java:125)
            at junit.framework.TestCase.run(TestCase.java:129)
            at junit.framework.TestSuite.runTest(TestSuite.java:255)
            at junit.framework.TestSuite.run(TestSuite.java:250)
            at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:84)
            at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:264)
            at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153)
            at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:124)
            at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:200)
            at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153)
            at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)

    testSimpleTextMailSendTask(org.camunda.bpm.engine.test.bpmn.async.AsyncEmailTaskTest)  Time elapsed: 15.302 sec  <<< ERROR!
    org.camunda.bpm.engine.ProcessEngineException: time limit of 10000 was exceeded
            at org.camunda.bpm.engine.impl.test.AbstractProcessEngineTestCase.waitForJobExecutorToProcessAllJobs(AbstractProcessEngineTestCase.java:276)
            at org.camunda.bpm.engine.test.bpmn.async.AsyncEmailTaskTest.testSimpleTextMailSendTask(AsyncEmailTaskTest.java:57)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            at java.lang.reflect.Method.invoke(Method.java:498)
            at junit.framework.TestCase.runTest(TestCase.java:176)
            at junit.framework.TestCase.runBare(TestCase.java:141)
            at org.camunda.bpm.engine.impl.test.AbstractProcessEngineTestCase.runBare(AbstractProcessEngineTestCase.java:111)
            at junit.framework.TestResult$1.protect(TestResult.java:122)
            at junit.framework.TestResult.runProtected(TestResult.java:142)
            at junit.framework.TestResult.run(TestResult.java:125)
            at junit.framework.TestCase.run(TestCase.java:129)
            at junit.framework.TestSuite.runTest(TestSuite.java:255)
            at junit.framework.TestSuite.run(TestSuite.java:250)
            at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:84)
            at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:264)
            at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153)
            at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:124)
            at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:200)
            at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153)
            at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)

Maybe there are some configurations required for mailing tests?

Thanks and kind regards,
Deniss

@Deniss_Makarenkov,

no, it shouldn’t fail. You can of course try to build with skipping tests, not sure that this will help you though. Which java version are you using and which maven version?

Cheers,
Askar

@aakhmerov
I remember that I had failing tests also before while trying to compile version 7.4 and I skipped them, which isn’t the right way.
java version “1.8.0_121”
Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T18:41:47+02:00)

@Deniss_Makarenkov,

you will need jdk 6 or 7 to pass integration tests for sure. I would also recommend to use oracle jdk, since that’s what we use on our build systems.

Cheers,
Askar

1 Like

Hi @aakhmerov

Switching to JDK 7 didn’t cure the test problems… I’ve turned off the emailing test mentioned above, and now I’m getting this test failure:

ests run: 12, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.259 sec <<< FAILURE! - in org.camunda.bpm.engine.rest.MetricsRestServiceInteractionTest
testGetInterval(org.camunda.bpm.engine.rest.MetricsRestServiceInteractionTest)  Time elapsed: 0.088 sec  <<< FAILURE!
java.lang.AssertionError: 3 expectations failed.
JSON path [0].timestamp doesn't match.
Expected: 1970-01-01T01:45:00
  Actual: 1970-01-01T03:45:00

JSON path [1].timestamp doesn't match.
Expected: 1970-01-01T01:30:00
  Actual: 1970-01-01T03:30:00

JSON path [2].timestamp doesn't match.
Expected: 1970-01-01T01:15:00
  Actual: 1970-01-01T03:15:00

	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
	at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:80)
	at org.codehaus.groovy.reflection.CachedConstructor.doConstructorInvoke(CachedConstructor.java:74)
	at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrap.callConstructor(ConstructorSite.java:84)
	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:60)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:235)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:247)
	at com.jayway.restassured.internal.ResponseSpecificationImpl$HamcrestAssertionClosure.validate(ResponseSpecificationImpl.groovy:573)
	at com.jayway.restassured.internal.ResponseSpecificationImpl$HamcrestAssertionClosure$validate$1.call(Unknown Source) 

Any idea?

@Deniss_Makarenkov, do you have timezone set on your jvm globally using extra parameters?

Cheers,
Askar.

@aakhmerov
I’m trying to build this through intellij idea and maybe this is passing something by itself. I guess I can pass the timezone parameter manually… Which one are you guys using?

@Deniss_Makarenkov,

I’d rather suggest building using command line. Will be cleaner.

Cheers,
Askar

1 Like

@aakhmerov thanks! Doing it through the command line went ok.

I found my conversation with Camunda developer Sebastian Menski from last year and they said that:

To build the Camunda Webapp you have to use node v0.10.x (latest is v0.10.42) and npm v2 (latest is v2.14.19).

and about the missing js deps errors:

the Camunda Webapps are not node v4 and especially npm v3 ready. With npm v3 the dependency handling was changed
which will let to missing dependencies in the Camunda Webapps. This is what your are currently experiencing.

So it looks like that I only need to build the webapps project in order to change the tasklist and etc. I will try that out today and let you know if I succeeded or not.

Thanks and regards,
Deniss

Hi, @aakhmerov

I managed to build both camunda bpm-platform and camunda-webapp but I can’t figure out how I can make for example a simple change in the task list html page and then package that with camunda-bpm-platform war…

I see that when I build the camunda-bpm-platform it gets embedded tomcat distro webapp from your mvn repo. How can I configure it not do it and instead get my version of camunda-webapp?

Thanks in advance!

Kind regards,
Deniss

Hi @Deniss_Makarenkov,

just install modified webapp into your local maven repo. mvn clean install and then build distro.

Cheers,
Askar.

Hi,

I’m trying to understand how it works to use the webapps…
I downloaded the source code from Release 7.7.0 · camunda/camunda-bpm-webapp · GitHub
I opened it in IntelliJ IDE and did a clean-package-install successfully.
Then I have a full distribution downloaded, Wildfly 10 - 7.7.
So, I took the camunda-webapp.war file generated from the webapps project and dropped it in

\camunda-bpm-wildfly10-7.7.0\server\wildfly-10.1.0.Final\standalone\deployments

folder, but it’s not being deployed.
I get this stack trace error:

> 11:13:56,212 INFO  [org.jboss.as.repository] (DeploymentScanner-threads - 1) WFLYDR0001: Content added at location C:\camunda-bpm-wildfly10-7.7.0\server\wildfly-10.1.0.Final\standalone\data\content\76\5449543c323a10ace172e3b48a5e2b7846252f\content
> 11:13:57,666 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-1) WFLYSRV0028: Stopped deployment camunda-webapp.war (runtime-name: camunda-webapp.war) in 1414ms
> 11:13:57,671 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-7) WFLYSRV0027: Starting deployment of "camunda-webapp.war" (runtime-name: "camunda-webapp.war")
> 11:14:01,275 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 121) MSC000001: Failed to start service jboss.undertow.deployment.default-server.default-host./camunda-webapp: org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./camunda-webapp: java.lang.NoClassDefFoundError: org/camunda/bpm/engine/ProcessEngineException
> 	at org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:85)
> 	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)
> 	at org.jboss.threads.JBossThread.run(JBossThread.java:320)
> Caused by: java.lang.NoClassDefFoundError: org/camunda/bpm/engine/ProcessEngineException
> 	at org.camunda.bpm.cockpit.impl.web.bootstrap.CockpitContainerBootstrap$CockpitEnvironment.setup(CockpitContainerBootstrap.java:56)
> 	at org.camunda.bpm.cockpit.impl.web.bootstrap.CockpitContainerBootstrap.contextInitialized(CockpitContainerBootstrap.java:36)
> 	at io.undertow.servlet.core.ApplicationListeners.contextInitialized(ApplicationListeners.java:187)
> 	at io.undertow.servlet.core.DeploymentManagerImpl$1.call(DeploymentManagerImpl.java:200)
> 	at io.undertow.servlet.core.DeploymentManagerImpl$1.call(DeploymentManagerImpl.java:171)
> 	at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:42)
> 	at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
> 	at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
> 	at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
> 	at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
> 	at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
> 	at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
> 	at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:234)
> 	at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:100)
> 	at org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:82)
> 	... 6 more
> Caused by: java.lang.ClassNotFoundException: org.camunda.bpm.engine.ProcessEngineException from [Module "deployment.camunda-webapp.war:main" from Service Module Loader]
> 	at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:198)
> 	at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:363)
> 	at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:351)
> 	at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:93)
> 	... 21 more
> 
> 11:14:01,324 ERROR [org.jboss.as.controller.management-operation] (DeploymentScanner-threads - 1) WFLYCTL0013: Operation ("full-replace-deployment") failed - address: ([]) - failure description: {
>     "WFLYCTL0080: Failed services" => {"jboss.undertow.deployment.default-server.default-host./camunda-webapp" => "org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./camunda-webapp: java.lang.NoClassDefFoundError: org/camunda/bpm/engine/ProcessEngineException
>     Caused by: java.lang.NoClassDefFoundError: org/camunda/bpm/engine/ProcessEngineException
>     Caused by: java.lang.ClassNotFoundException: org.camunda.bpm.engine.ProcessEngineException from [Module \"deployment.camunda-webapp.war:main\" from Service Module Loader]"},
>     "WFLYCTL0412: Required services that are not installed:" => ["jboss.undertow.deployment.default-server.default-host./camunda-webapp"],
>     "WFLYCTL0180: Services with missing/unavailable dependencies" => undefined
> }
> 11:14:01,412 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 1) WFLYSRV0016: Replaced deployment "camunda-webapp.war" with deployment "camunda-webapp.war"
> 11:14:01,413 INFO  [org.jboss.as.controller] (DeploymentScanner-threads - 1) WFLYCTL0183: Service status report
> WFLYCTL0184:    New missing/unsatisfied dependencies:
>       service jboss.deployment.unit."camunda-webapp.war".component."com.sun.faces.config.ConfigureListener".START (unavailable) dependents: [service jboss.deployment.unit."camunda-webapp.war".deploymentCompleteService] 
>       service jboss.deployment.unit."camunda-webapp.war".component."javax.faces.webapp.FacetTag".START (unavailable) dependents: [service jboss.deployment.unit."camunda-webapp.war".deploymentCompleteService] 
>       service jboss.deployment.unit."camunda-webapp.war".component."javax.servlet.jsp.jstl.tlv.PermittedTaglibsTLV".START (unavailable) dependents: [service jboss.deployment.unit."camunda-webapp.war".deploymentCompleteService] 
>       service jboss.deployment.unit."camunda-webapp.war".component."javax.servlet.jsp.jstl.tlv.ScriptFreeTLV".START (unavailable) dependents: [service jboss.deployment.unit."camunda-webapp.war".deploymentCompleteService] 
>       service jboss.deployment.unit."camunda-webapp.war".component."org.camunda.bpm.admin.impl.web.bootstrap.AdminContainerBootstrap".START (unavailable) dependents: [service jboss.deployment.unit."camunda-webapp.war".deploymentCompleteService] 
>       service jboss.deployment.unit."camunda-webapp.war".component."org.camunda.bpm.cockpit.impl.web.bootstrap.CockpitContainerBootstrap".START (unavailable) dependents: [service jboss.deployment.unit."camunda-webapp.war".deploymentCompleteService] 
>       service jboss.deployment.unit."camunda-webapp.war".component."org.camunda.bpm.engine.rest.filter.CacheControlFilter".START (unavailable) dependents: [service jboss.deployment.unit."camunda-webapp.war".deploymentCompleteService] 
>       service jboss.deployment.unit."camunda-webapp.war".component."org.camunda.bpm.tasklist.impl.web.bootstrap.TasklistContainerBootstrap".START (unavailable) dependents: [service jboss.deployment.unit."camunda-webapp.war".deploymentCompleteService] 
>       service jboss.deployment.unit."camunda-webapp.war".component."org.camunda.bpm.webapp.impl.engine.ProcessEnginesFilter".START (unavailable) dependents: [service jboss.deployment.unit."camunda-webapp.war".deploymentCompleteService] 
>       service jboss.deployment.unit."camunda-webapp.war".component."org.camunda.bpm.webapp.impl.security.auth.AuthenticationFilter".START (unavailable) dependents: [service jboss.deployment.unit."camunda-webapp.war".deploymentCompleteService] 
>       service jboss.deployment.unit."camunda-webapp.war".component."org.camunda.bpm.webapp.impl.security.filter.SecurityFilter".START (unavailable) dependents: [service jboss.deployment.unit."camunda-webapp.war".deploymentCompleteService] 
>       service jboss.deployment.unit."camunda-webapp.war".component."org.camunda.bpm.welcome.impl.web.bootstrap.WelcomeContainerBootstrap".START (unavailable) dependents: [service jboss.deployment.unit."camunda-webapp.war".deploymentCompleteService] 
>       service jboss.deployment.unit."camunda-webapp.war".component."org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher".START (unavailable) dependents: [service jboss.deployment.unit."camunda-webapp.war".deploymentCompleteService] 
>       service jboss.undertow.deployment.default-server.default-host./camunda-webapp (unavailable) dependents: [service jboss.deployment.unit."camunda-webapp.war".deploymentCompleteService] 
> WFLYCTL0186:   Services which failed to start:      service jboss.undertow.deployment.default-server.default-host./camunda-webapp
>       service jboss.undertow.deployment.default-server.default-host./camunda-webapp: org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./camunda-webapp: java.lang.NoClassDefFoundError: org/camunda/bpm/engine/ProcessEngineException

Any idea?

Thanks!