Subject Re: [Firebird-Java] Moving from Windows to Linux (Ubuntu)
Author Alexey Panchenko
Ian A. Newby wrote:

> Caused by: java.security.AccessControlException: access denied
> (java.util.PropertyPermission FBLog4j read)

[...]

> org.firebirdsql.logging.LoggerFactory.getLogger(LoggerFactory.java:36)

= 1st part of the issue =

You are running tomcat with the security manager. It is the java
permissions, not the unix permissions.

http://tomcat.apache.org/tomcat-5.5-doc/security-manager-howto.html

You can either run tomcat without the security manager, or adjust the
permissions.

For tomcat they are usually configured in the
tomcat/conf/catalina.policy, in some linux distributions this file
could be generated from some others, please look how it works in your
case.

Your should add the following line

permission java.util.PropertyPermission "FBLog4j", "read";

Also you application may require some other permissions - access to
other system properties, files & folders, sockets, etc.

= 2nd part of the issue =

Firebird client should ignore SecurityException when reading this
property.

Index: LoggerFactory.java
===================================================================
RCS file: /cvsroot/firebird/client-java/src/main/org/firebirdsql/logging/LoggerFactory.java,v
retrieving revision 1.5
diff -u -r1.5 LoggerFactory.java
--- LoggerFactory.java 15 Apr 2005 23:08:18 -0000 1.5
+++ LoggerFactory.java 10 Jan 2007 03:59:40 -0000
@@ -33,7 +33,13 @@

public static Logger getLogger(String name,boolean def) {
if (!checked){
- String sLog4j = System.getProperty("FBLog4j");
+ String sLog4j;
+ try {
+ sLog4j = System.getProperty("FBLog4j");
+ }
+ catch (SecurityException e) {
+ sLog4j = null;
+ }
if (!def){
if (sLog4j != null && sLog4j.equals("true"))
log4j = true;


--
Best regards,
Alexey mailto:alex+news@...