简体   繁体   中英

App can't initialize properly after upgrading tp 2.3.7

Just upgraded an app from grails 2.3.4 to 2.3.7, changing Tomcat and hibernate to their last version. However, the run-app can't start the application even if it starts properly the tomcat engine:

| Server running. Browse to http://localhost:8080/MyApp
| Application loaded in interactive mode. Type 'stop-app' to shutdown.

All the scripting features initialized with 2.3.4 (spring security, ACL, database mapping with hibernate) are lacking to run in the right way.. Any clue ? Does spring files have been affected so far ?

Update:

Using run-war allow the application to start normally:

 Compiling 475 source files
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
| Compiling 125 source files

| Compiling 125 source files.....
Log Directory: ./logs
Log4j consoleLevel: WARN appFile Level: DEBUG
Log Directory: ./logs
| Done creating WAR target/MyApp.war
| Running Grails application
Log Directory: target/work/tomcat/logs
Log4j consoleLevel: WARN appFile Level: DEBUG
Log Directory: target/work/tomcat/logs
Configuring Spring Security Core ...
... finished configuring Spring Security Core
Configuring Spring Security ACL ...
... finished configuring Spring Security ACL
2014-03-08 14:46:23,745 ERROR [DefaultUrlMappingEvaluator$UrlMappingBuilder] - URL mapping argument [exception] with value [(*)] must be a valid class
2014-03-08 14:46:23,747 ERROR [DefaultUrlMappingEvaluator$UrlMappingBuilder] - URL mapping argument [exception] with value [(*)] must be a valid class
2014-03-08 14:46:26,579 DEBUG [DefaultExpressionParserFactory] - Initialized shared default Web Flow ExpressionParser org.springframework.webflow.expression.WebFlowOgnlExpressionParser@3b55b707
2014-03-08 14:46:26,630 WARN  [DefaultGrailsApplicationAttributes] - ApplicationContext not found in org.codehaus.groovy.grails.APPLICATION_CONTEXT attribute of servlet context.
2014-03-08 14:46:43,856 ERROR [ResourceMeta] - While processing /bundle-bundle_dynatree_head.css, /css/ui.dynatree.css, a resource was required but not found: /images/ltError.gif
2014-03-08 14:46:44,770 DEBUG [FlowDefinitionRegistryImpl] - Registering flow definition 'org.codehaus.groovy.grails.webflow.engine.builder.FlowBuilder' under id 'store/processOrder'
2014-03-08 14:46:46,350 INFO  [DefaultSecurityFilterChain] - Creating filter chain: Ant [pattern='/**'], [org.springframework.security.web.context.SecurityContextPersistenceFilter@4d3a956, grails.plugin.springsecurity.web.authentication.logout.MutableLogoutFilter@64124f93, grails.plugin.springsecurity.web.authentication.RequestHolderAuthenticationFilter@6e266f38, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@1d4ffe07, grails.plugin.springsecurity.web.filter.GrailsRememberMeAuthenticationFilter@6eae8c99, grails.plugin.springsecurity.web.filter.GrailsAnonymousAuthenticationFilter@590c994, org.springframework.security.web.access.ExceptionTranslationFilter@64a21666, org.springframework.security.web.access.intercept.FilterSecurityInterceptor@4d6cb627]
2014-03-08 14:46:47,603 INFO  [GrailsDispatcherServlet] - FrameworkServlet 'grails': initialization started
2014-03-08 14:46:47,628 INFO  [GrailsDispatcherServlet] - Using MultipartResolver [org.codehaus.groovy.grails.web.multipart.ContentLengthAwareCommonsMultipartResolver@12d80fe8]
2014-03-08 14:46:47,629 INFO  [GrailsDispatcherServlet] - FrameworkServlet 'grails': initialization completed in 25 ms

So, I believe it narrows the error around the forked mode (or i'm missing something else ?)

Here is my fork config:

grails.project.fork.run = true

grails.project.fork = [
    test: false , // configure settings for the test-app JVM
    run: [maxMemory: 1024, minMemory: 256, debug: false, maxPerm: 1024,forkReserve:false], // configure settings for the run-app JVM
    war: [maxMemory: 1024, minMemory: 256, debug: false, maxPerm: 1024], // configure settings for the run-war JVM
    console: [maxMemory: 1024, minMemory: 256, debug: false, maxPerm: 1024,forkReserve:false] // configure settings for the Swing console JVM
]

Try recommended resources plugin version change,

runtime ':resources:1.2.7' 

and add following in your config file

grails.resources.adhoc.excludes = ['**/WEB-INF/**','**/META-INF/**']

see this link for more info.

Hibernate plugin shipped with Grails 2.3.7 had problems with multiple datasources & providers like Mongo. upgrade to ":hibernate:3.6.10.10"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM