Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 39098 invoked from network); 18 Jun 2007 11:51:48 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 18 Jun 2007 11:51:48 -0000 Received: (qmail 59782 invoked by uid 500); 18 Jun 2007 11:51:51 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 59755 invoked by uid 500); 18 Jun 2007 11:51:51 -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 59689 invoked by uid 99); 18 Jun 2007 11:51:51 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 18 Jun 2007 04:51:51 -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; Mon, 18 Jun 2007 04:51:46 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 8AD727141DC for ; Mon, 18 Jun 2007 04:51:26 -0700 (PDT) Message-ID: <27180355.1182167486566.JavaMail.jira@brutus> Date: Mon, 18 Jun 2007 04:51:26 -0700 (PDT) From: "Tony Wu (JIRA)" To: commits@harmony.apache.org Subject: [jira] Assigned: (HARMONY-4197) [classlib][sql]SyncFactory.getInstance cannot find the providers that are in the default package In-Reply-To: <11487751.1182138326094.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-4197?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Tony Wu reassigned HARMONY-4197: -------------------------------- Assignee: Tony Wu > [classlib][sql]SyncFactory.getInstance cannot find the providers that are in the default package > ------------------------------------------------------------------------------------------------ > > Key: HARMONY-4197 > URL: https://issues.apache.org/jira/browse/HARMONY-4197 > Project: Harmony > Issue Type: Bug > Components: Classlib > Environment: Windows XP / Linux > Reporter: Ruth Cao > Assignee: Tony Wu > Attachments: Harmony-4197.diff > > > SyncFactory.getInstance(String) is not able to return the providers which are in the default package. The following test case shows this problem: > public class SyncFactoryTest { > static String providerName = "DummyProvider"; > public static void main( String args[] ) { > try { > System.out.println("Provider name is " + providerName); > SyncFactory.registerProvider(providerName); > System.out.println("Provider registered."); > SyncProvider provider = SyncFactory.getInstance(providerName); > System.out.println("Got Instance of Provider."); > if( provider == null ) { > System.out.println("That shouldn't have happened. The provider is null"); > } else { > System.out.println("Provider retrieved is " + provider.getProviderID() ); > } > } catch (Exception e) { > System.out.println("Caught an exception!"); > e.printStackTrace(); > } finally { > System.unregisterProvider(providerName); > } > } > } > public class DummyProvider extends SyncProvider { > public String getProviderID() { > return getClass().getName(); > } > public String getVendor() { > return "Me"; > } > public String getVersion() { > return "2.0"; > } > public int supportsUpdatableView() { > return 0; > } > public int getDataSourceLock() { > return 0; > } > public void setDataSourceLock( int i ) {} > public int getProviderGrade() { > return 0; > } > public RowSetWriter getRowSetWriter() { > return null; > } > public RowSetReader getRowSetReader() { > return null; > } > } > RI prints: Provider retrieved is DummyProvider > while Harmony prints: Caught an exception! javax.sql.rowset.spi.SyncFactoryException: ClassNotFoundException: DummyProvider > ... > It seems that the way Harmony looks for the provider class is different from RI. I'll create a patch for this soon, thanks. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.