Mvn clean compile install of camunda-webapp


#1

Hi,

I’m trying to compile and install a custom version of your engine which includes some additional JS dependencies. I’m now trying just to compile and install a clean version of version 7.7.0-Snapshot.

As far as I understand the maven process goes ok, but I cannot access anything (admin, cockpit, tasklist).

When I try to access the admin panel, the following errors are thrown and the admin panel just freezes:

camunda-admin-bootstrap.js?bust=7.7.0-SNAPSHOT-1492970023069:1 GET http://localhost:8080/camunda-webapp/api/admin/plugin/adminPlugins/static/app/plugin.css

require.js:1 GET http://localhost:8080/camunda-webapp/api/admin/plugin/adminPlugins/static/app/plugin.js?bust=7.7.0-SNAPSHOT-1492970023069

Uncaught Error: Script error for "admin-plugin-adminPlugins/plugin"
http://requirejs.org/docs/errors.html#scripterror
    at makeError (require.js:1)
    at HTMLScriptElement.onScriptError (require.js:1)

I’ve done the same procedure before but a few years back. I don’t quite remember if there was anything specific that I had to do. I used the Tomcat distribution with Camunda preinstalled (v7.6) right now.

Any help is appreciated! Thanks in advance.

Kind regards,
Deniss


Camunda plateform use camunda webapps to build project
#2

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


#3

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


#4

Hi @Deniss_Makarenkov,

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

Cheers,
Askar


#5

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


#6

@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


#7

@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


Create a custom docker camunda-bpm-platform
#8

@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.


#9

@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


#10

@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


#11

@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


#12

@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)


#13

@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


#14

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?


#15

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

Cheers,
Askar.


#16

@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?


#17

@Deniss_Makarenkov,

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

Cheers,
Askar


#18

@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


#19

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


#20

Hi @Deniss_Makarenkov,

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

Cheers,
Askar.