I've installed archlinux in the office for development. We use maven to deploy our application to tomcat. I have installed tomcat7.0.47. I've setup everything OK (I think) and I can deploy the webapp to tomcat using tomcat:redeploy. I can start, stop and restart tomcat using systemctl. The problem is tomcat cannot create (or even find) its log directories or create other directories. I know this is a file permission problem and I have done:
chown -R tomcat7:tomcat7
and
chmod -R 775
on /usr/share/tomcat7 and all the directories that are linked in this directory like /etc/tomcat7/, etc.
But still, when I redeploy to tomcat, I can't see the application start in firefox (I get 404) and catalina.out gives me
java.io.FileNotFoundException: logs/raven/org.ird.raven.2013-12-07.log (No such file or directory)
and systemctl status tomcat7 gives me:
tomcat7.service - Tomcat 7 servlet container
Loaded: loaded (/usr/lib/systemd/system/tomcat7.service; enabled)
Active: active (running) since Sat 2013-12-07 08:40:30 AFT; 15min ago
Process: 4453 ExecStart=/usr/bin/jsvc -Dcatalina.home=${CATALINA_HOME} -Dcatalina.base=${CATALINA_BASE} -Djava.io.tmpdir=/var/tmp/tomcat7/temp -cp /usr/share/java/commons-daemon.jar:/usr/share/java/eclipse-ecj.jar:${CATALINA_HOME}/bin/bootstrap.jar:${CATALINA_HOME}/bin/tomcat-juli.jar -user tomcat7 -java-home ${TOMCAT_JAVA_HOME} -pidfile /var/run/tomcat7.pid -errfile /var/log/tomcat7/catalina.err -outfile /var/log/tomcat7/catalina.out $CATALINA_OPTS org.apache.catalina.startup.Bootstrap (code=exited, status=0/SUCCESS)
Main PID: 4457 (jsvc)
CGroup: /system.slice/tomcat7.service
├─4456 jsvc.exec -Dcatalina.home=/usr/share/tomcat7 -Dcatalina.base=/usr/share/tomcat7 -Djava.io.tmpdir=/var/tmp/tomcat7/temp -cp /usr/share/java/commons-daemon.ja...
└─4457 jsvc.exec -Dcatalina.home=/usr/share/tomcat7 -Dcatalina.base=/usr/share/tomcat7 -Djava.io.tmpdir=/var/tmp/tomcat7/temp -cp /usr/share/java/commons-daemon.ja...
Dec 07 08:40:30 archbase systemd[1]: tomcat7.service: Supervising process 4457 which is not our child. We'll most likely not notice when it exits.
Dec 07 08:40:30 archbase systemd[1]: Started Tomcat 7 servlet container.
Right after I changed the file permissions, I got something like:
systemctl status tomcat7
PID file /var/run/tomcat7.pid not readable (yet?) after start.
What do I have to do to make this work. I really like to work on Arch. It's fast and simple (after you set it up). Can anyone help me please?
By the way, I was first working on a Windows 7 and then I went to OpenSuse and now I want to set up an Arch.