Java compilation error run locally inside mendix 5.17 after deploy for eclipse

1
After having imported the REST Module, and deploying my project for Eclipse for creating a custom java action, I've been getting the following error when trying to run locally inside mendix. While when running it from eclipse it works normally. com.mendix.core.CoreException: com.mendix.modules.microflowengine.MicroflowException: java.util.NoSuchElementException: key not found: restservices.startpublishesservicesjava at RestServices.StartPublishServices (JavaAction : 'StartPublishesServicesJava') at ProjectName.SF_BeforeStartup (SubMicroflow : 'StartPublishServices') Advanced stacktrace: at com.mendix.core.component.InternalCore.execute(InternalCore.java:367) Caused by: com.mendix.modules.microflowengine.MicroflowException: java.util.NoSuchElementException: key not found: restservices.startpublishesservicesjava at RestServices.StartPublishServices (JavaAction : 'StartPublishesServicesJava') at ProjectName.SF_BeforeStartup (SubMicroflow : 'StartPublishServices') Advanced stacktrace: at com.mendix.modules.microflowengine.MicroflowUtil.processException(MicroflowUtil.java:144) Caused by: com.mendix.core.CoreException: java.util.NoSuchElementException: key not found: restservices.startpublishesservicesjava at com.mendix.core.component.InternalCore.execute(InternalCore.java:237) Caused by: java.util.NoSuchElementException: key not found: restservices.startpublishesservicesjava at scala.collection.MapLike$class.default(MapLike.scala:228) at scala.collection.AbstractMap.default(Map.scala:59) at scala.collection.mutable.HashMap.apply(HashMap.scala:65) at com.mendix.core.actionmanagement.ActionRegistry.getUserActionClass(ActionRegistry.scala:27) at com.mendix.core.action.ActionFactory.createJavaAction(ActionFactory.scala:45) at com.mendix.core.action.ActionFactory.createUserAction(ActionFactory.scala:41) at com.mendix.core.component.InternalCore.execute(InternalCore.java:228) at com.mendix.modules.microflowengine.actions.actioncall.JavaAction.execute(JavaAction.scala:52) at com.mendix.modules.microflowengine.microflow.impl.MicroflowObject.execute(MicroflowObject.java:44) at com.mendix.modules.microflowengine.microflow.impl.MicroflowImpl.executeAfterBreakingIfNecessary(MicroflowImpl.java:192) at com.mendix.modules.microflowengine.microflow.impl.MicroflowImpl.executeAction(MicroflowImpl.java:149) at com.mendix.systemwideinterfaces.core.UserAction.execute(UserAction.java:49) at com.mendix.core.actionmanagement.CoreAction.doCall(CoreAction.java:261) at com.mendix.core.actionmanagement.CoreAction.call(CoreAction.java:249) at com.mendix.core.actionmanagement.ActionManager$1.execute(ActionManager.java:192) at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:32) at com.mendix.core.actionmanagement.ActionManager.executeSync(ActionManager.java:198) at com.mendix.core.component.InternalCore.executeSync(InternalCore.java:206) at com.mendix.modules.microflowengine.actions.SubMicroflowAction.execute(SubMicroflowAction.scala:37) at com.mendix.modules.microflowengine.microflow.impl.MicroflowObject.execute(MicroflowObject.java:44) at com.mendix.modules.microflowengine.microflow.impl.MicroflowImpl.executeAfterBreakingIfNecessary(MicroflowImpl.java:192) at com.mendix.modules.microflowengine.microflow.impl.MicroflowImpl.executeAction(MicroflowImpl.java:149) at com.mendix.systemwideinterfaces.core.UserAction.execute(UserAction.java:49) at com.mendix.core.actionmanagement.CoreAction.doCall(CoreAction.java:261) at com.mendix.core.actionmanagement.CoreAction.call(CoreAction.java:249) at com.mendix.core.actionmanagement.CustomActionMonitorImpl$$anonfun$run$1.apply(CustomMonitoredAction.scala:14) at com.mendix.core.session.Worker$$anonfun$receive$3$$anonfun$2$$anon$1.execute(ActionDispatching.scala:126) at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:32) at com.mendix.core.session.Worker$$anonfun$receive$3$$anonfun$2.apply(ActionDispatching.scala:128) at scala.util.Try$.apply(Try.scala:191) at com.mendix.core.session.Worker$$anonfun$receive$3.applyOrElse(ActionDispatching.scala:122) at akka.actor.Actor$class.aroundReceive(Actor.scala:465) at com.mendix.core.session.Worker.aroundReceive(ActionDispatching.scala:119) at akka.actor.ActorCell.receiveMessage(ActorCell.scala:516) at akka.actor.ActorCell.invoke(ActorCell.scala:487) at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:238) at akka.dispatch.Mailbox.run(Mailbox.scala:220) at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:393) at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260) at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339) at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979) at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107) Inside mendix it does give me an additional warning: Unsupported class version error for bundle 'project'. Probably your project was compiled with Java 8, but you are currently running Mendix with Java 7. Please run Mendix using Java 8 or recompile the actions using Java 7 or by setting the Java source and target version to 7. EventAdmin: Exception during event dispatch [org.osgi.service.event.Event [topic=com/mendix/events/model/loaded] | [org.osgi.service.event.EventHandler] | Bundle(project [105])] (bundle: project, service: [org.osgi.service.event.EventHandler]) Does anyone have an idea on how to fix this?
asked
1 answers
3

Your Eclipse is using Java 8, where your Mendix is using Java 7. Fix one of the two, and it'll work just fine!

You can select your JDK in mendix at EDIT > Preferences

answered