由于我的应用程序已升级到grails 2.3.0,因此webflow插件(版本2.0.8.1)会在Webflow操作后触发OutOfMemoryError错误并且“方法名称不能为null”。
堆叠错误:
2013-09-14 00:39:10,574 ERROR [ClosureInvokingAction] - Exception occured invoking flow action: GC overhead limit exceeded
java.lang.OutOfMemoryError: GC overhead limit exceeded
at java.util.Arrays.copyOfRange(Arrays.java:3209)
at java.lang.String.<init>(String.java:215)
at java.lang.StringBuilder.toString(StringBuilder.java:430)
2013-09-14 00:39:10,575 DEBUG [SessionBindingConversationManager] - Unlocking conversation 1
2013-09-14 00:39:10,584 ERROR [[grails]] - Servlet.service() for servlet grails threw exception
java.lang.OutOfMemoryError: GC overhead limit exceeded
at java.util.Arrays.copyOfRange(Arrays.java:3209)
at java.lang.String.<init>(String.java:215)
at java.lang.StringBuilder.toString(StringBuilder.java:430)
2013-09-14 00:39:10,585 DEBUG [HttpSessionSecurityContextRepository] - SecurityContext is empty or anonymous - context will not be stored in HttpSession.
2013-09-14 00:39:10,585 DEBUG [SecurityContextPersistenceFilter] - SecurityContextHolder now cleared, as request processing completed
2013-09-14 00:39:10,585 ERROR [[default]] - Servlet.service() for servlet [default] in context with path [/UbiCloud] threw exception [org.springframework.web.util.NestedServletException: Handler processing failed; nested exception is java.lang.OutOfMemoryError: GC overhead limit exceeded] with root cause
java.lang.OutOfMemoryError: GC overhead limit exceeded
at java.util.Arrays.copyOfRange(Arrays.java:3209)
at java.lang.String.<init>(String.java:215)
at java.lang.StringBuilder.toString(StringBuilder.java:430)
后面是网络流错误:
Method name must not be null. Stacktrace follows:
java.lang.IllegalArgumentException: Method name must not be null
at grails.plugin.cache.web.ProxyAwareMixedGrailsControllerHelper.retrieveAction(ProxyAwareMixedGrailsControllerHelper.java:41)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
at java.lang.Thread.run(Thread.java:680)
网络流状态:
billingOrder {
on("requestPayment") {
// set local props
def profile = flow.profile
def pid = profile.id
def service = flow.service
def orders = flow.orders
def email = conversation.email
// subscription dates
def today = new Date()
def endOfSubscription = today + 365
// billing create
flow.billing = new Billing(
orders:orders,
profile:profile,
packcode:orders?.packcode,
creationdate:today,
name:profile?.name,
firstname:profile?.firstname,
address:params?.billing?.address,
postalcode:params?.billing?.postalcode,
town:params?.billing?.town,
country:params?.billing?.country, // TODO: check phone locale
tvanumber:params?.billing?.tvanumber,
paymentmode:PAY_MODE,
currency:CUR_MODE,
paymentterms:params?.billing?.paymentterms,
termsapproved:params?.billing?.termsapproved,
autorenewal:true,
newcontact:false,
active:false,
creditcardtype:params?.billing?.creditcardtype,
cardno:params?.billing?.cardno.trim(),
ed:params?.billing?.ed,
cvc:params?.billing?.cvc
)
// process amount terms
def billing = flow.billing
if (billing.paymentterms == MONTH_MODE) {
billing.amount = orders.amountmonth
} else if (billing.paymentterms == YEAR_MODE) {
billing.amount = orders.amountyear
} else {
log.error "[STORE] No payment terms defined"
}
// profile fields
profile.phone=params?.profile?.phone
profile.mobilephone=params?.profile?.mobilephone
profile.companyname=params?.profile?.companyname
profile.sirencode=params?.profile?.sirencode
// update technical contact
service.temail=params?.service?.temail
}
if (!billing.validate() || !profile.validate() || !orders.validate() || !service.validate()) {
if(!billing.creditcardtype){
flash.messagecc = "store.billing.cc"
} else if(!billing.termsapproved){
flash.message = "store.billing.approveterms"
}
[billing:billing,orders:orders,profile:profile,service:service,orders:orders,rpid:rpid]
error()
该错误来自用于验证结算对象的grails化学,这有时会导致溢出错误,并且“方法名称不能为空”。 自从grails 2.2.4迁移到grails 2.3以来,没有添加任何约束或字段,我想在域验证对象或webflow流程中必须进行更改。 当然,结算域对象是可序列化的,而beforeValidate()是暂时的。