Thank you *very* much for that fast answer.

I contacted the ActiTime developers. They're very helpful and would like me to 
turn off security completely and tell me what's happening. For two reasons I 
wouldn't like to do that:
1) I don't know how to do that
2) I don't want to do that because the docs (yeah I read the docs!!) explicitly 
warned doing this "unless you know what you're doing." So I don't. See 1).

So, they said it's very likely a permission problem. I grepped the
logfile with "grep -i permiss catalina*" and it really gave some read
permission denied. And it was related to logging. A config file
/var/lib/tomcat5.5/webapps/actitime/WEB-INF/classes/logging.properties
was denied read access to, unfortunately there is no such file with that
name.

The full line was:
Caused by: java.security.AccessControlException: access denied 
(java.io.FilePermission 
/var/lib/tomcat5.5/webapps/actitime/WEB-INF/classes/logging.properties read)

Here's the policy:

grant codeBase "file:/var/lib/tomcat5.5/webapps/actitime/-" {
  permission java.lang.RuntimePermission "getClassLoader";
  permission java.util.PropertyPermission "*", "read,write";
  permission java.io.FilePermission "<<ALL FILES>>", "read";
  // Database access
  permission java.lang.RuntimePermission 
"accessClassInPackage.org.apache.jasper.compiler";
  permission java.lang.RuntimePermission 
"accessClassInPackage.org.apache.jasper.compiler.*";
  // Net access to Mysql
  permission java.net.SocketPermission "127.0.0.1:3306", "connect,resolve";
};

grant codeBase "file:/var/lib/tomcat5.5/webapps/actitime/WEB-INF/lib/*" {
  permission java.lang.RuntimePermission "accessDeclaredMembers";
  permission java.lang.RuntimePermission "getClassLoader";
  permission java.util.PropertyPermission "*", "read";
};

For some reason I  hoped that the line with "<<ALL FILES>>" and "read"
would include permission to read files there. Even changing to
"read,write" didn't help (in case the app wanted to actually create it's
'logging.properties' file).

Oh and by the way, it works out of the box on my OpenSuSE test install
at home :-(

But you wanted a stack trace. Here's a stack trace attached. I have
started the server, accessed the page with the error message once and
shut down the server immediately so it should contain everything.


** Attachment added: "Stack trace with permission error"
   http://launchpadlibrarian.net/22047740/catalina.2009-02-06.log

-- 
tomcat cannot connect to mysql
https://bugs.launchpad.net/bugs/217607
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to mysql-dfsg-5.0 in ubuntu.

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs

Reply via email to