Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 21876 invoked from network); 7 Feb 2007 12:04:27 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 7 Feb 2007 12:04:27 -0000 Received: (qmail 22197 invoked by uid 500); 7 Feb 2007 12:04:34 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 22167 invoked by uid 500); 7 Feb 2007 12:04:34 -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 22156 invoked by uid 99); 7 Feb 2007 12:04:34 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Feb 2007 04:04:34 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= 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, 07 Feb 2007 04:04:26 -0800 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 2A8717142CC for ; Wed, 7 Feb 2007 04:04:06 -0800 (PST) Message-ID: <26881982.1170849846171.JavaMail.jira@brutus> Date: Wed, 7 Feb 2007 04:04:06 -0800 (PST) From: "Pavel Pervov (JIRA)" To: commits@harmony.apache.org Subject: [jira] Commented: (HARMONY-2644) [drlvm][kernel natives] bootclasspath's class loading failure produces wrong throwable In-Reply-To: <3416691.1165929743387.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-2644?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12470937 ] Pavel Pervov commented on HARMONY-2644: --------------------------------------- Your patch is cleaner but it does exactly the same thing as original patch did. What is required to do here is to differentiate the reason of loading failure in bootstrap class loader: bytes for requested class are not found OR bytes for one of its predecessors are missing. The first case throws ClassNotFoundException from Class.forName, the second - NoClassDefFoundError. The only way I see here is to keep some thread local flag along with raised NoClassDefFoundError and exn_clear() in VMClassRegistry.findLoadedClass (loadBootstrapClass in your patch) if this flag is set. > [drlvm][kernel natives] bootclasspath's class loading failure produces wrong throwable > -------------------------------------------------------------------------------------- > > Key: HARMONY-2644 > URL: https://issues.apache.org/jira/browse/HARMONY-2644 > Project: Harmony > Issue Type: Bug > Components: DRLVM > Reporter: Vladimir Beliaev > Assigned To: Alexey Varlamov > Priority: Minor > Attachments: cloading.diff, H2846.patch, Test.java > > > DRLVM throws ClassNotFoundException instead of NoClassDefFoundError if it fails to load class from bootclasspath. > I did not find the exact place in specification saying it is wrong behavior, still > 1. JVMS operates with NoClassDefFoundError only in case the loading process failed. > 2. both Sun & JRockit java throws NoClassDefFoundError from the test below. > To reproduce the issue, please do the following: > a) compile attached Test.java (this produces Test.class, SubClass.class and SuperClass.class) > b) remove SuperClass.class > c) run test with SubClass in bootclasspath, e.g. > > $ ls -1 *.class > Test.class SubClass.class > $ java -Xbootclasspath/a:. Test > The output on Reference Implementation: > PASSED: got NoClassDefFoundError... > Note: run Test with SubClass in bootclasspath... > The output on Harmony DRLVM (with -showversion key): > Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors, as applicable. > java version "1.5.0" > pre-alpha : not complete or compatible > svn = r486063, (Dec 12 2006), Windows/ia32/msvc 1310, debug build > http://incubator.apache.org/harmony > FAILED: got ClassNotFoundException... > Thanks > Vladimir -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.