App does not start and says Error while injecting ActionRegistry into class...

1
On several occasions my app fails to start, giving met this message: ... Caused by: java.lang.reflect.InvocationTargetException     at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ... Caused by: java.lang.Error: Unresolved compilation problems:     The method registerUserAction(Class<? extends UserAction<?>>) in the type IActionRegistrator is not applicable for the arguments (Class<Analytics_AddRequestHandler>)   Most of the times it helps to close the App in StudioPro, or to restart StudioPro, or to restart the laptop. But that is a workaround, I would rather tackle the root-cause. I checked the app’s userlib for jar-files having multiple versions, but every jar-file only occurs with one single version. [rtlauncher:container$] INFO Container start took 1619. Ready to accept admin requests. Mendix Runtime launcher failed to start. For more information set 'MX_LOG_LEVEL' to 'i' (info) or 'v' (verbose) and try again. [rtlauncher:main$] ERROR Error while injecting 'class com.mendix.basis.actionmanagement.ActionRegistry' into class system.UserActionsRegistrar using 'bind method : 'registerActions'' (Warning: classloaders different: instance: project-userlib, implementation: platform-private): java.lang.reflect.InvocationTargetException. com.mendix.container.wiring.WiringError$InjectionError: Error while injecting 'class com.mendix.basis.actionmanagement.ActionRegistry' into class system.UserActionsRegistrar using 'bind method : 'registerActions'' (Warning: classloaders different: instance: project-userlib, implementation: platform-private): java.lang.reflect.InvocationTargetException. at com.mendix.container.wiring.InjectDependencyTask.$anonfun$execute$5(InjectDependencyTask.scala:25) at cats.data.Validated.leftMap(Validated.scala:584) at com.mendix.container.wiring.InjectDependencyTask.$anonfun$execute$4(InjectDependencyTask.scala:25) at scala.collection.immutable.List.map(List.scala:246) at com.mendix.container.wiring.InjectDependencyTask.$anonfun$execute$2(InjectDependencyTask.scala:19) at cats.data.Validated.andThen(Validated.scala:697) at com.mendix.container.wiring.InjectDependencyTask.execute(InjectDependencyTask.scala:18) at com.mendix.container.wiring.Wiring$.executeTasks(Wiring.scala:55) at com.mendix.container.wiring.Wiring$.$anonfun$doWireRuntime$6(Wiring.scala:28) at scala.util.Either.flatMap(Either.scala:352) at com.mendix.container.wiring.Wiring$.$anonfun$doWireRuntime$5(Wiring.scala:27) at scala.util.Either.flatMap(Either.scala:352) at com.mendix.container.wiring.Wiring$.doWireRuntime(Wiring.scala:23) at com.mendix.container.wiring.Wiring$.wireRuntime(Wiring.scala:15) at com.mendix.container.boot.Container$.$anonfun$doStart$10(Container.scala:118) at scala.util.Either.flatMap(Either.scala:352) at com.mendix.container.boot.Container$.doStart(Container.scala:114) at com.mendix.container.boot.Container$.doStart(Container.scala:97) at com.mendix.container.boot.Container$.$anonfun$startAndWaitForever$2(Container.scala:74) at scala.util.Either.flatMap(Either.scala:352) at com.mendix.container.boot.Container$.$anonfun$startAndWaitForever$1(Container.scala:73) at com.mendix.container.boot.Container$.time(Container.scala:156) at com.mendix.container.boot.Container$.startAndWaitForever(Container.scala:73) at com.mendix.container.boot.Main$.$anonfun$new$2(Main.scala:15) at scala.util.Either.flatMap(Either.scala:352) at com.mendix.container.boot.Main$.delayedEndpoint$com$mendix$container$boot$Main$1(Main.scala:14) at com.mendix.container.boot.Main$delayedInit$body.apply(Main.scala:11) 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(App.scala:76) at scala.App.$anonfun$main$1$adapted(App.scala:76) at scala.collection.IterableOnceOps.foreach(IterableOnce.scala:563) at scala.collection.IterableOnceOps.foreach$(IterableOnce.scala:561) at scala.collection.AbstractIterable.foreach(Iterable.scala:919) at scala.App.main(App.scala:76) at scala.App.main$(App.scala:74) at com.mendix.container.boot.Main$.main(Main.scala:11) at com.mendix.container.boot.Main.main(Main.scala) Caused by: java.lang.reflect.InvocationTargetException at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at com.mendix.container.wiring.InjectDependencyTask$Reflect.$anonfun$call$1(InjectDependencyTask.scala:61) at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18) at cats.syntax.EitherObjectOps$.catchNonFatal$extension(either.scala:370) at com.mendix.container.wiring.InjectDependencyTask$Reflect.call(InjectDependencyTask.scala:60) at com.mendix.container.wiring.InjectDependencyTask.$anonfun$execute$4(InjectDependencyTask.scala:21) ... 36 more Caused by: java.lang.Error: Unresolved compilation problems: The method registerUserAction(Class<? extends UserAction<?>>) in the type IActionRegistrator is not applicable for the arguments (Class<Analytics_AddRequestHandler>) analytics.actions.Analytics_AddRequestHandler cannot be resolved to a type The method registerUserAction(Class<? extends UserAction<?>>) in the type IActionRegistrator is not applicable for the arguments (Class<Base64Decode>) communitycommons.actions.Base64Decode cannot be resolved to a type The method registerUserAction(Class<? extends UserAction<?>>) in the type IActionRegistrator is not applicable for the arguments (Class<Base64DecodeToFile>) communitycommons.actions.Base64DecodeToFile cannot be resolved to a type The method registerUserAction(Class<? extends UserAction<?>>) in the type IActionRegistrator is not applicable for the arguments (Class<Base64Encode>) communitycommons.actions.Base64Encode cannot be resolved to a type The method registerUserAction(Class<? extends UserAction<?>>) in the type IActionRegistrator is not applicable for the arguments (Class<Base64EncodeFile>) communitycommons.actions.Base64EncodeFile cannot be resolved to a type The method registerUserAction(Class<? extends UserAction<?>>) in the type IActionRegistrator is not applicable for the arguments (Class<Clone>) communitycommons.actions.Clone cannot be resolved to a type The method registerUserAction(Class<? extends UserAction<?>>) in the type IActionRegistrator is not applicable for the arguments (Class<commitInSeparateDatabaseTransaction>) communitycommons.actions.commitInSeparateDatabaseTransaction cannot be resolved to a type The method registerUserAction(Class<? extends UserAction<?>>) in the type IActionRegistrator is not applicable for the arguments (Class<commitWithoutEvents>) communitycommons.actions.commitWithoutEvents cannot be resolved to a type The method registerUserAction(Class<? extends UserAction<?>>) in the type IActionRegistrator is not applicable for the arguments (Class<copyAttributes>) communitycommons.actions.copyAttributes cannot be resolved to a type The method registerUserAction(Class<? extends UserAction<?>>) in the type IActionRegistrator is not applicable for the arguments (Class<CreateLogNode>) communitycommons.actions.CreateLogNode cannot be resolved to a type The method registerUserAction(Class<? extends UserAction<?>>) in the type IActionRegistrator is not applicable for the arguments (Class<DateTimeToLong>) communitycommons.actions.DateTimeToLong cannot be resolved to a type The method registerUserAction(Class<? extends UserAction<?>>) in the type IActionRegistrator is not applicable for the arguments (Class<DecryptString>) communitycommons.actions.DecryptString cannot be resolved to a type The method registerUserAction(Class<? extends UserAction<?>>) in the type IActionRegistrator is not applicable for the arguments (Class<DeepClone>) communitycommons.actions.DeepClone cannot be resolved to a type The method registerUserAction(Class<? extends UserAction<?>>) in the type IActionRegistrator is not applicable for the arguments (Class<Delay>) communitycommons.actions.Delay cannot be resolved to a type The method registerUserAction(Class<? extends UserAction<?>>) in the type IActionRegistrator is not applicable for the arguments (Class<deleteAll>) communitycommons.actions.deleteAll cannot be resolved to a type The method registerUserAction(Class<? extends UserAction<?>>) in the type IActionRegistrator is not applicable for the arguments (Class<DuplicateFileDocument>) communitycommons.actions.DuplicateFileDocument cannot be resolved to a type The method registerUserAction(Class<? extends UserAction<?>>) in the type IActionRegistrator is not applicable for the arguments (Class<DuplicateImageDocument>) communitycommons.actions.DuplicateImageDocument cannot be resolved to a type The method registerUserAction(Class<? extends UserAction<?>>) in the type IActionRegistrator is not applicable for the arguments (Class<encryptMemberIfChanged>) communitycommons.actions.encryptMemberIfChanged cannot be resolved to a type The method registerUserAction(Class<? extends UserAction<?>>) in the type IActionRegistrator is not applicable for the arguments (Class<EncryptString>) communitycommons.actions.EncryptString cannot be resolved to a type The method registerUserAction(Class<? extends UserAction<?>>) in the type IActionRegistrator is not applicable for the arguments (Class<EndTransaction>) communitycommons.actions.EndTransaction cannot be resolved to a type The method registerUserAction(Class<? extends UserAction<?>>) in the type IActionRegistrator is not applicable for the arguments (Class<EnumerationFromString>) communitycommons.actions.EnumerationFromString cannot be resolved to a type The method registerUserAction(Class<? extends UserAction<?>>) in the type IActionRegistrator is not applicable for the arguments (Class<EscapeHTML>) communitycommons.actions.EscapeHTML cannot be resolved to a type The method registerUserAction(Class<? extends UserAction<?>>) in the type IActionRegistrator is not applicable for the arguments (Class<executeMicroflowAsUser>) communitycommons.actions.executeMicroflowAsUser cannot be resolved to a type The method registerUserAction(Class<? extends UserAction<?>>) in the type IActionRegistrator is not applicable for the arguments (Class<executeMicroflowAsUser_1>) communitycommons.actions.executeMicroflowAsUser_1 cannot be resolved to a type The method registerUserAction(Class<? extends UserAction<?>>) in the type IActionRegistrator is not applicable for the arguments (Class<executeMicroflowAsUser_2>) communitycommons.actions.executeMicroflowAsUser_2 cannot be resolved to a type The method registerUserAction(Class<? extends UserAction<?>>) in the type IActionRegistrator is not applicable for the arguments (Class<executeMicroflowInBackground>) communitycommons.actions.executeMicroflowInBackground cannot be resolved to a type The method registerUserAction(Class<? extends UserAction<?>>) in the type IActionRegistrator is not applicable for the arguments (Class<executeMicroflowInBatches>) communitycommons.actions.executeMicroflowInBatches cannot be resolved to a type The method registerUserAction(Class<? extends UserAction<?>>) in the type IActionRegistrator is not applicable for the arguments (Class<executeUnverifiedMicroflowAsUser>) communitycommons.actions.executeUnverifiedMicroflowAsUser cannot be resolved to a type The method registerUserAction(Class<? extends UserAction<?>>) in the type IActionRegistrator is not applicable for the arguments (Class<executeUnverifiedMicroflowAsUser_1>) communitycommons.actions.executeUnverifiedMicroflowAsUser_1 cannot be resolved to a type The method registerUserAction(Class<? extends UserAction<?>>) in the type IActionRegistrator is not applicable for the arguments (Class<executeUnverifiedMicroflowAsUser_2>) communitycommons.actions.executeUnverifiedMicroflowAsUser_2 cannot be resolved to a type The method registerUserAction(Class<? extends UserAction<?>>) in the type IActionRegistrator is not applicable for the arguments (Class<executeUnverifiedMicroflowInBackground>) communitycommons.actions.executeUnverifiedMicroflowInBackground cannot be resolved to a type The method registerUserAction(Class<? extends UserAction<?>>) in the type IActionRegistrator is not applicable for the arguments (Class<executeUnverifiedMicroflowInBatches>) communitycommons.actions.executeUnverifiedMicroflowInBatches cannot be resolved to a type The method registerUserAction(Class<? extends UserAction<?>>) in the type IActionRegistrator is not applicable for the arguments (Class<FileDocumentFromFile>) communitycommons.actions.FileDocumentFromFile cannot be resolved to a type The method registerUserAction(Class<? extends UserAction<?>>) in the type IActionRegistrator is not applicable for the arguments (Class<FileFromFileDocument>) communitycommons.actions.FileFromFileDocument cannot be resolved to a type The method registerUserAction(Class<? extends UserAction<?>>) in the type IActionRegistrator is not applicable for the arguments (Class<GenerateHMAC_SHA256>) communitycommons.actions.GenerateHMAC_SHA256 cannot be resolved to a type The method registerUserAction(Class<? extends UserAction<?>>) in the type IActionRegistrator is not applicable for the arguments (Class<GenerateHMAC_SHA256_hash>) communitycommons.actions.GenerateHMAC_SHA256_hash cannot be resolved to a type The method registerUserAction(Class<? extends UserAction<?>>) in the type IActionRegistrator is not applicable for the arguments (Class<GetApplicationUrl>) communitycommons.actions.GetApplicationUrl cannot be resolved to a type The method registerUserAction(Class<? extends UserAction<?>>) in the type IActionRegistrator is not applicable for the arguments (Class<GetCFInstanceIndex>) communitycommons.actions.GetCFInstanceIndex cannot be resolved to a type The method registerUserAction(Class<? extends UserAction<?>>) in the type IActionRegistrator is not applicable for the arguments (Class<getCreatedByUser>) communitycommons.actions.getCreatedByUser cannot be resolved to a type The method registerUserAction(Class<? extends UserAction<?>>) in the type IActionRegistrator is not applicable for the arguments (Class<GetDefaultLanguage>) communitycommons.actions.GetDefaultLanguage cannot be resolved to a type The method registerUserAction(Class<? extends UserAction<?>>) in the type IActionRegistrator is not applicable for the arguments (Class<GetFileContentsFromResource>) communitycommons.actions.GetFileContentsFromResource cannot be resolved to a type The method registerUserAction(Class<? extends UserAction<?>>) in the type IActionRegistrator is not applicable for the arguments (Class<getFileSize>) communitycommons.actions.getFileSize cannot be resolved to a type The method registerUserAction(Class<? extends UserAction<?>>) in the type IActionRegistrator is not applicable for the arguments (Class<getGUID>) communitycommons.actions.getGUID cannot be resolved to a type The method registerUserAction(Class<? extends UserAction<?>>) in the type IActionRegistrator is not applicable for the arguments (Class<GetImageDimensions>) communitycommons.actions.GetImageDimensions cannot be resolved to a type The method registerUserAction(Class<? extends UserAction<?>>) in the type IActionRegistrator is not applicable for the arguments (Class<GetIntFromDateTime>) communitycommons.actions.GetIntFromDateTime cannot be resolved to a type The method registerUserAction(Class<? extends UserAction<?>>) in the type IActionRegistrator is not applicable for the arguments (Class<getLastChangedByUser>) communitycommons.actions.getLastChangedByUser cannot be resolved to a type The method registerUserAction(Class<? extends UserAction<?>>) in the type IActionRegistrator is not applicable for the arguments (Class<GetModelVersion>) communitycommons.actions.GetModelVersion cannot be resolved to a type The method registerUserAction(Class<? extends UserAction<?>>) in the type IActionRegistrator is not applicable for the arguments (Class<getOriginalValueAsString>) communitycommons.actions.getOriginalValueAsString cannot be resolved to a type The method registerUserAction(Class<? extends UserAction<?>>) in the type IActionRegistrator is not applicable for the arguments (Class<GetRuntimeVersion>) communitycommons.actions.GetRuntimeVersion cannot be resolved to a type The method registerUserAction(Class<? extends UserAction<?>>) in the type IActionRegistrator is not applicable for the arguments (Class<getTypeAsString>) communitycommons.actions.getTypeAsString cannot be resolved to a type at system.UserActionsRegistrar.registerActions(UserActionsRegistrar.java:10) ... 45 more  
asked
1 answers
0

I have experienced this error multiple times. One of the following two solutions work for me:

1) Restart Windows
2) Use the “Clean deployment directory” option from Studio Pro and re-run the project

answered