14

Publishing to tomcat v6.0 server at localhost..'has encountered a problem.

Publishing the configuration..

tomcat give above error. How to resolve above error. I googled alot but have not found any solution. please help me.

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)
FarFarAway
  • 1,017
  • 3
  • 14
  • 35
Sohaib Ahmed
  • 207
  • 1
  • 3
  • 8

9 Answers9

71

Your Eclipse is trying to write into the Program Files folder, which is protected by default by the Windows operating system.

The solution:

  1. Navigate to the Program Files folder.

  2. Right-click on the Apache Software Foundation folder.

  3. Click on Properties.
  4. Go to the Security Tab.
  5. Click on Edit .

  6. Select Users in the Names of groups or users list-box.

  7. In the other Permissions for users list-box, check Full Control.

  8. Click Apply/OK.

v8-E
  • 1,077
  • 2
  • 14
  • 21
CCC
  • 850
  • 7
  • 12
  • wow! That's the thing about this solution..It's beautiful. I was really picking my hairs.Thanks – Sid Nov 18 '14 at 10:16
  • thanks man. was trying everything to solve the problem but couldn't find anything. At last this saved me. – Neeraj Yadav Mar 31 '18 at 06:38
0

It seems you has any problem with your Tomcat configuration and it can't find these path.

C:/Program Files/Apache Software Foundation/Tomcat 6.0/.

If you are using any Eclipse plugin, try to modify the tomcat home path in

Window -> Preferences -> Tomcat.

Other possible solution could be to configure properly your CATALINA_HOME and JAVA_HOME system variables.

I hope this helps you.

v8-E
  • 1,077
  • 2
  • 14
  • 21
JavierC
  • 26
  • 3
0

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.

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

Gernot
  • 1,094
  • 4
  • 25
  • 39
0

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

Shachaf.Gortler
  • 5,655
  • 14
  • 43
  • 71
Sohaib Ahmed
  • 207
  • 1
  • 3
  • 8
0

Option 1:

  1. Create a backup directory and wtpwebapps(Optional) directory in Tomcat installation folder.
  2. 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.

Option 2:

  1. 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.

  2. 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.

v8-E
  • 1,077
  • 2
  • 14
  • 21
Codistan
  • 1,469
  • 1
  • 13
  • 17
0

For my setup, eclipse oxygen, 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.

quest
  • 1
0
  1. Click on Server tab and delete it.

  2. Again Add it and add to your project.

  3. Clean the tomcat directory and restart it.

This can help You.

susan097
  • 3,500
  • 1
  • 23
  • 30
0

Read description Actually this is because of predefined permissions of you tomcat folder. Eclipse wanted to write in your tomcat folder but predefined permissions don't let it to do that. So, only thing we have to do is to change permissions of tomcat folder and let it be writable, readable and executable. just follow the following steps to get rid off from this error:

  1. go to program files, or the folder where did you saved your tomcat
  2. right click on your tomcat folder and click on properties
  3. click on security option on top and then click edit option
  4. select user option
  5. mark tick on full control radio box 6.click on apply 7.restart the server on eclipse or any IDE you are using and server will work fine.
0

what I did was removed tomcat from servers tab and clean the project(project -> clean) and again added tomcat server and it worked for me.