KickstartWithBootstrap
KickstartWithBootstrap copied to clipboard
Fails with Grails 2.4.0
Fails when compiling with grails 2.4.0 'cause of PluginManagerHolder
grails> compile
| To install Kickstart run the script 'kickstart' (e.g., on command line 'grails kickstart')!
| Compiling 406 source files
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
[groovyc] org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
[groovyc] (...)/target/work/plugins/resources-1.2.1/src/groovy/org/grails/plugin/resource/ResourceProcessor.groovy: 6: unable to resolve class org.codehaus.groovy.grails.plugins.PluginManagerHolder
[groovyc] @ line 6, column 1.
[groovyc] import org.codehaus.groovy.grails.plugins.PluginManagerHolder
[groovyc] ^
[groovyc]
[groovyc] (...)/target/work/plugins/resources-1.2.1/src/groovy/org/grails/plugin/resource/util/HalfBakedLegacyLinkGenerator.groovy: 3: unable to resolve class org.codehaus.groovy.grails.commons.ConfigurationHolder
[groovyc] @ line 3, column 1.
[groovyc] import org.codehaus.groovy.grails.commons.ConfigurationHolder
[groovyc] ^
[groovyc]
[groovyc] 2 errors
| Compiling 406 source files.
| Error Compilation error: startup failed:
(...)/target/work/plugins/resources-1.2.1/src/groovy/org/grails/plugin/resource/ResourceProcessor.groovy: 6: unable to resolve class org.codehaus.groovy.grails.plugins.PluginManagerHolder
@ line 6, column 1.
import org.codehaus.groovy.grails.plugins.PluginManagerHolder
^
(...)/target/work/plugins/resources-1.2.1/src/groovy/org/grails/plugin/resource/util/HalfBakedLegacyLinkGenerator.groovy: 3: unable to resolve class org.codehaus.groovy.grails.commons.ConfigurationHolder
@ line 3, column 1.
import org.codehaus.groovy.grails.commons.ConfigurationHolder
^
2 errors
| Error Error running script compile: org.codehaus.groovy.grails.cli.ScriptExitException (Use --stacktrace to see the full trace)
The problem is release of plug in resoouces runtime ":resources:1.2.8"
any idea when it is going to solve?
I was able to get it to compile with the update of resources to version 1.2.8, but still can't get run-app working. | Running Grails application | Error 2014-06-14 11:37:57,934 [localhost-startStop-1] ERROR resource.ResourceMeta - Resource not found: /assets/jquery.js | Error 2014-06-14 11:37:58,535 [localhost-startStop-1] ERROR resource.ResourceMeta - Resource not found: /assets/jquery.js
Getting the same error. Any idea how to resolve this?
Error | 2014-06-17 22:57:54,915 [localhost-startStop-1] ERROR resource.ResourceMeta - Resource not found: /assets/jquery.js Error | 2014-06-17 22:57:55,959 [localhost-startStop-1] ERROR resource.ResourceMeta - Resource not found: /assets/jquery.js
Getting the same error. Any idea how to resolve this?
yes, you must comment
// compile ':asset-pipeline:1.8.3'
Date: Tue, 17 Jun 2014 23:03:57 -0700 From: [email protected] To: [email protected] CC: [email protected] Subject: Re: [KickstartWithBootstrap] Fails with Grails 2.4.0 (#87)
Getting the same error. Any idea how to resolve this?
Error | 2014-06-17 22:57:54,915 [localhost-startStop-1] ERROR resource.ResourceMeta - Resource not found: /assets/jquery.js Error | 2014-06-17 22:57:55,959 [localhost-startStop-1] ERROR resource.ResourceMeta - Resource not found: /assets/jquery.js
— Reply to this email directly or view it on GitHub.
Even after fixing the isssues commented above, when I launch a new fresh app, the following error shows up: |Running Grails application Error | 2014-06-22 12:11:35,269 [localhost-startStop-1] ERROR [localhost].[/240kicksinsegu] - Exception starting filter sitemesh Message: org.codehaus.groovy.grails.web.sitemesh.GrailsPageFilter Line | Method ->> 59 | findClass in org.grails.plugins.tomcat.ParentDelegatingClassLoader
| 425 | loadClass in java.lang.ClassLoader | 358 | loadClass in '' | 262 | run in java.util.concurrent.FutureTask | 1145 | runWorker in java.util.concurrent.ThreadPoolExecutor | 615 | run in java.util.concurrent.ThreadPoolExecutor$Worker ^ 745 | run . . . in java.lang.Thread Error | 2014-06-22 12:11:35,761 [localhost-startStop-1] ERROR core.StandardContext - Error filterStart Error | 2014-06-22 12:11:35,761 [localhost-startStop-1] ERROR core.StandardContext - Context [/240kicksinsegu] startup failed due to previous errors
Did you run a "grails clean" before "grails run-app"?
I tried again, I deleted every cache grails have. Then I created a fresh new project. I change only BuildConfig.groovy:
// compile ":asset-pipeline:1.8.11" runtime ":resources:1.2.8" compile ":kickstart-with-bootstrap:1.1.0"
That makes compile the whole project, but when I hit run-app (I use GGTS), keeps failing:
|Running Grails application Error | 2014-07-26 20:45:44,121 [localhost-startStop-1] ERROR [localhost].[/asdf] - Exception starting filter sitemesh Message: org.codehaus.groovy.grails.web.sitemesh.GrailsPageFilter Line | Method ->> 59 | findClass in org.grails.plugins.tomcat.ParentDelegatingClassLoader
| 425 | loadClass in java.lang.ClassLoader | 358 | loadClass in '' | 262 | run in java.util.concurrent.FutureTask | 1145 | runWorker in java.util.concurrent.ThreadPoolExecutor | 615 | run in java.util.concurrent.ThreadPoolExecutor$Worker ^ 745 | run . . . in java.lang.Thread Error | 2014-07-26 20:45:44,687 [localhost-startStop-1] ERROR core.StandardContext - Error filterStart Error | 2014-07-26 20:45:44,687 [localhost-startStop-1] ERROR core.StandardContext - Context [/asdf] startup failed due to previous errors |Server running. Browse to http://localhost:8080/asdf
I did "grails clean", tried again, same result
I think it has to do with the bootstrap plugin or another GUI plugin, asset-pipeline was meant to replace the resources plugin(http://grails.org/plugin/asset-pipeline ),the bootstrap plugin makes use of the resources plugin (https://github.com/joergrech/KickstartWithBootstrap/blob/master/grails-app/conf/KickstartResources.groovy), an older build which does not work well with grails 2.4.2 .. You have to tell it's author(https://github.com/joergrech) to refactor the code to use the newer resorces plugin or the asset pipeline plugin.............Hope this helps
I think I've made it work. googleing sitemesh changes 2.4, I found: http://grails.org/doc/2.4.x/guide/upgradingFrom23.html So, I deleted two sections in web.xml about sitemesh, and it make the site load. I'll be testing funcionality, but it seems to work just fine.
I have a new project:
Error | 2014-07-28 06:31:38,703 [http-bio-8080-exec-9] ERROR [/GrailsApplication1].[gsp] - Servlet.service() for servlet [gsp] in context with path [/GrailsApplication1] threw exception [org.springframework.web.util.NestedServletException: Request processing failed; nested exception is java.lang.NullPointerException] with root cause Message: null Line | Method ->> 198 | doFilter in grails.plugin.cache.web.filter.PageFragmentCachingFilter
| 63 | doFilter in grails.plugin.cache.web.filter.AbstractFilter | 1145 | runWorker in java.util.concurrent.ThreadPoolExecutor | 615 | run in java.util.concurrent.ThreadPoolExecutor$Worker ^ 724 | run . . . in java.lang.Thread
why?
more info, which grails version? which plugins ae you using? are you upgrading?
I use grails 2.4.0
build ':tomcat:7.0.52.1' // plugins for the compile step
compile ':scaffolding:2.1.0'
compile ':cache:1.1.3'
compile ':asset-pipeline:1.8.3' // plugins needed at runtime but not for compilation
runtime ':hibernate4:4.3.5.2' // or ':hibernate:3.6.10.14'
runtime ':database-migration:1.4.0'
runtime ':jquery:1.11.0.2'
runtime ":resources:1.2.8"
compile ":kickstart-with-bootstrap:1.1.0"
Date: Sun, 27 Jul 2014 23:58:21 -0700 From: [email protected] To: [email protected] CC: [email protected] Subject: Re: [KickstartWithBootstrap] Fails with Grails 2.4.0 (#87)
more info, which grails version? which plugins ae you using? are you upgrading?
— Reply to this email directly or view it on GitHub.
Comment either asset-pieline or resources plugin, asset-pieline plugin was meant to replace resources plugin in grails 2.4
Now it's work fine
My BuildConfig.groovy is:
compile ":kickstart-with-bootstrap:1.1.0"
runtime ":resources:1.2.8"
thank you
Luca
Date: Mon, 28 Jul 2014 03:27:07 -0700 From: [email protected] To: [email protected] CC: [email protected] Subject: Re: [KickstartWithBootstrap] Fails with Grails 2.4.0 (#87)
Comment either asset-pieline or resources plugin, asset-pieline plugin was meant to replace resources plugin in grails 2.4
— Reply to this email directly or view it on GitHub.
I resolved the resource not found by removing the pipeline plugin but still I get the error below
2014-09-25 11:40:58,991 [localhost-startStop-1] ERROR [localhost].[/PDLuck] - Exception starting filter sitemesh Message: org.codehaus.groovy.grails.web.sitemesh.GrailsPageFilter Line | Method ->> 59 | findClass in org.grails.plugins.tomcat.ParentDelegatingClassLoader
| 423 | loadClass in java.lang.ClassLoader | 356 | loadClass 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 Error | 2014-09-25 11:40:59,149 [localhost-startStop-1] ERROR core.StandardContext - Error filterStart
My plugins
plugins {
// compile ":asset-pipeline:1.9.6" compile ":spring-security-core:2.0-RC4" compile ":mongodb:3.0.2" compile ":kickstart-with-bootstrap:1.1.0"
// plugins needed at runtime but not for compilation
// runtime ":hibernate4:4.3.5.5" // or ":hibernate:3.6.10.17" runtime ":database-migration:1.4.0" runtime ":jquery:1.11.1" runtime ":resources:1.2.8"
}
In BuildConfig.groovy Comment out the following compile ":asset-pipeline:1.9.6"
Add the following runtime ":resources:1.2.8"
Under src/templates/war/web.xml
Comment out the filter tag with filtername sitemesh as follows
<filter>
<
Also comment out the corresponding filter-mapping <filter-mapping> <filter-name>sitemesh</filter-name> <url-pattern>/*</url-pattern> <dispatcher>REQUEST</dispatcher> <dispatcher>ERROR</dispatcher> </filter-mapping>
Run the app now!!
ajayush thanks now it works!
This error occurs if you have run "install templates" at any point in the past before you upgraded to grails 2.4.x.
Simply running the "install templates" command again and overwriting the templates solves this problem
I disagree with the comment above.
I can reproduce this issue with brand new new grail 2.4.x project,
Steps to reproduce:
- create new grails project in ggts
- add: compile ":kickstart-with-bootstrap:1.1.0" -> to the BuildConfig.groovy
- grails kickstart
And then you start having fun (sarcasm)...
add resource dependency 1.2.8, then comment out assets-pipeline... then comment out sitemesh then..ok, seems to work.
Alas! no. Because all the other updated plugins require assets-pipeline.
Now, I was able to get the resources plugin to play friendly with the assets-pipeline plugin, but only when running in "prod" mode. Seems the assets plugin behaves quite differently in dev mode or prod mode.
Long rant over. I love this plugin, any way to have it upgraded to use the assets plugin instead of resources to bring it inline with the new versions of grails?