You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Dspace Cris 2022.02.00创建条目失败求助:isCorrectionOfItem关系类型不存在

解决Dspace Cris 2022.02.00提交条目时"isCorrectionOfItem不存在"的错误

问题场景

环境配置:

  • Dspace Cris 2022.02.00
  • Ubuntu Server 20.04
  • PostgreSQL 12
  • Tomcat 9

创建Person、OrgUnit、Journal等任意类型集合后提交条目,前端提示:提交文章时出现问题,请稍后重试。

核心错误日志

2023-01-17 23:34:11,300 ERROR ef58dbeb-3f67-4cd3-b760-6197a8fbf95a 4698d980-dfcd-4b15-b2f7-dc0fcf4e2cbf org.dspace.app.rest.converter.AInprogressItemConverter @ An error occurred during the unmarshal of the data for the section correction - reported error: Relationship type isCorrectionOfItem does not exist
java.lang.IllegalArgumentException: Relationship type isCorrectionOfItem does not exist
at org.dspace.versioning.ItemCorrectionService.lambda$findRelationshipType$1(ItemCorrectionService.java:177) ~[dspace-api-cris-2022.02.00.jar:cris-2022.02.00]
at java.util.Optional.orElseThrow(Optional.java:408) ~[?:?]

后续日志重复出现相同400请求错误。

已执行的初始化操作

sudo /dspace/bin/dspace dsrun org.dspace.app.util.InitializeEntityTypesOnly -d
sudo /dspace/bin/dspace dsrun org.dspace.app.util.InitializeEntities -f correction-relationship-types.xml

解决方案建议

  1. 确认XML文件路径正确性
    执行初始化命令时,确保correction-relationship-types.xml文件存在于默认路径/dspace/config/entities/下。若路径不符,需指定完整绝对路径:

    sudo /dspace/bin/dspace dsrun org.dspace.app.util.InitializeEntities -f /dspace/config/entities/correction-relationship-types.xml
    
  2. 重新执行完整实体初始化流程
    先清理现有实体数据(操作前请备份数据库),再重新初始化:

    sudo /dspace/bin/dspace dsrun org.dspace.app.util.InitializeEntities -c
    sudo /dspace/bin/dspace dsrun org.dspace.app.util.InitializeEntities -f correction-relationship-types.xml
    
  3. 验证数据库关系类型
    登录PostgreSQL数据库,查询关系类型表确认是否存在目标类型:

    SELECT * FROM relationship_type WHERE name = 'isCorrectionOfItem';
    

    若查询为空,检查XML文件内容,确保<name>字段值为isCorrectionOfItem。

  4. 清理缓存并重启Tomcat
    清理Tomcat临时文件后重启服务:

    sudo rm -rf /var/lib/tomcat9/work/*
    sudo rm -rf /var/lib/tomcat9/temp/*
    sudo systemctl restart tomcat9
    
  5. 检查实体功能配置
    确认dspace.cfg中已启用实体功能:

    entities.enabled = true
    

内容的提问来源于stack exchange,提问作者Luis Ramirez

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.04 11:05:20