I want to expose groovy methods to the javascript part of the plugin using HTTP routes.
when calling the exposed method from javascript with the following code I get a 403 error:
groovy code is not interpreted in JavaScript, you are going to need to use the path you specified in your plugin in directly in the JavaScript rather than expecting it to be interpreted.
That gets me further to this error: [http-nio-127.0.0.1-8080-exec-4] MissingMethodException occurred when processing request: [GET] /plugin/reverseTask/json No signature of method: com.morpheusdata.core.PluginManager.handleRoute() is applicable for argument types: (org.codehaus.groovy.runtime.GStringImpl, com.morpheusdata.views.ViewModel...) values: [/reverseTask/json, com.morpheusdata.views.ViewModel@459e7a6c, ...] Possible solutions: handleRoute(java.lang.String, com.morpheusdata.views.ViewModel, java.util.List). Stacktrace follows: groovy.lang.MissingMethodException: No signature of method: com.morpheusdata.core.PluginManager.handleRoute() is applicable for argument types: (org.codehaus.groovy.runtime.GStringImpl, com.morpheusdata.views.ViewModel...) values: [/reverseTask/json, com.morpheusdata.views.ViewModel@459e7a6c, ...] Possible solutions: handleRoute(java.lang.String, com.morpheusdata.views.ViewModel, java.util.List) at com.morpheus.plugin.PluginManagerService.handleRoute(PluginManagerService.groovy:212) at com.morpheus.PluginManagerController.route(PluginManagerController.groovy:25) at com.morpheus.remote.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:20) [9 skipped] [36 skipped]
I used com.morpheusdata:morpheus-plugin-api:0.12.0 previously.
Updated now to Version 0.13.1.
Similar error:
[http-nio-127.0.0.1-8080-exec-10] MissingMethodException occurred when processing request: [GET] /plugin/reverseTask/json No signature of method: com.morpheusdata.core.PluginManager.handleRoute() is applicable for argument types: (org.codehaus.groovy.runtime.GStringImpl, com.morpheusdata.views.ViewModel...) values: [/reverseTask/json, com.morpheusdata.views.ViewModel@1c628645, ...] Possible solutions: handleRoute(java.lang.String, com.morpheusdata.views.ViewModel, java.util.List). Stacktrace follows: groovy.lang.MissingMethodException: No signature of method: com.morpheusdata.core.PluginManager.handleRoute() is applicable for argument types: (org.codehaus.groovy.runtime.GStringImpl, com.morpheusdata.views.ViewModel...) values: [/reverseTask/json, com.morpheusdata.views.ViewModel@1c628645, ...] Possible solutions: handleRoute(java.lang.String, com.morpheusdata.views.ViewModel, java.util.List) at com.morpheus.plugin.PluginManagerService.handleRoute(PluginManagerService.groovy:212) at com.morpheus.PluginManagerController.route(PluginManagerController.groovy:25) at com.morpheus.remote.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:20) [9 skipped] [36 skipped]
with Morpheus v5.4.6 and plugin api version v.0.13.1 the recent error is gone but I am now back to the 403 error I started the thread with.
What am I missing?