Issue Details (XML | Word | Printable)

Key: JDBC-254
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Mark Rotteveel
Reporter: Mark Rotteveel
Votes: 0
Watchers: 0

If you were logged in you would be able to see more operations.
Jaybird JCA/JDBC Driver

AccessControlException in LoggerFactory can cause driver load to fail in restricted environment

Created: 20/May/12 03:25 PM   Updated: 07/May/17 12:32 PM
Component/s: JDBC driver
Affects Version/s: None
Fix Version/s: Jaybird 3.0.0

 Description  « Hide

The loading of FBDriver can fail in a restricted environment as the LoggerFactory tries to retrieve the system property FBLog4j; if this fails (as described in above stackoverflow post in an unsigned applet, but other restricted scenarios are possible as well) with an AccessControlException, then the driver load will fail with a java.lang.NoClassDefFoundError: Could not initialize class org.firebirdsql.jdbc.FBDriver
Caused by: access denied (java.util.PropertyPermission FBLog4j read)
    at Source)
    at Source)
    at java.lang.SecurityManager.checkPermission(Unknown Source)
    at java.lang.SecurityManager.checkPropertyAccess(Unknown Source)
    at java.lang.System.getProperty(Unknown Source)
    at org.firebirdsql.logging.LoggerFactory.getLogger(
    at org.firebirdsql.logging.LoggerFactory.getLogger(
    at org.firebirdsql.jdbc.FBDriver.<clinit>(
    ... 12 more

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Mark Rotteveel added a comment - 20/May/12 03:29 PM
I will need to Investigate if this can occur in other situations with a restricted policy.

Mark Rotteveel added a comment - 10/Oct/12 05:49 PM
Made all access to system properties a privileged action (which by itself won't solve this issue). Will delve into it deeper at a later time.

Mark Rotteveel added a comment - 25/Jul/16 06:30 PM
I have decided that I will only delve into this further when specific issues are reported with a reproducible example (and policy) that is not an applet.