必须定义“添加操作的密钥”ant ant_install或ant update

时间:2017-10-13 15:25:31

标签: postgresql ant dspace

安装dspace时出现以下错误:

test_database:
 [java] Failure during kernel init: Key for add operation must be defined!
 [java] java.lang.IllegalArgumentException: Key for add operation must be defined!
 [java]     at org.apache.commons.configuration.tree.DefaultExpressionEngine.prepareAdd(DefaultExpressionEngine.java:420)
 [java]     at org.apache.commons.configuration.HierarchicalConfiguration.addPropertyDirect(HierarchicalConfiguration.java:383)
 [java]     at org.apache.commons.configuration.AbstractConfiguration.addPropertyValues(AbstractConfiguration.java:423)
 [java]     at org.apache.commons.configuration.AbstractConfiguration.append(AbstractConfiguration.java:1271)
 [java]     at org.apache.commons.configuration.ConfigurationUtils.convertToHierarchical(ConfigurationUtils.java:252)
 [java]     at org.apache.commons.configuration.CombinedConfiguration$ConfigData.getTransformedRoot(CombinedConfiguration.java:943)
 [java]     at org.apache.commons.configuration.CombinedConfiguration.constructCombinedNode(CombinedConfiguration.java:793)
 [java]     at org.apache.commons.configuration.CombinedConfiguration.getRootNode(CombinedConfiguration.java:626)
 [java]     at org.apache.commons.configuration.HierarchicalConfiguration.fetchNodeList(HierarchicalConfiguration.java:958)
 [java]     at org.apache.commons.configuration.CombinedConfiguration.fetchNodeList(CombinedConfiguration.java:739)
 [java]     at org.apache.commons.configuration.HierarchicalConfiguration.getProperty(HierarchicalConfiguration.java:344)
 [java]     at org.dspace.servicemanager.config.DSpaceConfigurationService.setProperty(DSpaceConfigurationService.java:354)
 [java]     at org.dspace.servicemanager.config.DSpaceConfigurationService.setDynamicProperties(DSpaceConfigurationService.java:539)
 [java]     at org.dspace.servicemanager.config.DSpaceConfigurationService.loadInitialConfig(DSpaceConfigurationService.java:504)
 [java]     at org.dspace.servicemanager.config.DSpaceConfigurationService.<init>(DSpaceConfigurationService.java:87)
 [java]     at org.dspace.servicemanager.DSpaceKernelImpl.start(DSpaceKernelImpl.java:148)
 [java]     at org.dspace.servicemanager.DSpaceKernelImpl.start(DSpaceKernelImpl.java:128)
 [java]     at org.dspace.app.launcher.ScriptLauncher.main(ScriptLauncher.java:49)
 [java] Exception in thread "main" java.lang.IllegalStateException: Failure during kernel init: Key for add operation must be defined!
 [java]     at org.dspace.app.launcher.ScriptLauncher.main(ScriptLauncher.java:65)
 [java] Caused by: java.lang.IllegalArgumentException: Key for add operation must be defined!
 [java]     at org.apache.commons.configuration.tree.DefaultExpressionEngine.prepareAdd(DefaultExpressionEngine.java:420)
 [java]     at org.apache.commons.configuration.HierarchicalConfiguration.addPropertyDirect(HierarchicalConfiguration.java:383)
 [java]     at org.apache.commons.configuration.AbstractConfiguration.addPropertyValues(AbstractConfiguration.java:423)
 [java]     at org.apache.commons.configuration.AbstractConfiguration.append(AbstractConfiguration.java:1271)
 [java]     at org.apache.commons.configuration.ConfigurationUtils.convertToHierarchical(ConfigurationUtils.java:252)
 [java]     at org.apache.commons.configuration.CombinedConfiguration$ConfigData.getTransformedRoot(CombinedConfiguration.java:943)
 [java]     at org.apache.commons.configuration.CombinedConfiguration.constructCombinedNode(CombinedConfiguration.java:793)
 [java]     at org.apache.commons.configuration.CombinedConfiguration.getRootNode(CombinedConfiguration.java:626)
 [java]     at org.apache.commons.configuration.HierarchicalConfiguration.fetchNodeList(HierarchicalConfiguration.java:958)
 [java]     at org.apache.commons.configuration.CombinedConfiguration.fetchNodeList(CombinedConfiguration.java:739)
 [java]     at org.apache.commons.configuration.HierarchicalConfiguration.getProperty(HierarchicalConfiguration.java:344)
 [java]     at org.dspace.servicemanager.config.DSpaceConfigurationService.setProperty(DSpaceConfigurationService.java:354)
 [java]     at org.dspace.servicemanager.config.DSpaceConfigurationService.setDynamicProperties(DSpaceConfigurationService.java:539)
 [java]     at org.dspace.servicemanager.config.DSpaceConfigurationService.loadInitialConfig(DSpaceConfigurationService.java:504)
 [java]     at org.dspace.servicemanager.config.DSpaceConfigurationService.<init>(DSpaceConfigurationService.java:87)
 [java]     at org.dspace.servicemanager.DSpaceKernelImpl.start(DSpaceKernelImpl.java:148)
 [java]     at org.dspace.servicemanager.DSpaceKernelImpl.start(DSpaceKernelImpl.java:128)
 [java]     at org.dspace.app.launcher.ScriptLauncher.main(ScriptLauncher.java:49)

BUILD FAILED
/Users/uttam/Desktop/Epub/edoc-dspace-source/dspace/target/dspace-
installer/build.xml:792: Java returned: 1

我有一个工作dspace但是在我清理了dspace数据库后,我不断收到此错误消息。我已经厌倦了在干净擦拭后重新安装postgresql但是我一直收到这个错误,有什么可能导致这个问题的建议吗?

现在,如果我想从头开始“mvn package”有效,但之后“ant fresh_install”会抛出此错误。

2 个答案:

答案 0 :(得分:1)

好的,我现在知道问题是什么了。此错误代码与dspace源文件夹中的配置文件(.cfg)相关。我的local.cfg文件中有一些特殊字符,我不知何故设法忽略了这一点,删除那些特殊字符解决了这个问题。

答案 1 :(得分:0)

在我的情况下,我使用具有这些依赖项的dspace 6.0,

  • apache-ant-1.8.0
  • apache-maven-3.1.0
  • apache-tomcat-7.0.69

  • jdk-7u79-windows

  • postgresql-9.5.2

    然后发生错误。因此我将dspace更新到6.3版本,然后不会发生错误。