Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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.
- 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.
- 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.
- I would appreciate any directions!
- Marcello de Sales ([email protected])
- """"""""""""""""""""""" Grails run-app """"""""""""""""""""""""""""""""""""""""
- Welcome to Grails 1.3.4 - http://grails.org/
- Licensed under Apache Standard License 2.0
- Grails home is set to: /u1/grails-1.3.4/
- Base Directory: /u1/migration1.3.4
- Resolving dependencies...
- Dependencies resolved in 2830ms.
- Running script /u1/grails-1.3.4/scripts/RunApp.groovy
- Environment set to development
- [delete] Deleting directory /home/mdesales/.grails/1.3.4/projects/migration1.3.4/tomcat
- Running Grails application..
- 2010-08-10 23:43:21,848 [main] DEBUG spring.BeanBuilder - Configuring controller org.codehaus.groovy.grails.plugins.dbutil.DbUtilController
- 2010-08-10 23:43:21,856 [main] DEBUG spring.BeanBuilder - Configuring controller org.codehaus.groovy.grails.plugins.ofchart.demo.DemoController
- 2010-08-10 23:43:21,856 [main] DEBUG spring.BeanBuilder - Configuring controller com.mycompany.LoginController
- 2010-08-10 23:43:21,869 [main] INFO spring.BeanBuilder - [RuntimeConfiguration] Configuring data source for environment: DEVELOPMENT
- 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.
- Using Grails' default cache provider: 'net.sf.ehcache.hibernate.EhCacheProvider'
- Configuring Spring Security ...
- Configuring Spring Security ACL ...
- Configuring Spring Security LDAP ...
- Configuring Spring Security OpenID ...
- 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.
- 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.
- 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.
- The source of the configuration was classpath.
- The diskStore path for this CacheManager will be set to /tmp/ehcache_auto_created_1281509013049.
- 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.
- 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.
- The source of the configuration was classpath.
- The diskStore path for this CacheManager will be set to /tmp/ehcache_auto_created_1281509013522.
- 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.
- 2010-08-10 23:43:34,959 [BackgroundThreadManager Thread (BG#1)] INFO BackgroundThreadManager - Starting BackgroundThreadManager Thread (BG#1)
- 2010-08-10 23:43:34,966 [BackgroundThreadManager Thread (BG#5)] INFO BackgroundThreadManager - Starting BackgroundThreadManager Thread (BG#5)
- 2010-08-10 23:43:34,964 [BackgroundThreadManager Thread (BG#3)] INFO BackgroundThreadManager - Starting BackgroundThreadManager Thread (BG#3)
- 2010-08-10 23:43:34,964 [BackgroundThreadManager Thread (BG#4)] INFO BackgroundThreadManager - Starting BackgroundThreadManager Thread (BG#4)
- 2010-08-10 23:43:34,964 [BackgroundThreadManager Thread (BG#2)] INFO BackgroundThreadManager - Starting BackgroundThreadManager Thread (BG#2)
- 2010-08-10 23:43:35,536 [main] DEBUG util.OpenID4JavaUtils - Resource /openid4java.properties not found.
- 2010-08-10 23:43:35,537 [main] DEBUG html.HtmlResolver - discovery.html.parser:org.openid4java.discovery.html.CyberNekoDOMHtmlParser
- 2010-08-10 23:43:35,542 [main] DEBUG yadis.YadisResolver - discovery.yadis.html.parser:org.openid4java.discovery.yadis.CyberNekoDOMYadisHtmlParser
- 2010-08-10 23:43:35,546 [main] DEBUG yadis.YadisResolver - discovery.xrds.parser:org.openid4java.discovery.xrds.XrdsParserImpl
- 2010-08-10 23:43:35,549 [main] DEBUG discovery.Discovery - discovery.xri.resolver:org.openid4java.discovery.xri.XriDotNetProxyResolver
- 2010-08-10 23:43:35,583 [main] DEBUG xri.XriDotNetProxyResolver - discovery.xrds.parser:org.openid4java.discovery.xrds.XrdsParserImpl
- 2010-08-10 23:43:35,606 [main] WARN server.RealmVerifier - RP discovery / realm validation disabled;
- 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
- 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
- at org.grails.tomcat.TomcatServer.start(TomcatServer.groovy:164)
- at grails.web.container.EmbeddableServer$start.call(Unknown Source)
- at _GrailsRun_groovy$_run_closure5_closure12.doCall(_GrailsRun_groovy:158)
- at _GrailsRun_groovy$_run_closure5_closure12.doCall(_GrailsRun_groovy)
- at _GrailsSettings_groovy$_run_closure10.doCall(_GrailsSettings_groovy:280)
- at _GrailsSettings_groovy$_run_closure10.call(_GrailsSettings_groovy)
- at _GrailsRun_groovy$_run_closure5.doCall(_GrailsRun_groovy:149)
- at _GrailsRun_groovy$_run_closure5.call(_GrailsRun_groovy)
- at _GrailsRun_groovy.runInline(_GrailsRun_groovy:116)
- at _GrailsRun_groovy.this$4$runInline(_GrailsRun_groovy)
- at _GrailsRun_groovy$_run_closure1.doCall(_GrailsRun_groovy:59)
- at RunApp$_run_closure1.doCall(RunApp.groovy:33)
- at gant.Gant$_dispatch_closure5.doCall(Gant.groovy:381)
- at gant.Gant$_dispatch_closure7.doCall(Gant.groovy:415)
- at gant.Gant$_dispatch_closure7.doCall(Gant.groovy)
- at gant.Gant.withBuildListeners(Gant.groovy:427)
- at gant.Gant.this$2$withBuildListeners(Gant.groovy)
- at gant.Gant$this$2$withBuildListeners.callCurrent(Unknown Source)
- at gant.Gant.dispatch(Gant.groovy:415)
- at gant.Gant.this$2$dispatch(Gant.groovy)
- at gant.Gant.invokeMethod(Gant.groovy)
- at gant.Gant.executeTargets(Gant.groovy:590)
- at gant.Gant.executeTargets(Gant.groovy:589)
- 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
- ... 23 more
- Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'objectDefinitionSource' is defined
- ... 23 more
- ---------------------------------------- application.properties
- #Grails Metadata file
- #Tue Aug 10 21:44:58 PDT 2010
- app.grails.version=1.3.4
- app.name=svnedge
- app.servlet.version=2.4
- app.version=1.2.0
- plugins.background-thread=1.6
- plugins.code-coverage=1.1.8
- plugins.cometd=0.1.5
- plugins.db-util=0.4
- plugins.ext=2.0.2
- plugins.functional-test=1.2.7
- plugins.hibernate=1.3.4
- plugins.ivy=2.0.0-rc1
- plugins.jetty=1.2-SNAPSHOT
- plugins.ofchart=0.6
- plugins.quartz=0.4.2
- plugins.spring-security-acl=1.0.1
- plugins.spring-security-core=1.0.1
- plugins.spring-security-ldap=1.0.1
- plugins.spring-security-openid=1.0
- plugins.springcache=1.2
- plugins.tomcat=1.3.4
- --------------------------------------- BuildConfig.groovy
- grails.project.class.dir = "target/classes"
- grails.project.test.class.dir = "target/test-classes"
- grails.project.test.reports.dir = "target/test-reports"
- //grails.project.war.file = "target/${appName}-${appVersion}.war"
- grails.project.dependency.resolution = {
- // inherit Grails' default dependencies
- inherits("global") {
- // uncomment to disable ehcache
- // excludes 'ehcache'
- }
- log "warn" // log level of Ivy resolver, either 'error', 'warn', 'info', 'debug' or 'verbose'
- repositories {
- grailsPlugins()
- grailsHome()
- grailsCentral()
- // uncomment the below to enable remote dependency resolution
- // from public Maven repositories
- //mavenLocal()
- //mavenCentral()
- //mavenRepo "http://snapshots.repository.codehaus.org"
- //mavenRepo "http://repository.codehaus.org"
- //mavenRepo "http://download.java.net/maven/2/"
- //mavenRepo "http://repository.jboss.com/maven2/"
- }
- dependencies {
- // specify dependencies here under either 'build', 'compile', 'runtime', 'test' or 'provided' scopes eg.
- // runtime 'mysql:mysql-connector-java:5.1.5'
- }
- }
- --------------------------------------- Config.groovy
- // locations to search for config files that get merged into the main config
- // config files can either be Java properties files or ConfigSlurper scripts
- // grails.config.locations = [ "classpath:${appName}-config.properties",
- // "classpath:${appName}-config.groovy",
- // "file:${userHome}/.grails/${appName}-config.properties",
- // "file:${userHome}/.grails/${appName}-config.groovy"]
- // if(System.properties["${appName}.config.location"]) {
- // grails.config.locations << "file:" + System.properties["${appName}.config.location"]
- // }
- grails.mime.file.extensions = true // enables the parsing of file extensions from URLs into the request format
- grails.mime.use.accept.header = false
- grails.mime.types = [ html: ['text/html','application/xhtml+xml'],
- xml: ['text/xml', 'application/xml'],
- text: 'text/plain',
- js: 'text/javascript',
- rss: 'application/rss+xml',
- atom: 'application/atom+xml',
- css: 'text/css',
- csv: 'text/csv',
- all: '*/*',
- json: ['application/json','text/json'],
- form: 'application/x-www-form-urlencoded',
- multipartForm: 'multipart/form-data'
- ]
- // The default codec used to encode data with ${}
- grails.views.default.codec="none" // none, html, base64
- grails.views.gsp.encoding="UTF-8"
- grails.converters.encoding="UTF-8"
- // SpringSecurity plugin.
- grails.plugins.springsecurity.active = true
- grails.plugins.springsecurity.userLookup.userDomainClassName = "com.mycompany.User"
- grails.plugins.springsecurity.authority.className = "com.mycompany.Role"
- grails.plugins.springsecurity.securityConfigType = false
- grails.plugins.springsecurity.securityConfigType = true
- grails.plugins.springsecurity.password.algorithm = "MD5"
- grails.plugins.springsecurity.password.encodeHashAsBase64 = false
- grails.plugins.springsecurity.providerNames = [
- 'daoAuthenticationProvider',
- 'anonymousAuthenticationProvider']
- grails.plugins.springsecurity.filterNames = [
- 'httpSessionContextIntegrationFilter',
- 'logoutFilter',
- 'authenticationProcessingFilter',
- 'anonymousProcessingFilter',
- 'exceptionTranslationFilter',
- 'filterInvocationInterceptor']
- // enabled native2ascii conversion of i18n properties files
- grails.enable.native2ascii = true
- // See GRAILS-5726, we are not using jndi
- grails.naming.entries = 0 // not instanceof Map
- grails.app.context="/csvn"
- grails.logging.jul.usebridge = true
- // set per-environment serverURL stem for creating absolute links
- environments {
- test {
- }
- development {
- }
- production {
- grails.serverURL = "http://www.changeme.com"
- log4j = {
- appenders {
- //not to log to the regular svnedge.log
- 'null' name:'stacktrace'
- }
- root {
- warn 'console'
- additivity = true
- }
- // Commenting out to not output to svnedge.log
- warn 'grails.app'
- }
- }
- }
- // log4j configuration
- log4j = {
- // Example of changing the log pattern for the default console
- // appender:
- //
- //appenders {
- // console name:'stdout', layout:pattern(conversionPattern: '%c{2} %m%n')
- //}
- error 'org.codehaus.groovy.grails', // grails core and web
- 'org.codehaus.groovy.grails.plugins', // plugins
- 'org.codehaus.groovy.grails.orm.hibernate', // hibernate integration
- 'org.springframework',
- 'org.hibernate'
- warn 'org.mortbay.log',
- 'org.apache',
- 'net.sf.ehcache',
- 'org.quartz'
- debug 'grails.app'
- root {
- debug 'console'
- additivity = true
- }
- }
- ---------------------------------------------- BootStrap.groovy
- import grails.util.GrailsUtil;
- /**
- * Regular BootStrap for Grails.
- */
- class BootStrap {
- def operatingSystemService
- def networkingService
- def replicationService
- def init = { servletContext ->
- def config = ConfigurationHolder.config
- operatingSystemService.bootstrap()
- networkingService.bootStrap()
- def trustFilePath = GrailsUtil.environment == "test" ?
- System.properties['base.dir'] + "/web-app" + trustFile :
- new URL(servletContext.getResource(trustFile)).getPath()
- }
- def destroy = {
- networkingService.destroy()
- operatingSystemService.destroy()
- }
- }
Add Comment
Please, Sign In to add comment