Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 70782 invoked from network); 5 Jul 2007 04:52:25 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 5 Jul 2007 04:52:25 -0000 Received: (qmail 81795 invoked by uid 500); 5 Jul 2007 04:52:28 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 81776 invoked by uid 500); 5 Jul 2007 04:52:28 -0000 Mailing-List: contact commits-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list commits@harmony.apache.org Received: (qmail 81767 invoked by uid 99); 5 Jul 2007 04:52:28 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Jul 2007 21:52:28 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Jul 2007 21:52:25 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id C3738714229 for ; Wed, 4 Jul 2007 21:52:04 -0700 (PDT) Message-ID: <12637963.1183611124795.JavaMail.jira@brutus> Date: Wed, 4 Jul 2007 21:52:04 -0700 (PDT) From: "Sean Qiu (JIRA)" To: commits@harmony.apache.org Subject: [jira] Updated: (HARMONY-4303) [classlib][sql] java.sql.DriverManager.getDrivers() will read System prpperty "jdbc.drivers" cause java.lang.ExceptionInInitializerError In-Reply-To: <17685410.1183106224734.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HARMONY-4303?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sean Qiu updated HARMONY-4303: ------------------------------ Attachment: Harmony-4303.zip Could you pls try this patch? Thanks > [classlib][sql] java.sql.DriverManager.getDrivers() will read System prpperty "jdbc.drivers" cause java.lang.ExceptionInInitializerError > ---------------------------------------------------------------------------------------------------------------------------------------- > > Key: HARMONY-4303 > URL: https://issues.apache.org/jira/browse/HARMONY-4303 > Project: Harmony > Issue Type: Bug > Components: Classlib > Environment: WIndows > Red Hat > Reporter: Sean Qiu > Assignee: Leo Li > Attachments: Harmony-4303.zip > > > getDrivers method of DriverManager will read System property "jdbc.drivers". > That will cause java.lang.ExceptionInInitializerError for lack of permission by default. > public class Test { > public static void main(String[] args) { > System.setSecurityManager(new SecurityManager()); > try { > Enumeration drivers = DriverManager.getDrivers(); > while (drivers.hasMoreElements()) { > Driver driver = drivers.nextElement(); > } > } catch (Error e) { > e.printStackTrace(); > } > } > } > In RI: Pass > In Harmony: Throw a java.lang.ExceptionInInitializerError > java.lang.ExceptionInInitializerError > at java.lang.J9VMInternals.initialize(J9VMInternals.java:195) > at Test.main(Test.java:13) > Caused by: java.security.AccessControlException: Access denied (java.util.PropertyPermission jdbc.drivers read) > at java.security.AccessController.checkPermission(AccessController.java:94) > at java.lang.SecurityManager.checkPermission(SecurityManager.java:746) > at java.lang.SecurityManager.checkPropertyAccess(SecurityManager.java:373) > at java.lang.System.getProperty(System.java:675) > at java.sql.DriverManager.loadInitialDrivers(DriverManager.java:73) > at java.sql.DriverManager.(DriverManager.java:65) > at java.lang.J9VMInternals.initializeImpl(Native Method) > at java.lang.J9VMInternals.initialize(J9VMInternals.java:177) > ... 1 more -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.