mckenfra / gsp-resources Goto Github PK
View Code? Open in Web Editor NEWThis project forked from stefankendall/gsp-resources
GSP Resources Grails plugin
Home Page: http://grails.org/plugin/gsp-resources
License: Apache License 2.0
This project forked from stefankendall/gsp-resources
GSP Resources Grails plugin
Home Page: http://grails.org/plugin/gsp-resources
License: Apache License 2.0
The application with gsp-resources:0.4.4 fails on "grails test-app :integration" or "grails test-app :functional" with ClassNotFoundException: BackgroundRequest
Can be resolved if I add gspresources-background-servlet-2.4.jar to the "lib" folder
As far as my env is concerned, Grails-2.2.4, servlet.version 3.0
Log:
|Packaging Grails application
............................
|Running Grails application
Spring Security is disabled, not loading
piko.conf.SiteConfiguration configuration loaded: [site:[menu:[reisid:[controller:reis, action:index], nimekirjad:[controller:nimekiri, action:index], 1-astme-kontroll:[controller:astme1, action:index], 2-astme-kontroll:[controller:astme2, action:index], operatiivinfo:[controller:operatiivinfo, action:index], piiriyletus:[controller:piiriyletus, action:index], haldus:[seade:[controller:seade, action:index], klassifikaator:[controller:klassifikaator, action:index], kiosk:[controller:kiosk, action:index], piiripunkt:[controller:piiripunkt, action:index], abiinfo:[controller:abiinfo, action:index], kontrollparing-seadistamine:[controller:kontrollparingSeadistamine, action:index], kontrollparing-tegemine:[controller:kontrollparingtegemine, action:index], ignoreerimisnimekiri:[controller:ignoreerimisnimekiri, action:index], translitereerimine:[controller:translitereerimine, action:index], kasutaja:[controller:kasutaja, action:index], kasutajaroll:[controller:kasutajaroll, action:index], valiskontrolor:[controller:valinekontrolor, action:index], logi:[controller:logi, action:index], kustutamine:[controller:kustutamine, action:index]], aruanded:[isikud:[controller:aruanneIsik, action:index], koormus:[controller:aruannePiiriyletus, action:index], sisestus:[controller:aruanneSisestus, action:index]]]]]
plugin.resource.ResourceProcessor Unable to load resources
java.lang.NoClassDefFoundError: org/grails/plugin/gspresources/servlet/BackgroundRequest
at org.grails.plugin.gspresources.GspResourcePageRenderer.renderToWriter(GspResourcePageRenderer.groovy:160)
at org.grails.plugin.gspresources.GspResourcePageRenderer.render(GspResourcePageRenderer.groovy:84)
at org.grails.plugin.gspresources.GspResourceProcessor.renderGsp(GspResourceProcessor.groovy:720)
at org.grails.plugin.gspresources.GspResourceMeta.beginPrepare(GspResourceMeta.groovy:75)
at org.grails.plugin.resource.ResourceProcessor.prepareResource(ResourceProcessor.groovy:531)
at org.grails.plugin.resource.ResourceProcessor$_prepareSingleDeclaredResource_closure12.doCall(ResourceProcessor.groovy:610)
at org.grails.plugin.resource.util.ResourceMetaStore.addDeclaredResource(ResourceMetaStore.groovy:29)
at org.grails.plugin.resource.ResourceProcessor.prepareSingleDeclaredResource(ResourceProcessor.groovy:608)
at org.grails.plugin.gspresources.GspResourceProcessor.prepareResourceBatch(GspResourceProcessor.groovy:344)
at org.grails.plugin.resource.ResourceProcessor.resourcesChanged(ResourceProcessor.groovy:813)
at org.grails.plugin.resource.ResourceProcessor.loadModules(ResourceProcessor.groovy:809)
at org.grails.plugin.resource.ResourceProcessor.reloadAll(ResourceProcessor.groovy:1078)
at org.grails.plugin.gspresources.GspResourceProcessor.reloadAll(GspResourceProcessor.groovy:128)
at org.grails.plugin.gspresources.GspResourceProcessor.start(GspResourceProcessor.groovy:173)
at GspResourcesGrailsPlugin$_closure2.doCall(GspResourcesGrailsPlugin.groovy:61)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:724)
Caused by: java.lang.ClassNotFoundException: org.grails.plugin.gspresources.servlet.BackgroundRequest
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 19 more
Plugin version - 0.4.2
Grails version - 2.2.4
I gave 'utils' plugin that use gspResources plugin.
And 'utils' plugin is used in application.
I can not start (grails run-app) grails application because of error in plugin, but building war is OK. (grails war)
Previously it was working, but after some change (that i can not identify ) app fails to start.
| Error 2013-09-16 12:20:54,062 [localhost-startStop-1] ERROR plugins.DefaultGrailsPluginManager - Error configuring dynamic methods for plugin [gspResources:0.4.2]: groovy.lang.MissingMethodException: No signature of method: org.grails.plugin.resource.ResourceProcessor.isStartOnPluginLoad() is applicable for argument types: () values: []
Message: groovy.lang.MissingMethodException: No signature of method: org.grails.plugin.resource.ResourceProcessor.isStartOnPluginLoad() is applicable for argument types: () values: []
Line | Method
->> 334 | innerRun in java.util.concurrent.FutureTask$Sync
| 166 | run in java.util.concurrent.FutureTask
| 1145 | runWorker in java.util.concurrent.ThreadPoolExecutor
| 615 | run in java.util.concurrent.ThreadPoolExecutor$Worker
^ 722 | run . . . in java.lang.Thread
Caused by MissingMethodException: No signature of method: org.grails.plugin.resource.ResourceProcessor.isStartOnPluginLoad() is applicable for argument types: () values: []
->> 59 | doCall in GspResourcesGrailsPlugin$_closure2
| 334 | innerRun in java.util.concurrent.FutureTask$Sync
| 166 | run . . . in java.util.concurrent.FutureTask
| 1145 | runWorker in java.util.concurrent.ThreadPoolExecutor
| 615 | run . . . in java.util.concurrent.ThreadPoolExecutor$Worker
^ 722 | run in java.lang.Thread
2013-09-16 12:20:54,135 [localhost-startStop-1] INFO resource.ResourceProcessor - Performing a full reload
| Error 2013-09-16 12:20:55,983 [localhost-startStop-1] ERROR resource.ResourceProcessor - Unable to load resources
Message: Error creating bean with name 'org.grails.plugin.gspresources.GspResourceMapper': Cannot resolve reference to bean 'org.grails.plugin.gspresources.GspResourceMapperInstance' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.grails.plugin.gspresources.GspResourceMapperInstance': Initialization of bean failed; nested exception is org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type 'org.grails.plugin.resource.ResourceProcessor' to required type 'org.grails.plugin.gspresources.GspResourceProcessor' for property 'grailsResourceProcessor'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [org.grails.plugin.resource.ResourceProcessor] to required type [org.grails.plugin.gspresources.GspResourceProcessor] for property 'grailsResourceProcessor': no matching editors or conversion strategy found
Line | Method
->> 593 | createApplicationContext in grails.spring.BeanBuilder
| 43 | createResourceMappers in org.grails.plugin.resource.mapper.ResourceMappersFactory
| 1005 | loadMappers . . . . . . in org.grails.plugin.resource.ResourceProcessor
| 1074 | reloadAll in ''
| 172 | doCall . . . . . . . . . in ResourcesGrailsPlugin$_closure3
| 334 | innerRun in java.util.concurrent.FutureTask$Sync
| 166 | run . . . . . . . . . . in java.util.concurrent.FutureTask
| 1145 | runWorker in java.util.concurrent.ThreadPoolExecutor
| 615 | run . . . . . . . . . . in java.util.concurrent.ThreadPoolExecutor$Worker
^ 722 | run in java.lang.Thread
Caused by BeanCreationException: Error creating bean with name 'org.grails.plugin.gspresources.GspResourceMapperInstance': Initialization of bean failed; nested exception is org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type 'org.grails.plugin.resource.ResourceProcessor' to required type 'org.grails.plugin.gspresources.GspResourceProcessor' for property 'grailsResourceProcessor'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [org.grails.plugin.resource.ResourceProcessor] to required type [org.grails.plugin.gspresources.GspResourceProcessor] for property 'grailsResourceProcessor': no matching editors or conversion strategy found
->> 593 | createApplicationContext in grails.spring.BeanBuilder
| 43 | createResourceMappers in org.grails.plugin.resource.mapper.ResourceMappersFactory
| 1005 | loadMappers . . . . . . in org.grails.plugin.resource.ResourceProcessor
| 1074 | reloadAll in ''
| 172 | doCall . . . . . . . . . in ResourcesGrailsPlugin$_closure3
| 334 | innerRun in java.util.concurrent.FutureTask$Sync
| 166 | run . . . . . . . . . . in java.util.concurrent.FutureTask
| 1145 | runWorker in java.util.concurrent.ThreadPoolExecutor
| 615 | run . . . . . . . . . . in java.util.concurrent.ThreadPoolExecutor$Worker
^ 722 | run in java.lang.Thread
Caused by ConversionNotSupportedException: Failed to convert property value of type 'org.grails.plugin.resource.ResourceProcessor' to required type 'org.grails.plugin.gspresources.GspResourceProcessor' for property 'grailsResourceProcessor'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [org.grails.plugin.resource.ResourceProcessor] to required type [org.grails.plugin.gspresources.GspResourceProcessor] for property 'grailsResourceProcessor': no matching editors or conversion strategy found
->> 593 | createApplicationContext in grails.spring.BeanBuilder
| 43 | createResourceMappers in org.grails.plugin.resource.mapper.ResourceMappersFactory
| 1005 | loadMappers . . . . . . in org.grails.plugin.resource.ResourceProcessor
| 1074 | reloadAll in ''
| 172 | doCall . . . . . . . . . in ResourcesGrailsPlugin$_closure3
| 334 | innerRun in java.util.concurrent.FutureTask$Sync
| 166 | run . . . . . . . . . . in java.util.concurrent.FutureTask
| 1145 | runWorker in java.util.concurrent.ThreadPoolExecutor
| 615 | run . . . . . . . . . . in java.util.concurrent.ThreadPoolExecutor$Worker
^ 722 | run in java.lang.Thread
Caused by IllegalStateException: Cannot convert value of type [org.grails.plugin.resource.ResourceProcessor] to required type [org.grails.plugin.gspresources.GspResourceProcessor] for property 'grailsResourceProcessor': no matching editors or conversion strategy found
->> 593 | createApplicationContext in grails.spring.BeanBuilder
| 43 | createResourceMappers in org.grails.plugin.resource.mapper.ResourceMappersFactory
| 1005 | loadMappers . . . . . . in org.grails.plugin.resource.ResourceProcessor
| 1074 | reloadAll in ''
| 172 | doCall . . . . . . . . . in ResourcesGrailsPlugin$_closure3
| 334 | innerRun in java.util.concurrent.FutureTask$Sync
| 166 | run . . . . . . . . . . in java.util.concurrent.FutureTask
| 1145 | runWorker in java.util.concurrent.ThreadPoolExecutor
| 615 | run . . . . . . . . . . in java.util.concurrent.ThreadPoolExecutor$Worker
^ 722 | run in java.lang.Thread
2013-09-16 12:21:03,785 [localhost-startStop-1] WARN util.GrailsUtil - [DEPRECATED] Method ConfigurationHolder.getConfig() is deprecated and will be removed in a future version of Grails.
2013-09-16 12:21:03,800 [localhost-startStop-1] WARN util.GrailsUtil - [DEPRECATED] Method ApplicationHolder.getApplication() is deprecated and will be removed in a future version of Grails.
2013-09-16 12:21:03,815 [localhost-startStop-1] WARN util.GrailsUtil - [DEPRECATED] Method ApplicationHolder.getApplication() is deprecated and will be removed in a future version of Grails.
2013-09-16 12:21:03,820 [localhost-startStop-1] WARN util.GrailsUtil - [DEPRECATED] Method ConfigurationHolder.getConfig() is deprecated and will be removed in a future version of Grails.
2013-09-16 12:21:03,821 [localhost-startStop-1] INFO CacheHeadersGrailsPlugin - Caching enabled in Config: true
2013-09-16 12:21:07,547 [localhost-startStop-1] INFO context.GrailsConfigUtils - [GrailsContextLoader] Grails application loaded.
| Error 2013-09-16 12:21:07,665 [localhost-startStop-1] ERROR context.GrailsContextLoader - Error initializing the application: groovy.lang.MissingMethodException: No signature of method: org.grails.plugin.resource.ResourceProcessor.isStartOnPluginBootstrap() is applicable for argument types: () values: []
Message: groovy.lang.MissingMethodException: No signature of method: org.grails.plugin.resource.ResourceProcessor.isStartOnPluginBootstrap() is applicable for argument types: () values: []
Line | Method
->> 308 | evaluateEnvironmentSpecificBlock in grails.util.Environment
| 301 | executeForEnvironment in ''
| 277 | executeForCurrentEnvironment . . in ''
| 334 | innerRun in java.util.concurrent.FutureTask$Sync
| 166 | run . . . . . . . . . . . . . . in java.util.concurrent.FutureTask
| 1145 | runWorker in java.util.concurrent.ThreadPoolExecutor
| 615 | run . . . . . . . . . . . . . . in java.util.concurrent.ThreadPoolExecutor$Worker
^ 722 | run in java.lang.Thread
Caused by MissingMethodException: No signature of method: org.grails.plugin.resource.ResourceProcessor.isStartOnPluginBootstrap() is applicable for argument types: () values: []
->> 12 | doCall in GspResourcesBootStrap$_closure1
| 308 | evaluateEnvironmentSpecificBlock in grails.util.Environment
| 301 | executeForEnvironment . . . . . in ''
| 277 | executeForCurrentEnvironment in ''
| 334 | innerRun . . . . . . . . . . . . in java.util.concurrent.FutureTask$Sync
| 166 | run in java.util.concurrent.FutureTask
| 1145 | runWorker . . . . . . . . . . . in java.util.concurrent.ThreadPoolExecutor
| 615 | run in java.util.concurrent.ThreadPoolExecutor$Worker
^ 722 | run . . . . . . . . . . . . . . in java.lang.Thread
2013-09-16 12:21:07,786 [UaalClientService STOPPING] INFO service.UaalClientService - Stoping UAAL Client Service
2013-09-16 12:21:07,786 [UaalClientService STOPPING] INFO service.UaalClientService - Service was stopped, tasks never started: []
2013-09-16 12:21:07,797 [Thread-9] INFO impl.SessionFactoryImpl - closing
2013-09-16 12:21:07,817 [Thread-9] INFO impl.SessionFactoryImpl - closing
If I have the same gsp resource in 2 different bundles then the gsp resource only gets added to the last defined bundle
example if ApplicationResources is like this
bundle1 {
resource url:'js/libs/path.js'
resource url:'js/gsp-resource/dna.js.gsp'
}
bundle2 {
resource url:'js/libs/path.js'
resource url:'js/gsp-resource/dna.js.gsp'
}
then resource dna.js.gsp only gets added to bundle 2 and bundle1 only has path.js in it
Thanks --Serge
We have programmers using PC and Mac. THe gsp resource plugin is working fine on mac but on PC the css.gsp resource show the following error
| Error 2013-09-13 12:02:25,185 [http-bio-8080-exec-4] ERROR resource.ResourceMeta - Resource not found: /css/test.css
ApplicationResource.groovy has:
style {
resource url:'css/test.css.gsp'
}
I am using the gsp-resources plugin and if I create a module in ApplicationResources.groovy with the .js files and .js.gsp files then the .js.gsp file do not get bundled with the .js file
Here is my code
In ApplicationResources.groovy I have
modules = {
application {
resource url:'js/application.js'
resource url:'js/testresource.js.gsp'
}
in a view test.gsp I have
<r:require module='application'/>
<r:layoutResources />
<r:layoutResources />
If I look at the redenred gsp file the js file and the js.gsp files are not bundled in one single file
When running 0.4.4 with grails 2.3.2 and servlet 3.0, we are getting
java.lang.NoClassDefFoundError: org/grails/plugin/gspresources/servlet/BackgroundRequest
at org.grails.plugin.gspresources.GspResourcePageRenderer.renderToWriter(GspResourcePageRenderer.groovy:163)
at org.grails.plugin.gspresources.GspResourcePageRenderer.render(GspResourcePageRenderer.groovy:88)
at org.grails.plugin.gspresources.GspResourceProcessor.renderGsp(GspResourceProcessor.groovy:526)
at org.grails.plugin.gspresources.GspResourceMeta.beginPrepare(GspResourceMeta.groovy:67)
I recently upgraded the Resources plugin to version 1.2.13 (from 1.2.7), to have the most recent version. With that upgrade, the application suddenly couldn't find GSP resources anymore. I backtracked the version of the Resources plugin to 1.2.8, to find that it's the last version that works (with the GSP Resources plugin, version 0.4.4). If it helps, here's the stacktrace:
org.codehaus.groovy.grails.web.mapping.exceptions.UrlMappingException: Error mapping onto view [/index]: Error applying layout : main
at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:176)
at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)
at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92)
at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:389)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.codehaus.groovy.grails.web.pages.exceptions.GroovyPagesException: Error applying layout : main
... 7 more
Caused by: org.codehaus.groovy.grails.web.pages.exceptions.GroovyPagesException: Error processing GroovyPageView: Error executing tag <r:layoutResources>: Module [applicationFiles] depends on resource [/js/util/urls.js.gsp] but the file cannot be found
... 7 more
Caused by: org.codehaus.groovy.grails.web.taglib.exceptions.GrailsTagException: Error executing tag <r:layoutResources>: Module [applicationFiles] depends on resource [/js/util/urls.js.gsp] but the file cannot be found
at home_igall_git_ggsafechx_grails_app_views_layouts_main_gsp$_run_closure1.doCall(home_igall_git_ggsafechx_grails_app_views_layouts_main_gsp:55)
at home_igall_git_ggsafechx_grails_app_views_layouts_main_gsp.run(home_igall_git_ggsafechx_grails_app_views_layouts_main_gsp:60)
... 7 more
Caused by: java.lang.IllegalArgumentException: Module [applicationFiles] depends on resource [/js/util/urls.js.gsp] but the file cannot be found
at org.grails.plugin.resource.ResourceTagLib$_closure10.doCall(ResourceTagLib.groovy:456)
at org.grails.plugin.resource.ResourceTagLib$_closure6.doCall(ResourceTagLib.groovy:377)
... 9 more
Like I said, just changing the Resources plugin down to version 1.2.8, and without any other changes, everything works fine.
Is there anything that can be done? Or is this a local problem with my app?
GSP resources version : 0.4.3
Resources Plugin version : 1.2.1
Error Fatal error during compilation org.apache.tools.ant.BuildException: BUG! exception in phase 'class generation' in source unit '/Users/amad/.grails/2.2.4/projects/brinqa/plugins/gsp-resources-0.4.3/src/groovy/org/grails/plugin/gspresources/GspResourceProcessor.groovy' Trying to access private constant field [org.grails.plugin.resource.ResourceProcessor#log] from inner class (Use --stacktrace to see the full trace)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.