Grails Hibernate永远创造悬挂

时间:2014-08-04 12:27:21

标签: hibernate grails gorm

我正在使用Hibernate(GORM)处理Grails应用程序,我有一个特定的域名,这会导致我下面的问题。问题是当我想创建一个'TemplateInputTransDisplayMap'的新实例时,我自然会在本地服务器上加载应用程序并导航到并单击'New TemplateInputTransDisplayMap'按钮,但这会导致页面挂起。我把它挂了一夜,由于WIFI下降,它最终在6小时后超时。如何在页面永久挂起时找出问题是什么,从而不会产生错误?

class TemplateInputTransDisplayMap {

static belongsTo = [templateInput:TemplateInput, templateStep:TemplateStep]
TemplateInput templateInput

Long id
String tsStep
String tiParameterName 
String displayLabel
String defaultValue
String tiMapParameter
String sqlQuery
String selectClause
String whereClause
Long fetchCount
String transTable
String columnName
String displayed
String delimeter
String valueProc
String uiDisplay
String uiSql
String xPath
String isNameValue
String label

static mapping = {

    table 'TI_TRANS_DISP_MAP'
    version false

    id column: 'TI_SYSID', generator: 'foreign', params: [property: 'templateInput']

    templateInput column: 'TI_SYSID', insertable: false, updateable: false
    templateStep column: 'TI_TS_SYSID'
    tsStep column: 'TS_STEP'
    tiParameterName column: 'TI_PARAM_NAME'
    displayLabel column: 'DISPLAY_LABEL'
    defaultValue column: 'DEFAULT_VALUE'
    tiMapParameter column: 'TI_MAP_PARAM'
    sqlQuery column: 'SQL_QUERY'
    selectClause column: 'SELECT_CLAUSE'
    whereClause column: 'WHERE_CLAUSE'
    fetchCount column: 'FETCH_COUNT'
    transTable column: 'TRANS_TABLE'
    columnName column: 'COLUMN_NAME'
    valueProc column: 'VALUE_PROC'
    uiDisplay column: 'UI_DISPLAY'
    uiSql column: 'UI_SQL'
    xPath column: 'XPATH'
    isNameValue column: 'IS_NAME_VALUE'

}

static constraints = {
    tsStep(maxSize:250, blank:true, nullable:true)
    tiParameterName(maxSize:250, blank:true, nullable:true)
    displayLabel(maxSize:250, blank:true, nullable:true)
    defaultValue(maxSize:1500, blank:true, nullable:true)
    tiMapParameter(maxSize:250, blank:true, nullable:true)
    sqlQuery(maxSize:1500, blank:true, nullable:true)
    selectClause(maxSize:100, blank:true, nullable:true)
    whereClause(maxSize:1000, blank:true, nullable:true)
    fetchCount(maxSize:3, blank:true, nullable:true)
    transTable(maxSize:250, blank:true, nullable:true)
    columnName(maxSize:30, blank:true, nullable:true)
    displayed(maxSize:1, blank:true, nullable:true)
    delimeter(maxSize:30, blank:true, nullable:true)
    valueProc(maxSize:500, blank:true, nullable:true)
    uiDisplay(maxSize:10, blank:true, nullable:true)
    uiSql(maxSize:900, blank:true, nullable:true)
    xPath(maxSize:2000, blank:true, nullable:true)
    isNameValue(maxSize:3, blank:true, nullable:true)
    label(maxSize:100, blank:true, nullable:true)
}
}

1 个答案:

答案 0 :(得分:0)

获取应用程序的线程转换器,了解正在进行的操作。

在unixes上,您只需向运行应用程序的java进程发送SIGQUIT(3)信号即可。

kill -3 process_id_of_grails_jvm

threaddump转到stdout,默认情况下是Tomcat中的catalina.out。

JDK中还有jstack命令来执行threaddump。您可以使用jps命令获取可访问的Java进程列表。