刚刚将应用程序从grails 2.3.4升级到2.3.7,将Tomcat和hibernate更改为上一版本。 但是,即使正确启动了tomcat引擎,run-app也无法启动应用程序:
| Server running. Browse to http://localhost:8080/MyApp
| Application loaded in interactive mode. Type 'stop-app' to shutdown.
所有使用2.3.4(spring security,ACL,数据库映射和hibernate)初始化的脚本功能都缺乏以正确的方式运行..任何线索?到目前为止Spring文件是否受到影响?
更新
使用run-war允许应用程序正常启动:
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
所以,我认为它缩小了分叉模式的错误(或者我错过了其他的东西?)
这是我的fork配置:
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
]
答案 0 :(得分:0)
尝试推荐的资源插件版本更改,
runtime ':resources:1.2.7'
并在配置文件中添加以下内容
grails.resources.adhoc.excludes = ['**/WEB-INF/**','**/META-INF/**']
请参阅this link了解详情。
答案 1 :(得分:0)
Grails 2.3.7附带的Hibernate插件存在多个数据源和数据源的问题。像Mongo这样的提供商。升级到“:hibernate:3.6.10.10”