Guest User

Attempt to migrate project from Grails 1.2.1 to Grails 1.3.4

a guest
Aug 11th, 2010
450
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.98 KB | None | 0 0
  1. I have just started the migration process from a grails application version 1.2.1 to 1.3.4 containing different plugins, including acegi, functional tests, cometd, etc... I could get all the classes compiling using the latest STS grails plugin, updating the plugins with ivy and replacing the acegi with the Spring Security plugin.
  2.  
  3. The ACEGI-to-SpringSecurity was performed following the suggestions at http://grails.1312388.n4.nabble.com/Migrating-Acegi-plugin-to-new-Security-plugin-td2290399.html. I'm still maintaining the installation of cometd 0.1.5 version.
  4.  
  5. One of the first differences I noticed is that tomcat is the main application server instead of jetty. At the moment, I can't even start running the application... I noticed I ended up with both plugins (plugins.jetty=1.2-SNAPSHOT and plugins.tomcat=1.3.4)... Could this be the problem? I'm providing the result of "grails run-app", as well as application.properties, BuildConfig.groovy, Config.groovy, Bootstrap.groovy.
  6.  
  7. I would appreciate any directions!
  8. Marcello de Sales ([email protected])
  9.  
  10. """"""""""""""""""""""" Grails run-app """"""""""""""""""""""""""""""""""""""""
  11.  
  12. Welcome to Grails 1.3.4 - http://grails.org/
  13. Licensed under Apache Standard License 2.0
  14. Grails home is set to: /u1/grails-1.3.4/
  15.  
  16. Base Directory: /u1/migration1.3.4
  17. Resolving dependencies...
  18. Dependencies resolved in 2830ms.
  19. Running script /u1/grails-1.3.4/scripts/RunApp.groovy
  20. Environment set to development
  21. [delete] Deleting directory /home/mdesales/.grails/1.3.4/projects/migration1.3.4/tomcat
  22. Running Grails application..
  23. 2010-08-10 23:43:21,848 [main] DEBUG spring.BeanBuilder - Configuring controller org.codehaus.groovy.grails.plugins.dbutil.DbUtilController
  24. 2010-08-10 23:43:21,856 [main] DEBUG spring.BeanBuilder - Configuring controller org.codehaus.groovy.grails.plugins.ofchart.demo.DemoController
  25. 2010-08-10 23:43:21,856 [main] DEBUG spring.BeanBuilder - Configuring controller com.mycompany.LoginController
  26. 2010-08-10 23:43:21,869 [main] INFO spring.BeanBuilder - [RuntimeConfiguration] Configuring data source for environment: DEVELOPMENT
  27. 2010-08-10 23:43:22,182 [main] ERROR spring.BeanBuilder - WARNING: Your cache provider is set to 'com.opensymphony.oscache.hibernate.OSCacheProvider' in DataSource.groovy, however the class for this provider cannot be found.
  28. Using Grails' default cache provider: 'net.sf.ehcache.hibernate.EhCacheProvider'
  29.  
  30. Configuring Spring Security ...
  31. Configuring Spring Security ACL ...
  32. Configuring Spring Security LDAP ...
  33. Configuring Spring Security OpenID ...
  34. 2010-08-10 23:43:29,447 [main] WARN hibernate.EhCacheProvider - Could not find a specific ehcache configuration for cache named [org.hibernate.cache.UpdateTimestampsCache]; using defaults.
  35. 2010-08-10 23:43:29,470 [main] WARN hibernate.EhCacheProvider - Could not find a specific ehcache configuration for cache named [org.hibernate.cache.StandardQueryCache]; using defaults.
  36. 2010-08-10 23:43:33,049 [main] WARN ehcache.CacheManager - Creating a new instance of CacheManager using the diskStorePath "/tmp" which is already used by an existing CacheManager.
  37. The source of the configuration was classpath.
  38. The diskStore path for this CacheManager will be set to /tmp/ehcache_auto_created_1281509013049.
  39. To avoid this warning consider using the CacheManager factory methods to create a singleton CacheManager or specifying a separate ehcache configuration (ehcache.xml) for each CacheManager instance.
  40. 2010-08-10 23:43:33,522 [main] WARN ehcache.CacheManager - Creating a new instance of CacheManager using the diskStorePath "/tmp" which is already used by an existing CacheManager.
  41. The source of the configuration was classpath.
  42. The diskStore path for this CacheManager will be set to /tmp/ehcache_auto_created_1281509013522.
  43. To avoid this warning consider using the CacheManager factory methods to create a singleton CacheManager or specifying a separate ehcache configuration (ehcache.xml) for each CacheManager instance.
  44. 2010-08-10 23:43:34,959 [BackgroundThreadManager Thread (BG#1)] INFO BackgroundThreadManager - Starting BackgroundThreadManager Thread (BG#1)
  45. 2010-08-10 23:43:34,966 [BackgroundThreadManager Thread (BG#5)] INFO BackgroundThreadManager - Starting BackgroundThreadManager Thread (BG#5)
  46. 2010-08-10 23:43:34,964 [BackgroundThreadManager Thread (BG#3)] INFO BackgroundThreadManager - Starting BackgroundThreadManager Thread (BG#3)
  47. 2010-08-10 23:43:34,964 [BackgroundThreadManager Thread (BG#4)] INFO BackgroundThreadManager - Starting BackgroundThreadManager Thread (BG#4)
  48. 2010-08-10 23:43:34,964 [BackgroundThreadManager Thread (BG#2)] INFO BackgroundThreadManager - Starting BackgroundThreadManager Thread (BG#2)
  49. 2010-08-10 23:43:35,536 [main] DEBUG util.OpenID4JavaUtils - Resource /openid4java.properties not found.
  50. 2010-08-10 23:43:35,537 [main] DEBUG html.HtmlResolver - discovery.html.parser:org.openid4java.discovery.html.CyberNekoDOMHtmlParser
  51. 2010-08-10 23:43:35,542 [main] DEBUG yadis.YadisResolver - discovery.yadis.html.parser:org.openid4java.discovery.yadis.CyberNekoDOMYadisHtmlParser
  52. 2010-08-10 23:43:35,546 [main] DEBUG yadis.YadisResolver - discovery.xrds.parser:org.openid4java.discovery.xrds.XrdsParserImpl
  53. 2010-08-10 23:43:35,549 [main] DEBUG discovery.Discovery - discovery.xri.resolver:org.openid4java.discovery.xri.XriDotNetProxyResolver
  54. 2010-08-10 23:43:35,583 [main] DEBUG xri.XriDotNetProxyResolver - discovery.xrds.parser:org.openid4java.discovery.xrds.XrdsParserImpl
  55. 2010-08-10 23:43:35,606 [main] WARN server.RealmVerifier - RP discovery / realm validation disabled;
  56. 2010-08-10 23:43:37,037 [main] ERROR context.GrailsContextLoader - Error executing bootstraps: Error creating bean with name 'webInvocationPrivilegeEvaluator': Cannot resolve reference to bean 'filterInvocationInterceptor' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'filterInvocationInterceptor': Cannot resolve reference to bean 'objectDefinitionSource' while setting bean property 'securityMetadataSource'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'objectDefinitionSource' is defined
  57. org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'webInvocationPrivilegeEvaluator': Cannot resolve reference to bean 'filterInvocationInterceptor' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'filterInvocationInterceptor': Cannot resolve reference to bean 'objectDefinitionSource' while setting bean property 'securityMetadataSource'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'objectDefinitionSource' is defined
  58. at org.grails.tomcat.TomcatServer.start(TomcatServer.groovy:164)
  59. at grails.web.container.EmbeddableServer$start.call(Unknown Source)
  60. at _GrailsRun_groovy$_run_closure5_closure12.doCall(_GrailsRun_groovy:158)
  61. at _GrailsRun_groovy$_run_closure5_closure12.doCall(_GrailsRun_groovy)
  62. at _GrailsSettings_groovy$_run_closure10.doCall(_GrailsSettings_groovy:280)
  63. at _GrailsSettings_groovy$_run_closure10.call(_GrailsSettings_groovy)
  64. at _GrailsRun_groovy$_run_closure5.doCall(_GrailsRun_groovy:149)
  65. at _GrailsRun_groovy$_run_closure5.call(_GrailsRun_groovy)
  66. at _GrailsRun_groovy.runInline(_GrailsRun_groovy:116)
  67. at _GrailsRun_groovy.this$4$runInline(_GrailsRun_groovy)
  68. at _GrailsRun_groovy$_run_closure1.doCall(_GrailsRun_groovy:59)
  69. at RunApp$_run_closure1.doCall(RunApp.groovy:33)
  70. at gant.Gant$_dispatch_closure5.doCall(Gant.groovy:381)
  71. at gant.Gant$_dispatch_closure7.doCall(Gant.groovy:415)
  72. at gant.Gant$_dispatch_closure7.doCall(Gant.groovy)
  73. at gant.Gant.withBuildListeners(Gant.groovy:427)
  74. at gant.Gant.this$2$withBuildListeners(Gant.groovy)
  75. at gant.Gant$this$2$withBuildListeners.callCurrent(Unknown Source)
  76. at gant.Gant.dispatch(Gant.groovy:415)
  77. at gant.Gant.this$2$dispatch(Gant.groovy)
  78. at gant.Gant.invokeMethod(Gant.groovy)
  79. at gant.Gant.executeTargets(Gant.groovy:590)
  80. at gant.Gant.executeTargets(Gant.groovy:589)
  81. Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'filterInvocationInterceptor': Cannot resolve reference to bean 'objectDefinitionSource' while setting bean property 'securityMetadataSource'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'objectDefinitionSource' is defined
  82. ... 23 more
  83. Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'objectDefinitionSource' is defined
  84. ... 23 more
  85.  
  86. ---------------------------------------- application.properties
  87.  
  88. #Grails Metadata file
  89. #Tue Aug 10 21:44:58 PDT 2010
  90. app.grails.version=1.3.4
  91. app.name=svnedge
  92. app.servlet.version=2.4
  93. app.version=1.2.0
  94. plugins.background-thread=1.6
  95. plugins.code-coverage=1.1.8
  96. plugins.cometd=0.1.5
  97. plugins.db-util=0.4
  98. plugins.ext=2.0.2
  99. plugins.functional-test=1.2.7
  100. plugins.hibernate=1.3.4
  101. plugins.ivy=2.0.0-rc1
  102. plugins.jetty=1.2-SNAPSHOT
  103. plugins.ofchart=0.6
  104. plugins.quartz=0.4.2
  105. plugins.spring-security-acl=1.0.1
  106. plugins.spring-security-core=1.0.1
  107. plugins.spring-security-ldap=1.0.1
  108. plugins.spring-security-openid=1.0
  109. plugins.springcache=1.2
  110. plugins.tomcat=1.3.4
  111.  
  112. --------------------------------------- BuildConfig.groovy
  113.  
  114. grails.project.class.dir = "target/classes"
  115. grails.project.test.class.dir = "target/test-classes"
  116. grails.project.test.reports.dir = "target/test-reports"
  117.  
  118. //grails.project.war.file = "target/${appName}-${appVersion}.war"
  119. grails.project.dependency.resolution = {
  120. // inherit Grails' default dependencies
  121. inherits("global") {
  122. // uncomment to disable ehcache
  123. // excludes 'ehcache'
  124. }
  125. log "warn" // log level of Ivy resolver, either 'error', 'warn', 'info', 'debug' or 'verbose'
  126. repositories {
  127. grailsPlugins()
  128. grailsHome()
  129. grailsCentral()
  130.  
  131. // uncomment the below to enable remote dependency resolution
  132. // from public Maven repositories
  133. //mavenLocal()
  134. //mavenCentral()
  135. //mavenRepo "http://snapshots.repository.codehaus.org"
  136. //mavenRepo "http://repository.codehaus.org"
  137. //mavenRepo "http://download.java.net/maven/2/"
  138. //mavenRepo "http://repository.jboss.com/maven2/"
  139. }
  140. dependencies {
  141. // specify dependencies here under either 'build', 'compile', 'runtime', 'test' or 'provided' scopes eg.
  142. // runtime 'mysql:mysql-connector-java:5.1.5'
  143. }
  144. }
  145.  
  146. --------------------------------------- Config.groovy
  147.  
  148. // locations to search for config files that get merged into the main config
  149. // config files can either be Java properties files or ConfigSlurper scripts
  150.  
  151. // grails.config.locations = [ "classpath:${appName}-config.properties",
  152. // "classpath:${appName}-config.groovy",
  153. // "file:${userHome}/.grails/${appName}-config.properties",
  154. // "file:${userHome}/.grails/${appName}-config.groovy"]
  155.  
  156. // if(System.properties["${appName}.config.location"]) {
  157. // grails.config.locations << "file:" + System.properties["${appName}.config.location"]
  158. // }
  159. grails.mime.file.extensions = true // enables the parsing of file extensions from URLs into the request format
  160. grails.mime.use.accept.header = false
  161. grails.mime.types = [ html: ['text/html','application/xhtml+xml'],
  162. xml: ['text/xml', 'application/xml'],
  163. text: 'text/plain',
  164. js: 'text/javascript',
  165. rss: 'application/rss+xml',
  166. atom: 'application/atom+xml',
  167. css: 'text/css',
  168. csv: 'text/csv',
  169. all: '*/*',
  170. json: ['application/json','text/json'],
  171. form: 'application/x-www-form-urlencoded',
  172. multipartForm: 'multipart/form-data'
  173. ]
  174. // The default codec used to encode data with ${}
  175. grails.views.default.codec="none" // none, html, base64
  176. grails.views.gsp.encoding="UTF-8"
  177. grails.converters.encoding="UTF-8"
  178.  
  179. // SpringSecurity plugin.
  180. grails.plugins.springsecurity.active = true
  181. grails.plugins.springsecurity.userLookup.userDomainClassName = "com.mycompany.User"
  182. grails.plugins.springsecurity.authority.className = "com.mycompany.Role"
  183. grails.plugins.springsecurity.securityConfigType = false
  184. grails.plugins.springsecurity.securityConfigType = true
  185. grails.plugins.springsecurity.password.algorithm = "MD5"
  186. grails.plugins.springsecurity.password.encodeHashAsBase64 = false
  187. grails.plugins.springsecurity.providerNames = [
  188. 'daoAuthenticationProvider',
  189. 'anonymousAuthenticationProvider']
  190. grails.plugins.springsecurity.filterNames = [
  191. 'httpSessionContextIntegrationFilter',
  192. 'logoutFilter',
  193. 'authenticationProcessingFilter',
  194. 'anonymousProcessingFilter',
  195. 'exceptionTranslationFilter',
  196. 'filterInvocationInterceptor']
  197.  
  198. // enabled native2ascii conversion of i18n properties files
  199. grails.enable.native2ascii = true
  200.  
  201. // See GRAILS-5726, we are not using jndi
  202. grails.naming.entries = 0 // not instanceof Map
  203.  
  204. grails.app.context="/csvn"
  205.  
  206. grails.logging.jul.usebridge = true
  207.  
  208. // set per-environment serverURL stem for creating absolute links
  209. environments {
  210. test {
  211.  
  212. }
  213. development {
  214.  
  215. }
  216. production {
  217. grails.serverURL = "http://www.changeme.com"
  218.  
  219. log4j = {
  220.  
  221. appenders {
  222. //not to log to the regular svnedge.log
  223. 'null' name:'stacktrace'
  224. }
  225.  
  226. root {
  227. warn 'console'
  228. additivity = true
  229. }
  230. // Commenting out to not output to svnedge.log
  231. warn 'grails.app'
  232. }
  233. }
  234. }
  235.  
  236. // log4j configuration
  237. log4j = {
  238. // Example of changing the log pattern for the default console
  239. // appender:
  240. //
  241. //appenders {
  242. // console name:'stdout', layout:pattern(conversionPattern: '%c{2} %m%n')
  243. //}
  244.  
  245. error 'org.codehaus.groovy.grails', // grails core and web
  246. 'org.codehaus.groovy.grails.plugins', // plugins
  247. 'org.codehaus.groovy.grails.orm.hibernate', // hibernate integration
  248. 'org.springframework',
  249. 'org.hibernate'
  250.  
  251. warn 'org.mortbay.log',
  252. 'org.apache',
  253. 'net.sf.ehcache',
  254. 'org.quartz'
  255.  
  256. debug 'grails.app'
  257.  
  258. root {
  259. debug 'console'
  260. additivity = true
  261. }
  262. }
  263.  
  264. ---------------------------------------------- BootStrap.groovy
  265.  
  266. import grails.util.GrailsUtil;
  267.  
  268. /**
  269. * Regular BootStrap for Grails.
  270. */
  271. class BootStrap {
  272.  
  273. def operatingSystemService
  274. def networkingService
  275. def replicationService
  276.  
  277. def init = { servletContext ->
  278.  
  279. def config = ConfigurationHolder.config
  280.  
  281. operatingSystemService.bootstrap()
  282. networkingService.bootStrap()
  283.  
  284. def trustFilePath = GrailsUtil.environment == "test" ?
  285. System.properties['base.dir'] + "/web-app" + trustFile :
  286. new URL(servletContext.getResource(trustFile)).getPath()
  287. }
  288.  
  289. def destroy = {
  290. networkingService.destroy()
  291.  
  292. operatingSystemService.destroy()
  293. }
  294. }
Add Comment
Please, Sign In to add comment