Grails 2.0: "Javascript Provider Not Configured"

Hello, I got the following error for some of my views:

2011-11-11 17:22:07,497 ERROR errors.GrailsExceptionResolver - GrailsTagException occurred when processing request: [GET] /<appname>/test/list No javascript provider is configured. Stacktrace follows: org.codehaus.groovy.grails.web.pages.exceptions.GroovyPagesException: Error processing GroovyPageView: No javascript provider is configured at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) Caused by: org.codehaus.groovy.grails.web.taglib.exceptions.GrailsTagException: No javascript provider is configured at C__Development_bla_app_trunk_grails_app_views_test_list_gsp$_run_closure2.doCall(C__Development_bla_app_trunk_grails_app_views_test_list_gsp:72) at C__Development_bla_app_trunk_grails_app_views_test_list_gsp.run(C__Development_bla_app_trunk_grails_app_views_test_list_gsp:83) ... 3 more 

I tried the following:

in Config.groovy:

 grails.views.javascript.library="jquery" 

or

 grails.resources.modules = { core { dependsOn 'jquery' } } 

in layouts:

 <g:javascript library="jquery" /> <r:layoutResources/> 

in GSP (with grails.resources.modules above):

 <r:require module="core"/> 

Nothing ... always the same mistake. I'm running out of ideas, and I hope someone else has it. How to find out that I have jquery installed, are there any other javascript libraries?

This is Grails 2.0.0.RC1

thanks a lot

Jonas

+4
source share
3 answers

This will also happen if you remove the jquery plugin from grails. Now it is configured by default with grails 2.x

You can declare this in the BuildConfig.groovy plugins BuildConfig.groovy as follows:

 plugins { // other plugins here... runtime ":jquery:1.8.3" } 
+1
source

Ok, I installed jQuery and it works now. I think I get it to work with library="application" , but it doesn't matter

0
source

For this particular problem, if you are using version 2.0, you must run "grail install-plugin prototype" because grails 2.0 no longer has a prototype.

This solution is for me. :)

0
source

Source: https://habr.com/ru/post/1380719/


All Articles