Where is the location of "velocity.log" for aTomcat deployment of a Vaadin/Apache Cayenne app?

1k views Asked by At

I'm deploying an app which uses Vaadin and Apache Cayenne. It is causing a problem as I deploy it on Tomcat running as user "www". (If I run Tomcat as "root' there is no problem.)

It complains that there is a no permission to access/write a file called "velocity.log". Does anyone know where is the location Cayenne/Tomcat is accessing the file?

I tried to find out by:

File file = new File("test");
String testPath = file.getAbsolutePath();
System.out.println(testPath );

and I saw that it prints out "/config". I therefore tried to create a directory and setting the right permissions from root "/config" and I've also tried doing the same at several locations within the Tomcat directory. None worked.

It is running now within Tomcat because I set the user to "root". I'd like to set it back to "www" but I need to resolve this problem first. Does anyone know where is location for the supposedly "velocity.log" file in a Tomcat deployment?

1

There are 1 answers

0
Ori Marko On

Notice Apache Cayenne is using Velocity 1.6 which is not 2.0 (different logging settings),

Velocity Logging will create the file on your folder where to "started" it, in your case in the folder you execute Tomcat (check your script you are running)

Velocity will setup a file-based logger that will output all logging messages to a file called velocity.log in the 'current directory' where Velocity was initialized.