Advertisement
Guest User

Untitled

a guest
Apr 19th, 2014
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.25 KB | None | 0 0
  1. class BootStrap {
  2.  
  3. def dataLoaders;
  4.  
  5. def init = { servletContext ->
  6. startLoaders();
  7. }
  8.  
  9.  
  10. def startLoaders() {
  11. for (IDataLoader loader : dataLoaders) {
  12. runAsync {
  13. loader.setup();
  14. loader.startLoading();
  15. }
  16. }
  17. }
  18. }
  19.  
  20. ERROR org.codehaus.groovy.grails.web.context.GrailsContextLoader Error initializing the application: No signature of method: BootStrap.runAsync() is applicable for argument types: (BootStrap$_startLoaders_closure3) values: [BootStrap$_startLoaders_closure3@6892f97b]
  21. groovy.lang.MissingMethodException: No signature of method: BootStrap.runAsync() is applicable for argument types: (BootStrap$_startLoaders_closure3) values: [BootStrap$_startLoaders_closure3@6892f97b]
  22. at BootStrap.startLoaders(BootStrap.groovy:27)
  23. at BootStrap$_closure1.doCall(BootStrap.groovy:15)
  24.  
  25. compile ":executor:0.3"
  26.  
  27. class BootStrap {
  28.  
  29. def dataLoaders
  30. def executorService
  31.  
  32. def init = { servletContext ->
  33. startLoaders()
  34. }
  35.  
  36. def startLoaders() {
  37. for (IDataLoader loader : dataLoaders) {
  38. executorService.submit({
  39. loader.setup()
  40. loader.startLoading()
  41. } as Callable)
  42. }
  43. }
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement