I encountered problem with my IDE Idea 2016.1
It says:
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)
Actually my tomcat
situated at /opt/tomcat
directory and idea
kmows about it. What can be a reason of this exception?
First, be sure you understand the difference between TOMCAT_HOME
and TOMCAT_BASE
. This SO answer gives a good description: https://stackoverflow.com/a/29398713/1348743
With that in mind, some explanation of how IDEA creates a TOMCAT_BASE
directory for Tomcat run configurations...
When you create a Tomcat Run/Debug configuration, IntelliJ IDEA creates a TOMCAT_BASE
directory as {intellij_system_directory}\tomcat\{run_configuration_name}_{project_name}
. (TOMCAT_HOME
identifies where the binary files are and TOMCAT_BASE
defines where an instance of tomcat is. Sometimes they are the same. In this case, they are not.) The {intellij_system_directory}
directory is usually in ~/.IntelliJIdea2016.1/system
. See Directories used by the IDE to store settings, caches, plugins and logs for more info).
That's why the path is where it is. But it looks like your path (as you show in the message) is missing the run configuration portion: .../tomcat//conf/...
That should be something like .../tomcat/foo_bar/conf/...
. So it seems like a config has gotten corrupt. There is a bug, IDEA-133536, I reported a couple of years ago that can this type of corruption under certain conditions. You may be hitting that.
There are two potential solutions:
${project_directory}/.idea/runConfigurations/${runConfigurationName}.xml
. If it is not shared, it will be in the file ${project_directory}/.idea/workspace.xml
. You should close the project before editing either of those files (and make a backup just in case).For some additional information, take a look at my post: https://intellij-support.jetbrains.com/hc/en-us/community/posts/206837735--How-To-Specify-Tomcat-Cache-Directory-For-Webapp#community_comment_206857039
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With