在 Eclipse 中发布配置时出错
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/18333739/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Error in publishing the configuration in Eclipse
提问by Sohaib Ahmed
Publishing to tomcat v6.0 server at localhost..'has encountered a problem.
发布到tomcat v6.0 server at localhost..'遇到问题。
Publishing the configuration..
发布配置..
tomcat give above error. How to resolve above error. I googled alot but have not found any solution. please help me.
tomcat 给出上述错误。如何解决上述错误。我用谷歌搜索了很多,但没有找到任何解决方案。请帮我。
Publishing the configuration...
Error copying file to C:/Program Files/Apache Software Foundation/Tomcat 6.0/backup\catalina.policy: C:\Program Files\Apache Software Foundation\Tomcat 6.0\backup\catalina.policy (The system cannot find the path specified)
C:\Program Files\Apache Software Foundation\Tomcat 6.0\backup\catalina.policy (The system cannot find the path specified)
Error copying file to C:/Program Files/Apache Software Foundation/Tomcat 6.0/backup\catalina.properties: C:\Program Files\Apache Software Foundation\Tomcat 6.0\backup\catalina.properties (The system cannot find the path specified)
C:\Program Files\Apache Software Foundation\Tomcat 6.0\backup\catalina.properties (The system cannot find the path specified)
Error copying file to C:/Program Files/Apache Software Foundation/Tomcat 6.0/backup\context.xml: C:\Program Files\Apache Software Foundation\Tomcat 6.0\backup\context.xml (The system cannot find the path specified)
C:\Program Files\Apache Software Foundation\Tomcat 6.0\backup\context.xml (The system cannot find the path specified)
Error copying file to C:/Program Files/Apache Software Foundation/Tomcat 6.0/backup\server.xml: C:\Program Files\Apache Software Foundation\Tomcat 6.0\backup\server.xml (The system cannot find the path specified)
C:\Program Files\Apache Software Foundation\Tomcat 6.0\backup\server.xml (The system cannot find the path specified)
Error copying file to C:/Program Files/Apache Software Foundation/Tomcat 6.0/backup\tomcat-users.xml: C:\Program Files\Apache Software Foundation\Tomcat 6.0\backup\tomcat-users.xml (The system cannot find the path specified)
C:\Program Files\Apache Software Foundation\Tomcat 6.0\backup\tomcat-users.xml (The system cannot find the path specified)
Error copying file to C:/Program Files/Apache Software Foundation/Tomcat 6.0/backup\web.xml: C:\Program Files\Apache Software Foundation\Tomcat 6.0\backup\web.xml (The system cannot find the path specified)
C:\Program Files\Apache Software Foundation\Tomcat 6.0\backup\web.xml (The system cannot find the path specified)
回答by CCC
Your Eclipse is trying to write into the Program Files folder, which is protected by default by the Windows operating system.
您的 Eclipse 正在尝试写入 Program Files 文件夹,该文件夹默认受 Windows 操作系统保护。
The solution:
解决方案:
Navigate to the Program Filesfolder.
Right-click on the Apache Software Foundationfolder.
- Click on Properties.
- Go to the Security Tab.
Click on Edit.
Select Usersin the Names of groups or users list-box.
In the other Permissions for users list-box, check Full Control.
Click Apply/OK.
导航到Program Files 文件夹。
右键单击Apache Software Foundation文件夹。
- 单击“属性”。
- 转到安全选项卡。
点击编辑。
在组名或用户列表框中选择用户。
在用户列表框中的其他权限中,选中完全控制。
单击应用/确定。
回答by JavierC
It seems you has any problem with your Tomcat configurationand it can't find these path.
看来您的Tomcat 配置有任何问题,它找不到这些路径。
C:/Program Files/Apache Software Foundation/Tomcat 6.0/.
C:/Program Files/Apache Software Foundation/Tomcat 6.0/。
If you are using any Eclipse plugin, try to modify the tomcat home path in
如果您使用的是任何 Eclipse 插件,请尝试修改其中的 tomcat 主路径
Window -> Preferences -> Tomcat.
窗口 -> 首选项 -> Tomcat。
Other possible solutioncould be to configure properly your CATALINA_HOMEand JAVA_HOME system variables.
其他可能的解决方案可能是正确配置您的CATALINA_HOME和JAVA_HOME 系统变量。
I hope this helps you.
我希望这可以帮助你。
回答by Gernot
The situation described above may also happen if the eclipse installation (in eclipse speech: install location) directory is moved after the first startup. Eclipse Mars (4.5.1) comes up with irritating warnings/messages if its install location is changed.
如果在第一次启动后移动了eclipse安装(在eclipse语音中:安装位置)目录,也可能出现上述情况。如果 Eclipse Mars (4.5.1) 的安装位置发生更改,则会出现令人讨厌的警告/消息。
For server runtimes consider inspecting the following metadata file for occurances of the "location" attribute:
对于服务器运行时,请考虑检查以下元数据文件是否出现“位置”属性:
<path-to-workspace-dir>\workspace\.metadata\.plugins\org.eclipse.core.runtime\.settings\org.eclipse.wst.server.core.prefs
<path-to-workspace-dir>\workspace\.metadata\.plugins\org.eclipse.core.runtime\.settings\org.eclipse.wst.server.core.prefs
回答by Sohaib Ahmed
I have found solution. Simply change the destination folder to be installed. if it give error in c then not dont install it in c .just change the directory
我找到了解决方案。只需更改要安装的目标文件夹即可。如果它在 c 中给出错误,那么不要在 c 中安装它。只需更改目录
回答by Codistan
Option 1:
选项1:
- Create a backup directory and wtpwebapps(Optional) directory in Tomcat installation folder.
And make sure the parent folder "C:\Program Files\Apache Software Foundation" has the full control rights for all users.
You can set the rights by right clicking on the folder and go under 'Security' tab.
- 在Tomcat安装文件夹中创建备份目录和wtpwebapps(可选)目录。
并确保父文件夹“ C:\Program Files\Apache Software Foundation”对所有用户具有完全控制权限。
您可以通过右键单击文件夹并转到“安全”选项卡来设置权限。
Option 2:
选项 2:
Do a fresh Tomcat install to a separate directory or folder or simply just copy everything from the tomcat installation directory to a different directory.
Now modify the Runtime for Apache Tomcat to point to the new location.
I'm not sure about the root cause of this issue but the above approach seems to be a workaround.
将新的 Tomcat 安装到单独的目录或文件夹,或者只是将所有内容从 tomcat 安装目录复制到不同的目录。
现在修改 Apache Tomcat 的运行时以指向新位置。
我不确定此问题的根本原因,但上述方法似乎是一种解决方法。
回答by quest
For my setup, eclipse oxygen, win 10:
对于我的设置,eclipse Oxy, win 10:
Grant rights to tomcat install directory and "Window"/"Preferences"/"Server"/"Runtime Environment"/"Search" search from local disk where the server runtime environment is installed.
授予对 tomcat 安装目录和“窗口”/“首选项”/“服务器”/“运行时环境”/“搜索”从安装服务器运行时环境的本地磁盘搜索的权限。
回答by susan097
Click on
Server tab
anddelete it
.Again
Add it
and add to yourproject
.Clean
thetomcat
directory andrestart it
.
单击
Server tab
和delete it
。再次
Add it
添加到您的project
.Clean
该tomcat
目录restart it
。
This can help You.
这可以帮助你。