Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 37176 invoked from network); 11 Jul 2006 19:52:33 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 11 Jul 2006 19:52:33 -0000 Received: (qmail 55260 invoked by uid 500); 11 Jul 2006 19:52:31 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 55226 invoked by uid 500); 11 Jul 2006 19:52:31 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 55193 invoked by uid 99); 11 Jul 2006 19:52:31 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Jul 2006 12:52:31 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [209.237.227.198] (HELO brutus.apache.org) (209.237.227.198) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Jul 2006 12:52:28 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 4B69B7141E0 for ; Tue, 11 Jul 2006 19:50:31 +0000 (GMT) Message-ID: <2888458.1152647431306.JavaMail.jira@brutus> Date: Tue, 11 Jul 2006 19:50:31 +0000 (GMT+00:00) From: "Rick Hillegas (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Updated: (DERBY-1296) Setting property derby.system.bootAll causes an Exception In-Reply-To: <11220094.1146848969364.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 X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/DERBY-1296?page=all ] Rick Hillegas updated DERBY-1296: --------------------------------- Version: 10.2.0.0 (was: 10.1.2.1) Assigning to 10.2. > Setting property derby.system.bootAll causes an Exception > --------------------------------------------------------- > > Key: DERBY-1296 > URL: http://issues.apache.org/jira/browse/DERBY-1296 > Project: Derby > Type: Bug > Components: Services > Versions: 10.2.0.0 > Environment: Windows XP > Reporter: David Heath > Priority: Critical > > After creating 3 databases under c:\databases\sample - I wanted to get a list of available databases, I followed the example in the "DriverPropertyInfo array example" in the developer guide and used the following routine: > ... > private static void test2() { > String driverName ="org.apache.derby.jdbc.EmbeddedDriver"; > String url = "jdbc:derby:"; > Properties p = System.getProperties(); > p.put("derby.system.home", "C:\\databases\\sample"); > p.put("derby.system.bootAll", "true"); > try { > Class.forName(driverName); > Driver driver = DriverManager.getDriver(url); > Properties info = new Properties(); > DriverPropertyInfo[] attributes = driver.getPropertyInfo(url, info); > for (DriverPropertyInfo attribute : attributes) { > System.out.print(attribute.name); > System.out.print(" : "); > if (attribute.choices != null) { > System.out.print(Arrays.toString(attribute.choices)); > } > System.out.print(" : "); > System.out.println(attribute.value); > } > } > catch(Exception exp) { > exp.printStackTrace(); > } > try { > DriverManager.getConnection("jdbc:derby:;shutdown=true"); > } > catch(Exception exp) { > } > } > When run the following exception occured: > Exception in thread "main" java.lang.ExceptionInInitializerError > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Unknown Source) > at Test.test2(Test.java:20) > at Test.main(Test.java:8) > Caused by: java.lang.NullPointerException > at org.apache.derby.impl.services.monitor.BaseMonitor.bootProviderServic > es(Unknown Source) > at org.apache.derby.impl.services.monitor.BaseMonitor.bootPersistentServ > ices(Unknown Source) > at org.apache.derby.impl.services.monitor.BaseMonitor.runWithState(Unkno > wn Source) > at org.apache.derby.impl.services.monitor.FileMonitor.(Unknown Sou > rce) > at org.apache.derby.iapi.services.monitor.Monitor.startMonitor(Unknown S > ource) > at org.apache.derby.iapi.jdbc.JDBCBoot.boot(Unknown Source) > at org.apache.derby.jdbc.EmbeddedDriver.boot(Unknown Source) > at org.apache.derby.jdbc.EmbeddedDriver.(Unknown Source) > ... 4 more > If i comment out: > // p.put("derby.system.bootAll", "true"); > The program runs, but no databases are listed. > The output from java org.apache.derby.tools.sysinfo: > ------------------ Java Information ------------------ > Java Version: 1.5.0_05 > Java Vendor: Sun Microsystems Inc. > Java home: C:\Program Files\Java\jre1.5.0_05 > Java classpath: C:\tools\derby\db-derby-10.1.2.1-bin\lib\derby.jar;C:\tools\der > by\db-derby-10.1.2.1-bin\lib\derbytools.jar;;C:\tools\Java\jdk1.5.0_05\lib\tools > .jar;C:\tools\log4j\logging-log4j-1.2.12\dist\lib\log4j-1.2.12.jar;C:\dev_deploy > \plugins\com.x4m.util_1.0.0.jar;C:\dev_deploy\plugins\com.x4m.uomcrs_1.0.0.jar;C > :\dev_deploy\plugins\com.x4m.database_1.0.0.jar;C:\dev_deploy\plugins\com.x4m.fe > ature_1.0.0.jar;C:\dev_deploy\plugins\org.eclipse.core.runtime_3.1.0.jar;C:\dev_ > deploy\plugins\org.eclipse.osgi_3.1.0.jar;C:\dev_deploy\plugins\com.x4m.database > _1.0.0.jar;C:\david\novice\syncservices\build\class > OS name: Windows XP > OS architecture: x86 > OS version: 5.1 > Java user name: David > Java user home: C:\Documents and Settings\David > Java user dir: C:\david\novice\derby > java.specification.name: Java Platform API Specification > java.specification.version: 1.5 > --------- Derby Information -------- > JRE - JDBC: J2SE 5.0 - JDBC 3.0 > [C:\tools\derby\db-derby-10.1.2.1-bin\lib\derby.jar] 10.1.2.1 - (330608) > [C:\tools\derby\db-derby-10.1.2.1-bin\lib\derbytools.jar] 10.1.2.1 - (330608) > ------------------------------------------------------ > ----------------- Locale Information ----------------- > ------------------------------------------------------ > I have read most of the documentation and can find no other way to get a list of available catalogs - thus I do not know of a workaround for this problem. > David Heath > Transform Software and Services -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira