Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IntelliJ needs to copy tomcat/conf directory to project directory

I have a freshly installed Tomcat 7 server, and I'm trying to make IntelliJ deploy a HelloWorld Spring MVC app to Tomcat.

My Tomcat home is /usr/share/tomcat7 and Tomcat base is /var/lib/tomcat7

However, when I try to run the project, IntelliJ throws an error saying:

Error running Tomcat : Error copying configuration files from /var/lib/tomcat7/conf to /home/adonis/.IntelliJIdea12/system/tomcat/Tomcat__SpringMVCApp/conf : /var/lib/tomcat7/conf/tomcat-users.xml (Permission denied)

Here is a screenshot - http://i.imgur.com/CQ3z0e1.png

Any permissions I need to set up?

like image 365
Hrishikesh Choudhari Avatar asked May 07 '13 20:05

Hrishikesh Choudhari


People also ask

Where is Tomcat conf folder?

By default, these files are located at TOMCAT-HOME/conf/server. xml and TOMCAT-HOME/conf/web.

Does IntelliJ have embedded Tomcat?

Which version of IntelliJ are you using? FYI, you can run Jetty from within IntelliJ, then later deploy to Tomcat. For a preconfigured example, try a Vaadin starter web app, choosing the "Plain Java Servlet" flavor.

How do I download Tomcat from IntelliJ?

Download and extract Tomcat installation package to a local directory, as instructed in "Installing Apache Tomcat". Select Configure › Settings. Select IDE Settings › Application Servers. Click + and select Tomcat Server to add a Tomcat server, or any of the other supported servers.


2 Answers

Try chmod -R 777 /var/lib/tomcat7/conf/, it works to me.

like image 129
Rodrigo Hime Avatar answered Sep 20 '22 22:09

Rodrigo Hime


Make sure that files under /var/lib/tomcat7/conf/ directory have read permission for the user IntelliJ IDEA is running from.

chmod -R 644 /var/lib/tomcat7/conf/ 

should help.

Also check that /home/adonis/.IntelliJIdea12/system/tomcat/ has correct permissions and owner. Could be that it was created from a different user and your current user doesn't have the rights to write into it.


If it doesn't help, download and unpack a new Tomcat installation from .tar.gz file, configure IDEA to use this installation instead.

Note that Tomcat installed using the package manager on some Linux systems has non-standard layout and permissions, and therefore will not work with IDEA.

like image 32
CrazyCoder Avatar answered Sep 21 '22 22:09

CrazyCoder