Mx8 - NativeBuilder fails in MxBuild Prepare Deployment step

1
Hi all, Following the guide on how to deploy a Mendix 8 native app I have been stuck for a while at the following error in MxBuild executing the prepare deployment step, with the error: ERROR: System.ComponentModel.Win32Exception (0x80004005): The system cannot find the file specified [mxbuild][stdout]    at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo) [mxbuild][stdout]    at Mendix.Modeler.Utility.Processes.ProcessRunner.RunProcessAsynchronously(Process process, ProcessInfo processInfo) in C:\jenkins-ci\workspace\AppStudio3.0-Build@3\modeler\Mendix.Modeler.Utility\Processes\ProcessRunner.cs:line 48 [mxbuild][stdout]    at Mendix.Modeler.Utility.Processes.ProcessRunner.RunProcessSynchronously(ProcessInfo processInfo) in C:\jenkins-ci\workspace\AppStudio3.0-Build@3\modeler\Mendix.Modeler.Utility\Processes\ProcessRunner.cs:line 35 [mxbuild][stdout]    at Mendix.Modeler.Deployment.CoreDeploymentWork.RunAnt(String buildFilePath, String target, String deploymentDir, String javaHomeDir, String javaExePath) in C:\jenkins-ci\workspace\AppStudio3.0-Build@3\modeler\Mendix.Modeler.Core\Deployment\CoreDeploymentWork.cs:line 214 [mxbuild][stdout]    at Mendix.Modeler.Deployment.CoreDeploymentWork.CopyFiles(IProject project, DeploymentSettings settings) in C:\jenkins-ci\workspace\AppStudio3.0-Build@3\modeler\Mendix.Modeler.Core\Deployment\CoreDeploymentWork.cs:line 105 [mxbuild][stdout]    at Mendix.Modeler.Deployment.CoreDeploymentWork.WriteFiles(IProject project, DeploymentSettings settings, IProgressInfo info, Boolean generateForLocalDeployment) in C:\jenkins-ci\workspace\AppStudio3.0-Build@3\modeler\Mendix.Modeler.Core\Deployment\CoreDeploymentWork.cs:line 88 [mxbuild][stdout]    at Mendix.Modeler.Deployment.DeploymentProcessBuilder.<>c__DisplayClass12_0.<AddBuildStepsForPhase>b__0(IProgressInfo info) in C:\jenkins-ci\workspace\AppStudio3.0-Build@3\modeler\Mendix.Modeler.Core\Deployment\DeploymentProcessBuilder.cs:line 123 [mxbuild][stdout]    at Mendix.CommandLine.Shared.ProcessRunner.Run(IProcess process) in C:\jenkins-ci\workspace\AppStudio3.0-Build@3\modeler\Mendix.CommandLine.Shared\ProcessRunner.cs:line 35 [mxbuild][stdout]    at Mendix.MxBuild.BuildRunner.BuildProject(IProject project, IBuildOptions options, List`1 allowedLocations) in C:\jenkins-ci\workspace\AppStudio3.0-Build@3\modeler\Mendix.MxBuild\Build\BuildRunner.cs:line 149 [mxbuild][stdout]    at Mendix.MxBuild.BuildRunner.Execute(IBuildOptions options) in C:\jenkins-ci\workspace\AppStudio3.0-Build@3\modeler\Mendix.MxBuild\Build\BuildRunner.cs:line 80 [mxbuild][stdout]    at Mendix.MxBuild.BuildRunnerMode.ExecuteBuild(IBuildOptions buildOptions) in C:\jenkins-ci\workspace\AppStudio3.0-Build@3\modeler\Mendix.MxBuild\Build\BuildRunnerMode.cs:line 48 [mxbuild][stdout]    at Mendix.MxBuild.BuildRunnerMode.Run(IList`1 args) in C:\jenkins-ci\workspace\AppStudio3.0-Build@3\modeler\Mendix.MxBuild\Build\BuildRunnerMode.cs:line 37 [mxbuild][stdout]    at Mendix.MxBuild.ApplicationRunner.Run(IEnumerable`1 args) in C:\jenkins-ci\workspace\AppStudio3.0-Build@3\modeler\Mendix.MxBuild\ApplicationRunner.cs:line 35 [mxbuild][stdout]    at Mendix.CommandLine.Shared.ProgramHelper.InitializeAndRun[T](Func`2 program, Assembly[] extraAssemblies) in C:\jenkins-ci\workspace\AppStudio3.0-Build@3\modeler\Mendix.CommandLine.Shared\ProgramHelper.cs:line 22 [mxbuild][stdout] [mxbuild] Error during execution (exit code 1) [mxbuild] Command executed: C:\Program Files\Mendix\8.0.0.56467\modeler\mxbuild.exe --java-home=C:\Program Files\Java\jdk-11.0.3.7-hotspot --java-exe-path=C:\Program Files\Java\jdk-11.0.3.7-hotspot\bin\java.exe --target=deploy --loose-version-check C:\Users\tvand\Documents\Mendix\SolvosApp-Mx8Upgrade\SolvosApp.mpr   I've verified that all files / paths mentioned here and in the enclosing nativebuilder command exist, tried to clean the deployment directory and have run CMD as both administrator or regular user mode. Is there any way to find out why the builder is actually failing?     EDIT: I’ve created a new project with the native mobile quickstart project template and have re-followed the guide with this project to the same result, to eliminate the possibility of the rest of the project messing with the MXBuild process. Sadly, the outcome is the same.
asked
1 answers
3

It took a couple of hours but I’ve found the culprit – the default folder where your Java JDK is located in Program Files may somehow be not readable enough. Placing a copy of the JDK at regular location (C:\Temp\JDKs\etc) fixed this error, even though the initial error message doesn’t really indicate that this is the problem.

Hope this saves someone else half a day!

answered