I encounter a problem " 'publishing to tomcat v7.0 server at localhost' has encountered a problem" while starting my tomcat server from eclipse. This problem arised after i tried to solve the 404 error by selecting the 'use tomcat installation' option in the setting of the server. The server seems to be running but it actually isn't.
Publishing the configuration... Error copying file to /usr/share/tomcat7/backup/catalina.policy: /usr/share/tomcat7/backup/catalina.policy (No such file or directory) /usr/share/tomcat7/backup/catalina.policy (No such file or directory) Error copying file to /usr/share/tomcat7/backup/catalina.properties: /usr/share/tomcat7/backup/catalina.properties (No such file or directory) /usr/share/tomcat7/backup/catalina.properties (No such file or directory) Error copying file to /usr/share/tomcat7/backup/context.xml: /usr/share/tomcat7/backup/context.xml (No such file or directory) /usr/share/tomcat7/backup/context.xml (No such file or directory) Error copying file to /usr/share/tomcat7/backup/server.xml: /usr/share/tomcat7/backup/server.xml (No such file or directory) /usr/share/tomcat7/backup/server.xml (No such file or directory) Error copying file to /usr/share/tomcat7/backup/tomcat-users.xml: /usr/share/tomcat7/backup/tomcat-users.xml (No such file or directory) /usr/share/tomcat7/backup/tomcat-users.xml (No such file or directory) Error copying file to /usr/share/tomcat7/backup/web.xml: /usr/share/tomcat7/backup/web.xml (No such file or directory) /usr/share/tomcat7/backup/web.xml (No such file or directory)
any suggestions guys.
Firstly, when in Eclipse you choose the "Use Tomcat installation (takes control of tomcat installation)" we are wrongly assuming Eclipse simply runs the Tomcat server as if you would type the command
/usr/share/tomcat7/startup.sh
but the truth is that Eclipse (through its tomcat plugin) tries to do something else before starting the server.
What Eclipse tries to do is a backup of the config files into a folder called backup and the reason you are getting this error is because it is unable to create the folder /usr/share/tomcat7/backup and content on it. It is purely a permission issue as Eclipse (other user) has not privileges to write on disk. Here is what you can do:
All these 3 steps can be done with the following commands
cd /usr/share/tomcat7
sudo mkdir backup
sudo chmod 777 backup
Then try to run again Tomcat server from Eclipse. It should work...
I hope it helps!
PS: About the error 404 in localhost:8080 when you start Tomcat from Eclipse (using workspace metadata), you will not be able to see the Tomcat welcome page because the Tomcat in the workspace has not deployed the ROOT.war hence there are not pages to display but the server runs and is ready to debug your applications, which is the purpose of running Tomcat through Eclipse.
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