Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8367741
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T13:14:07+00:00 2026-06-09T13:14:07+00:00

I am using Groovy on Grails and the resources plugin is configured. I have

  • 0

I am using Groovy on Grails and the resources plugin is configured.
I have this scenario:

  • I have a product, which has multiple images.

  • The admin can delete any image.

The logic is that when the admin clicks “Delete”, I remove the file (and its thumb file) from the file system.

The whole process works smoothly, but after some time (5-6 minutes), when the resources plugin once again refreshes its resources, it throws an error saying that, “some module depends on resource [path/to/file] but the file was not found”.

The stack trace is as follows:

2012-08-10 12:49:41,159 [http-8080-2] ERROR errors.GrailsExceptionResolver  - Exception occurred when processing request: [GET] /
Stacktrace follows:
org.codehaus.groovy.grails.web.taglib.exceptions.GrailsTagException: Error executing tag <r:layoutResources>: Module [__@adhoc-files@__] depends on resource [/images/product/p312roduct/original/Candle_4.jpg] but the file cannot be found at /home/desktop2/finalWorkspace3/ds/grails-app/views/layouts/main.gsp:13
    at home_desktop2_finalWorkspace3_ds_grails_app_views_layouts_main_gsp$_run_closure1.doCall(main.gsp:13)
    at home_desktop2_finalWorkspace3_ds_grails_app_views_layouts_main_gsp$_run_closure1.doCall(main.gsp)
    at home_desktop2_finalWorkspace3_ds_grails_app_views_layouts_main_gsp.run(main.gsp:17)
    at org.grails.plugin.resource.DevModeSanityFilter.doFilter(DevModeSanityFilter.groovy:44)
    at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:197)
    at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:171)
    at java.lang.Thread.run(Thread.java:679)
Caused by: java.lang.IllegalArgumentException: Module [__@adhoc-files@__] depends on resource [/images/product/p312roduct/original/Candle_4.jpg] but the file cannot be found
    at org.grails.plugin.resource.ResourceTagLib$_closure8.doCall(ResourceTagLib.groovy:463)
    at org.grails.plugin.resource.ResourceTagLib.invokeMethod(ResourceTagLib.groovy)
    at org.grails.plugin.resource.ResourceTagLib$_closure6.doCall(ResourceTagLib.groovy:387)
    ... 7 more
2012-08-10 12:49:41,172 [http-8080-2] ERROR pages.GroovyPagesServlet  - Error processing GSP: Error executing tag <r:layoutResources>: Module [__@adhoc-files@__] depends on resource [/images/product/p312roduct/original/Candle_4.jpg] but the file cannot be found at /home/desktop2/finalWorkspace3/ds/grails-app/views/layouts/main.gsp:13
org.codehaus.groovy.grails.web.taglib.exceptions.GrailsTagException: Error executing tag <r:layoutResources>: Module [__@adhoc-files@__] depends on resource [/images/product/p312roduct/original/Candle_4.jpg] but the file cannot be found at /home/desktop2/finalWorkspace3/ds/grails-app/views/layouts/main.gsp:13
    at home_desktop2_finalWorkspace3_ds_grails_app_views_layouts_main_gsp$_run_closure1.doCall(main.gsp:13)
    at home_desktop2_finalWorkspace3_ds_grails_app_views_layouts_main_gsp$_run_closure1.doCall(main.gsp)
    at home_desktop2_finalWorkspace3_ds_grails_app_views_layouts_main_gsp.run(main.gsp:17)
    at org.grails.plugin.resource.DevModeSanityFilter.doFilter(DevModeSanityFilter.groovy:44)
    at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:197)
    at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:171)
    at java.lang.Thread.run(Thread.java:679)
Caused by: java.lang.IllegalArgumentException: Module [__@adhoc-files@__] depends on resource [/images/product/p312roduct/original/Candle_4.jpg] but the file cannot be found
    at org.grails.plugin.resource.ResourceTagLib$_closure8.doCall(ResourceTagLib.groovy:463)
    at org.grails.plugin.resource.ResourceTagLib.invokeMethod(ResourceTagLib.groovy)
    at org.grails.plugin.resource.ResourceTagLib$_closure6.doCall(ResourceTagLib.groovy:387)
    ... 7 more
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T13:14:08+00:00Added an answer on June 9, 2026 at 1:14 pm

    The resources plugin expects that the underlying files in modules do not change. Furthermore, any static assets that are being linked to directly by the app (and not through a module or a <g:resource> tag), are considered to be ad-hoc, and are added as modules to the resources context. This allows even these “legacy” assets to be minified, compiled, cached, etc. by the resources plugin.

    If you are using the file system to deliver these somewhat dynamic assets of yours, you’re better off excluding them from the resources plugin’s ad-hoc processing. Set the configuration flag grails.resources.adhoc.excludes to exclude whatever directory you are storing these assets in.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using groovy/grails, and I have a ResultList in my service which I
We are using grails-groovy with Hibernate, I have a SQL query like this in
I'm using Grails 1.2.1. I have a class in my src/groovy file in which
I'm using Grails 1.3.7 and the db-migration plug-in. I have generated a chagelog.groovy-file containing
When using the Groovy Jenkins plugin (not the Groovy Post Build Plugin, which is
I have this log4j configuration in my grails config.groovy log4j = { error 'org.codehaus.groovy.grails.web.servlet',
I am using the current version of SpringSource Tool Suite with the Groovy/Grails plugin
I'm using Grails and I have a local-plugin (that I wrote) that I'm using
I'm using Grails 1.2.1. I have this method in my controller … class SocialMediaCacheProxyController
Grails have cofig for spring bean called resources.groovy . And as i understand from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.