Grails upgrade from 1.0.4 to 1.1 problems – part 2

If after upgrade to version 1.1 you will be hit by error like this:

  1.  
  2. ...
  3. log4j:ERROR Could not read configuration file from URL [file:/C:/GrailsApp/web-app/W
  4. java.io.FileNotFoundException: C:\GrailsApp\web-app\WEB-INF\classes\log4j.properties
  5. ...
  6.  

go to web.xml template file in \src\templates\war\ directory of your project and delete lines:

  1.  
  2. ...
  3. <context-param>
  4. <param-name>log4jConfigLocation</param-name>
  5. <param-value>/WEB-INF/classes/log4j.properties</param-value>
  6. </context-param>
  7. ...
  8.  

Grails upgrade from 1.0.4 to 1.1 problems – part 1

Recently I have been upgrading Grails application from version 1.0.4 to version 1.1. After that my test fails with error:

  1.  
  2. No signature of method: roles.beans() is applicable for argument types: (roles$_run_closure1) values: [roles$_run_closure1@b7ad1a]
  3.  

I found that problem was with fixtures. In version 1.0.4 of Grails code like this:

  1.  
  2. beans
  3. {
  4. roleOne(Role)
  5. {
  6. name = ConfigurationHolder.config.security.role.user
  7. }
  8. }
  9.  

works correctly, but after upgrade instant beans{} we should use fixture{} statment:

  1.  
  2. fixture
  3. {
  4. roleOne(Role)
  5. {
  6. name = ConfigurationHolder.config.security.role.user
  7. }
  8. }
  9.  

Powered by WordPress with GimpStyle Theme design by Horacio Bella.
Entries and comments feeds. Valid XHTML and CSS.