grails webflow notserializableexception



Grail升级从1.3.7到Grails 2.1.0。Grails Run-App执行。没有错误。

致电WebFlow操作会引发GrailSexceptionResolver错误。说明Grails WebFlow对象无法序列化。我已经浏览了所有课程,以确保所有人都具有"实现序列化"。

错误不识别未序列化的对象,因此无法识别是否应将类字段暂时忽略。

Full Stacktrace:
2016-12-20 09:51:25,750 [http-bio-80-exec-1] DEBUG services.RpgService  - ************ 
| Error 2016-12-20 09:51:26,450 [http-bio-80-exec-1] ERROR errors.GrailsExceptionResolver  - NotSerializableException occurred when processing request: [GET] /…/…/order
org.codehaus.groovy.grails.commons.spring.GrailsWebApplicationContext. Stacktrace follows:
Message: Could not serialize flow execution; make sure all objects stored in flow or flash scope are serializable
   Line | Method
->> 384 | doFilterInternal in org.jsecurity.web.servlet.JsecurityFilter
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|   183 | doFilter         in org.jsecurity.web.servlet.OncePerRequestFilter
|   886 | runTask . . . .  in java.util.concurrent.ThreadPoolExecutor$Worker
|   908 | run              in     ''
^   662 | run . . . . . .  in java.lang.Thread
Caused by NotSerializableException: org.codehaus.groovy.grails.commons.spring.GrailsWebApplicationContext
->> 1164 | writeObject0     in java.io.ObjectOutputStream
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|   1518 | defaultWriteFields in     ''
|   1483 | writeSerialData  in     ''
|   1400 | writeOrdinaryObject in     ''
|   1158 | writeObject0 . . in     ''
|   1518 | defaultWriteFields in     ''
|   1483 | writeSerialData  in     ''
|   1400 | writeOrdinaryObject in     ''
|   1158 | writeObject0 . . in     ''
|   330 | writeObject      in     ''
|   1001 | writeObject . .  in java.util.HashMap
|   940 | invokeWriteObject in java.io.ObjectStreamClass
|   1469 | writeSerialData  in java.io.ObjectOutputStream
|   1400 | writeOrdinaryObject in     ''
|   1158 | writeObject0 . . in     ''
|   1518 | defaultWriteFields in     ''

找到了分辨率。我的控制器服务正在调用SessionFactory,这也需要是暂时的。

代码更改:def sessionfactory =>瞬态sessionFactory。不需要直接使任何域类变量瞬态。修复了问题。

相关内容

  • 没有找到相关文章

最新更新