gpt4 book ai didi

tomcat - IntelliJIdea : Cannot load/home/. ../conf/server.xml:

转载 作者:行者123 更新时间:2023-11-28 21:59:43 24 4
gpt4 key购买 nike

我的 IDE Idea 2016.1 遇到问题

它说:

Error running run spring: Cannot load /home/sergei-rudenkov/.IntelliJIdea2016.1/system/tomcat//conf/server.xml: /home/sergei-rudenkov/.IntelliJIdea2016.1/system/tomcat//conf/server.xml (No such file or directory)

实际上,我的 tomcat 位于 /opt/tomcat 目录,并且 idea 了解它。这个异常(exception)的原因是什么?

最佳答案

首先,请确保您了解 TOMCAT_HOMETOMCAT_BASE 之间的区别。这个 SO 答案给出了很好的描述:https://stackoverflow.com/a/29398713/1348743

考虑到这一点,一些关于 IDEA 如何为 Tomcat 运行配置创建 TOMCAT_BASE 目录的解释...当您创建 Tomcat 运行/调试配置时,IntelliJ IDEA 会创建一个 TOMCAT_BASE 目录作为 {intellij_system_directory}\tomcat\{run_configuration_name}_{project_name}。 (TOMCAT_HOME 标识二进制文件的位置,TOMCAT_BASE 定义 tomcat 实例的位置。有时它们是相同的。在这种情况下,它们不是。){intellij_system_directory}目录一般在~/.IntelliJIdea2016.1/system。参见 Directories used by the IDE to store settings, caches, plugins and logs了解更多信息)。

这就是为什么路径就在它所在的地方。但看起来您的路径(如您在消息中显示的那样)缺少运行配置部分:.../tomcat//conf/... 应该类似于 .. ./tomcat/foo_bar/conf/...。所以看起来配置已经损坏。有一个错误,IDEA-133536 ,几年前我曾报道过这种类型的腐败在某些条件下会发生。你可能会打那个。

有两种可能的解决方案:

  1. 重新创建您的运行/调试配置,确保在您首次创建和保存它们时给它们一个唯一的名称
  2. 手动编辑运行/调试配置文件并修改 BASE_DIRECTORY_NAME 选项的值(只需搜索该字符串)。如果您共享了运行/调试配置(通过右上角的“共享”选项),配置文件将位于${project_directory}/.idea/runConfigurations/${runConfigurationName}.xml。如果未共享,它将位于文件 ${project_directory}/.idea/workspace.xml 中。您应该在编辑这些文件中的任何一个之前关闭项目(并进行备份以防万一)。

有关其他信息,请查看我的帖子:https://intellij-support.jetbrains.com/hc/en-us/community/posts/206837735--How-To-Specify-Tomcat-Cache-Directory-For-Webapp#community_comment_206857039

关于tomcat - IntelliJIdea : Cannot load/home/. ../conf/server.xml:,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38357283/

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