Mendix 8 Java NoSuchMethodError onpremise server

0
I am trying to run a Mendix 8 app on an onpremise server for the 1st time.  Mendix 7 apps are currently running on the same server which are using Java 8. Java11 has been installed on the server for the account the mendix 8 app is running under and confirmed by java --version. However, when I try to start the Mendix 8 app in m2ee I get the error below.  From the error it appears to me that it’s not recognizing Java11 but I’m not sure why. Is there another path or env variable that needs to be set? Or any other suggestions would be much appreciated. Thank you! INFO: Trying to start the MxRuntime... Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=128M; support was removed in 8.0 Exception in thread "main" java.lang.NoSuchMethodError: java.nio.file.Path.of(Ljava/lang/String;[Ljava/lang/String;)Ljava/nio/file/Path;         at com.mendix.container.config.package$.toPath(package.scala:33)         at com.mendix.container.config.ConfigFromEnvironment$.$anonfun$readMxIns                                                                                                 tallPath$1(ConfigFromEnvironment.scala:66)         at cats.data.Validated.andThen(Validated.scala:264)         at com.mendix.container.config.ConfigFromEnvironment$.readMxInstallPath(                                                                                                 ConfigFromEnvironment.scala:66)         at com.mendix.container.config.ConfigFromEnvironment$.apply(ConfigFromEnvironment.scala:58)         at com.mendix.container.boot.Main$.delayedEndpoint$com$mendix$container$                                                                                                 boot$Main$1(Main.scala:13)         at com.mendix.container.boot.Main$delayedInit$body.apply(Main.scala:10)         at scala.Function0.apply$mcV$sp(Function0.scala:39)         at scala.Function0.apply$mcV$sp$(Function0.scala:39)         at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:17)         at scala.App.$anonfun$main$1$adapted(App.scala:80)         at scala.collection.immutable.List.foreach(List.scala:392)         at scala.App.main(App.scala:80)         at scala.App.main$(App.scala:78)         at com.mendix.container.boot.Main$.main(Main.scala:10)         at com.mendix.container.boot.Main.main(Main.scala) ERROR: Java subprocess terminated with errorcode 1 ERROR: Starting the JVM process did not succeed...    
asked
2 answers
1

Are you using OpenJDK? https://adoptopenjdk.net/

We had some similar problems when 8 was first released, where some dependencies changed. I think it was due to some older plugins we were using.  Swapping to OpenJDK helped.

If that doesn’t work, you can try to find the exact class that you are missing and add the jar file to your project.

answered
1

Hi Tracy, I saw that you are running both Mendix 7 and Mendix 8 in the same server.

Do you have both java versions installed as well? If so, what java home you have set?

Check if you can run the Mendix service with Java 11 using absolute path for the JRE.

You could set the Java home, but we also need proper JRE to run any java application. In this case Mendix.

Probably JRE that is set, is now pointing to older version and Mendix 8 cant run with older version.

Hope this helps

https://stackoverflow.com/questions/10757851/run-a-jar-file-using-a-specific-jre

answered