gpt4 book ai didi

grails - Grails软件包后出现NoClassDefFoundError

转载 作者:行者123 更新时间:2023-12-02 15:45:13 27 4
gpt4 key购买 nike

当我在本地环境中运行Grails项目时,一切正常,但是当我使用grails package并将其部署到我们的测试服务器时,由于该页面会抛出NoClassDefFoundError,因此无法加载该页面

这是用于加载特定页面的代码:

package com.x.scheduledReport

import com.x.Account
import com.x.XUtil
import com.x.ResponseList
import com.x.ScheduledReport
import com.x.UserService
import com.x.scheduledReports.ScheduledReportDeleteAllCommand
import com.x.scheduledReports.ScheduledReportDeleteCommand
import com.x.scheduledReports.ScheduledReportResponse
import com.x.scheduledReports.ScheduledReportUpdateCommand
import com.x.scheduledReports.ScheduledReportsCommand
import grails.transaction.Transactional
import com.x.scheduledreport.ScheduledReportUtil


@Transactional
class ScheduledReportBusinessService {
ScheduledReportService scheduledReportService
UserService userService

def list(Map params) {
if (params.start) {
params.offset = params.start
}
if (params.length) {
params.max = Math.min(params.length ? params.length as Integer : 100, 1000)
}
params.columns = XUtil.getSearchMap(params)
Account account = userService.getAccountForCurrentUser()
def scheduledReports = scheduledReportService.findAllByAccount(params, account)
params.total = scheduledReports.count
List<ScheduledReportResponse> scheduledReportResponseList = ScheduledReportUtil.toScheduledReportResponseList(scheduledReports.list)
new ResponseList(recordsTotal: scheduledReports.count, recordsFiltered: scheduledReports.count,
data: scheduledReportResponseList, draw: params.draw ? params.draw as int : 0)
}
}

这是在日志中引发的错误

ERROR 2018-04-05 14:18:42,242 org.springframework.boot.context.web.ErrorPageFilter - Forwarding to error page from request [/rest/scheduledreport/list/true] due to exception [com/x/scheduledreport/ScheduledReportUtil] java.lang.NoClassDefFoundError: com/x/scheduledreport/ScheduledReportUtil at com.x.scheduledReport.ScheduledReportBusinessService.$tt__list(ScheduledReportBusinessService.groovy:33) at com.x.scheduledReport.ScheduledReportBusinessService$_list_closure1.doCall(ScheduledReportBusinessService.groovy)

最佳答案

ScheduledReport的文件夹名称不一致,使得所有名称相同都解决了该问题。

关于grails - Grails软件包后出现NoClassDefFoundError,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49672472/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com