|
View:
New views
7 Messages
—
Rating Filter:
Alert me
|
|
|
1.0.3 - No such property: context for class: java.lang.StringAck! Upgraded a perfectly good 1.0.2 project to 1.0.3 and after a clean it still won't start: [groovyc] Compiling 1 source file to /Users/marc/.grails/1.0.3/ projects/Cobra/classes Could not execute method context. No such property: context for class: java.lang.String I have commented out all the per-env log stuff (which should work - breaking that is a regression) and anything that mentions "context" e.g. I use FCK editor which uses "web.app.context.path" settings. Anyway, all commented out, still broken. Is there any info on this regression and the workarounds? It seems rather painful... Marc --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
Re: 1.0.3 - No such property: context for class: java.lang.StringI would say the problem is caused by this code in Package.groovy
// Get the application context path by looking for a property named 'app.context' in the following order of precedence: // System properties // application.properties // config // default to grailsAppName if not specified serverContextPath = System.getProperty("app.context") serverContextPath = serverContextPath ?: Ant.antProject.properties.'app.context' serverContextPath = serverContextPath ?: config.grails.app.context serverContextPath = serverContextPath ?: grailsAppName The third ternary Cheers On Thu, Jul 17, 2008 at 7:44 PM, Marc Palmer <marc@...> wrote: > > Ack! > > Upgraded a perfectly good 1.0.2 project to 1.0.3 and after a clean it still > won't start: > > [groovyc] Compiling 1 source file to > /Users/marc/.grails/1.0.3/projects/Cobra/classes > Could not execute method context. > No such property: context for class: java.lang.String > > I have commented out all the per-env log stuff (which should work - breaking > that is a regression) and anything that mentions "context" e.g. I use FCK > editor which uses "web.app.context.path" settings. Anyway, all commented > out, still broken. > > Is there any info on this regression and the workarounds? It seems rather > painful... > > Marc > > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > > > -- Graeme Rocher Grails Project Lead G2One, Inc. Chief Technology Officer http://www.g2one.com --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
Re: 1.0.3 - No such property: context for class: java.lang.StringOn 17 Jul 2008, at 20:17, Graeme Rocher wrote: > I would say the problem is caused by this code in Package.groovy > > // Get the application context path by looking for a property > named 'app.context' in the following order of precedence: > // System properties > // application.properties > // config > // default to grailsAppName if not specified > > serverContextPath = System.getProperty("app.context") > serverContextPath = serverContextPath ?: > Ant.antProject.properties.'app.context' > serverContextPath = serverContextPath ?: config.grails.app.context > serverContextPath = serverContextPath ?: grailsAppName > > > The third ternary OK so this looks like a bug as previously this was not a problem, and it should be defaulting to to grailsAppName if there is no such property "context" on config.grails.app? Pls confirm and I will jira (including workaround of specifying grails.app.context) and fix in trunk :) Thanks for the pointer! Marc --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
Re: 1.0.3 - No such property: context for class: java.lang.StringOn 17 Jul 2008, at 20:17, Graeme Rocher wrote: > I would say the problem is caused by this code in Package.groovy > > // Get the application context path by looking for a property > named 'app.context' in the following order of precedence: > // System properties > // application.properties > // config > // default to grailsAppName if not specified > > serverContextPath = System.getProperty("app.context") > serverContextPath = serverContextPath ?: > Ant.antProject.properties.'app.context' > serverContextPath = serverContextPath ?: config.grails.app.context > serverContextPath = serverContextPath ?: grailsAppName > > UGH. Ugh indeed. "config.grails.app.context" is not the problem. If you set that, it still fails. It does -not- fail if you set -Dapp.context=xxx So the problem is the Ant properties line, it seems. Which... isn't so easy to workaround is it. Why is this broken for some projects and not others? I have one 1.0.3 project (also upgraded from 1.0.2) that requires no workarounds? Marc --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
Re: 1.0.3 - No such property: context for class: java.lang.Stringmaybe I am jumping in too late and saying something you already know, but....
is this not caused by using "grails.app" instead of "grails" in your config? e.g., log4j { logger { // this //grails.app="debug,stdout" //should be grails = "debug,stdout" }} If I recall, there was a point in Grails history where you had to change "grails" to "grails.app" to set other "grails.*" stuff which is now org.codehaus.groovy.grails.*. So only some of my apps had it. Steve
|
|
|
Re: 1.0.3 - No such property: context for class: java.lang.StringI'm even later jumping in (found this in the archive), but wanted to add a slight modification that might help somebody. In 1.0.3, I changed to something like this: environments { development { log4j { logger { //in 1.0.2 was: //grails."app"="debug,stdout" //in 1.0.3 now use: grails { app="debug" } } } } } John |
|
|
Re: 1.0.3 - No such property: context for class: java.lang.StringTweaking the log4j section of Config.groovy also fixed this problem for me. It seem strange that this isn't taken care of by the "grails update"... In any case, things are working now. |
| Free embeddable forum powered by Nabble | Forum Help |