CriticalError when calling javaAction Random Strong Password

When calling the javaAction Random Strong Password, the app crashes with stacktrace (see below). It is caused by an error in the communitycommons.StringUtils. In Line 313: String totalChars = RandomStringUtils.randomAlphanumeric(minLen - fixedNumber, maxLen - fixedNumber); Strange thing is, that apaches RandomStringUtils offer both methods: Any hint how to circumvent this? java.lang.NoSuchMethodError: org.apache.commons.lang3.RandomStringUtils.randomAlphanumeric(II)Ljava/lang/String;     at communitycommons.StringUtils.generateCommonLangPassword(     at communitycommons.StringUtils.randomStrongPassword(     at communitycommons.actions.RandomStrongPassword.executeAction(     at communitycommons.actions.RandomStrongPassword.executeAction(     at com.mendix.systemwideinterfaces.core.UserAction.execute(     at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.doCall(CoreActionHandlerImpl.scala:71)     at     at     at com.mendix.basis.actionmanagement.ActionManagerBase$1.execute(     at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(     at com.mendix.basis.actionmanagement.ActionManagerBase.executeSync(     at com.mendix.basis.component.InternalCoreBase.execute(     at com.mendix.modules.microflowengine.actions.actioncall.JavaAction.execute(JavaAction.scala:53)
6 answers

Just tested this in a clean project Mx version 8.0.0 and can’t reproduce the error that you are receiving.

Can it be that you have a jar conflict, maybe multiple versions of lang3 in your userlib directory? Or missing some jar file, maybe download the commons module fresh and overwrite the current version?


Just had the same issue with a coworker and the issue is the new version of the randomStringUtils method now only has 1 argument, just the amount and no longer the min and max. When using a newer version of the jar file replace the code to just use 1 number. For a comlpete solution make sure the java action only takes 1 argument as well, the number of characters only and make sure this is propagated correctly in the different methods associated with this function. To get this fixed correctly I suggest opening an issue on github to have the jar version upgraded for the commons module.


Hi There,

I ran into the same issue with Mendix 7.23.11.

In case someone else still in need of a solution,

this is cause by jar files in conflict with each other. And this error will never happen when you create a new project as Erwin tried to reproduce the error.

Erwin to reproduce:

  1. create a new project
  2. install community commons Functions Library from the App store,
  3. install StringUtils from the App store (with is already include in the Community Commons). What happens is the StringUtils will come with a set of libraries(old) and override/add on the existing ones.


To solve this, go in the userlib, and look for all the libraries with lang3, as below:

  • commons.lang3…
  • and also org.apache.commons.lang3…


remove all of them and keep the most recent one. I recommend to keep the most recent of type commons.lang3.

Hope this will help.


Hi Max

I had the same problem. I solved it by downgrading the commons to previows version in the app store.


Community Commons version 8.1.0 doesn't have this problem. All versions above do.


Downgrading to version 8.3.1. of Community Commons worked for me.


In my case with CommunityCommons 8.8.0 I had:
* commons-lang3-3.11.jar (part of CommunityCommons)
* org.apache.commons.lang3.jar
Deleting org.apache.commons.lang3.jar solved the problem.