Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Failed to execute goal org.codehaus.mojo:tomcat-maven-plugin:1.1:run

While trying to run my web applicaton, I'm getting the below mentioned error. Previously my application was running fine. But today i gave maven clean and then tried ruuning it by giving maven goal as tomcat:run, I'm getting this error

[INFO]

[INFO] BUILD FAILURE
[INFO] 

[INFO] Total time: 6.754s

[INFO] Finished at: Tue Mar 11 15:09:44 IST 2014

[INFO] Final Memory: 11M/28M

[INFO] ------------------------------------------------------------------------

[ERROR] Failed to execute goal org.codehaus.mojo:tomcat-maven-plugin:1.1:run (default-cli) on project metaDB: Could not start Tomcat: Memory database file 
D:\WORK\target\tomcat\conf\tomcat-users.xml cannot be read -> [Help 1]

[ERROR] 

[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.

please help to over come this issue.

like image 413
Dileepan Avatar asked Mar 11 '14 09:03

Dileepan


2 Answers

Delete the folder "D:\WORK\target\tomcat\" and try again, the tomcat-maven-plugin would re-create this folder and the file "tomcat-users.xml".

like image 137
Shoopman Avatar answered Nov 17 '22 22:11

Shoopman


Create a file for Tomcat users in:

D:\WORK\target\tomcat\conf\tomcat-users.xml

and add the following:

<?xml version="1.0" encoding="UTF-8"?>
<tomcat-users>
 <role rolename="tomcat"/>
 <role rolename="admin"/>
 <role rolename="manager"/>
 <user  username="admin" password="admin" roles="tomcat,admin,manager"/>
</tomcat-users>
like image 35
Stefan Avatar answered Nov 17 '22 21:11

Stefan