Reputation: 173
I'm trying to upgrade a Grails app and some plugins for it from 2.2.3 to 2.4.3. In doing so, I want to retain use of the resources plugin that is no longer the default. The version I'm including is: resources:1.2.8
Upon starting the application, I see a bunch of these in the logs:
2014-09-17 15:18:15,476 [localhost-startStop-1] WARN o.g.p.r.ResourceProcessor: Serving url file:/Users/abc/.grails/2.4.3/projects/myapp/plugins/jquery-1.11.1/web-app/js/jquery/jquery-1.11.1.min.js isn't allowed.
2014-09-17 15:18:15,477 [localhost-startStop-1] ERROR o.g.p.r.ResourceMeta: Resource not found: /plugins/jquery-1.11.1/js/jquery/jquery-1.11.1.min.js
In ResourceProcessor.groovy, there is a method isServingAllowed(url), and in it the resources plugin checks to see whether a url starts with a root url obtained by resolving a "/" through grailsResourceLoader (or servletContext). This results in a URL like "file:/Users/.../name", but after this when the app is running, I've seen files start with jndi:localhost/app/plugins/..., which will fail this check.
Edit: Another case where I've seen it fail is when the root url is "file:/Users/abc/grailsApp/web-app/", but the resource url is "file:/Users/abc/.grails/2.4.3/projects/grailsApp/plugins/...". Obviously this does not start with the root url.
Is there some sort of configuration that I messed up somewhere along the line? I'm at a loss.
Upvotes: 1
Views: 1175
Reputation: 1055
I solved with this command after doing clean
in every module:
grails compile -refresh-dependencies
Upvotes: 0
Reputation: 11
Downgrading the resources plugin from version 1.2.13 to 1.2.8 was a solution for me.
Operating System: Windows 7 Java version: SE Runtime Environment (build 1.7.0_51-b13) Grails version: 2.4.4
Upvotes: 1
Reputation: 173
The issue was solved by upgrading versions of the gsp resources plugin.
Upvotes: 0