Unable to get Build success on Linux

Confluence User - 08 Oct, 2022

I have done and redone the instructions at Build Source Code on Linux but always end up with these errors. I have checked the jwdb database and connectivity to it. It looks like "Failed to load ApplicationContext" is a common factor. This is a new clean Linux 18 server only modified per the instructions given. Thanks in advance, Bill


Results :

Tests in error: 
  testEscapeJS(org.joget.commons.util.TestStringUtil): Failed to load ApplicationContext
  testStripHtmlRelaxed(org.joget.commons.util.TestStringUtil): Failed to load ApplicationContext
  testEscapeHTML(org.joget.commons.util.TestStringUtil): Failed to load ApplicationContext
  testEscapeJSON(org.joget.commons.util.TestStringUtil): Failed to load ApplicationContext
  testEscapeJava(org.joget.commons.util.TestStringUtil): Failed to load ApplicationContext
  testEscapeNl2Br(org.joget.commons.util.TestStringUtil): Failed to load ApplicationContext
  testEscapeRegex(org.joget.commons.util.TestStringUtil): Failed to load ApplicationContext
  testStripHtmlTag(org.joget.commons.util.TestStringUtil): Failed to load ApplicationContext
  testEscapeExpression(org.joget.commons.util.TestStringUtil): Failed to load ApplicationContext
  testStripAllHtmlTag(org.joget.commons.util.TestStringUtil): Failed to load ApplicationContext
  testEscapeImg2Base64(org.joget.commons.util.TestStringUtil): Failed to load ApplicationContext
  testEscapeSeparator(org.joget.commons.util.TestStringUtil): Failed to load ApplicationContext
  testEscapeSQL(org.joget.commons.util.TestStringUtil): Failed to load ApplicationContext
  testEscapeURL(org.joget.commons.util.TestStringUtil): Failed to load ApplicationContext
  testEscapeXML(org.joget.commons.util.TestStringUtil): Failed to load ApplicationContext

Tests run: 15, Failures: 0, Errors: 15, Skipped: 0

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for wflow-app 7.0-SNAPSHOT:
[INFO] 
[INFO] wflow-jdbc ......................................... SUCCESS [  1.163 s]
[INFO] wflow-commons ...................................... FAILURE [ 16.973 s]
[INFO] wflow-plugin-base .................................. SKIPPED
[INFO] wflow-plugin-archetype ............................. SKIPPED
[INFO] wflow-directory .................................... SKIPPED
[INFO] wflow-wfengine ..................................... SKIPPED
[INFO] wflow-core ......................................... SKIPPED
[INFO] wflow-consoleweb ................................... SKIPPED
[INFO] wflow-app .......................................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  18.485 s
[INFO] Finished at: 2022-10-07T21:28:09Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test) on project wflow-commons: There are test failures.
[ERROR] 
[ERROR] Please refer to /home/ubuntu/joget_src/jw-community/wflow-commons/target/surefire-reports for the individual test results.
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <args> -rf :wflow-commons
root@ip-172-31-44-85:/home/ubuntu/joget_src/jw-community/wflow-app# 

server;build-source-code

5


10 Oct, 2022 •
confluenceUser •
•
confluenceUser •

I just attempted the same thing on a new computer using Linux. Same result. I also tried the Build Plugin Source Code using Docker. I could not generate a project which would open in NetBeans. I had previously tried the source code build on Windows 2019 Server without success. Please advise! Thanks in advance, Bill

11 Oct, 2022 •
confluenceUser •
•
confluenceUser •

Hi, try checking the test results and error messages as suggested in the build output "[ERROR] Please refer to /home/ubuntu/joget_src/jw-community/wflow-commons/target/surefire-reports for the individual test results.". They should contain more detailed information and error messages to pinpoint the actual cause.

11 Oct, 2022 •
confluenceUser •
•
confluenceUser •

Check out 

Build Source Code on Windows#6.SkippingBuildTest

Oh, and make sure the mySQL you installed is running. AND make sure jdk is 8 or 11, tops. (don't go more than 11)

12 Oct, 2022 •
confluenceUser •
•
confluenceUser •

Thanks Ian. Switching JAVA_HOME to /usr/lib/jvm/java-11-openjdk-amd64 allowed all the builds to be successful for both

Build Source Code on Linux

and

Build Plugin Source Code using Docker

However, I cannot now find a directory in either case that allows me to open a maven project in NetBeans. Am I missing something else to allow me to create a plugin?

14 Oct, 2022 •
confluenceUser •
•
confluenceUser •

Not quite if I understand you. If say you wanna open the community source codes as reference, in Netbeans, file > open project > go to the Joget community source code and open up the following 2:

wflow-core (where all the java & json files for the plugins are located

wflow-consoleweb (for the properties files)

you don't need the rest. 

If you wanna a create a new plugin, what I usually do is find the same plugin type in the KB examples or jogetoss, download and open it Netbeans and rename/refactorize it for my own use.

Else, you gotta use the command to create a mavem project
example, see item 6 prepare dev env in How to develop a Bean Shell Hash Variable - Knowledge Base for DX 7 - Joget | COMMUNITY

RELATED QUESTIONS

Your answer


To answer a question you'll need an account.

Print