db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Army <qoz...@gmail.com>
Subject Classpath-dependent NPE at boot-time when running tests?
Date Wed, 19 Jul 2006 16:00:51 GMT
I'm trying to run derbyall against sane jars built from a *clean* codeline.  I 
have a script to set up the classpath and that script just happens to put 
derbytools.jar before derby.jar in my classpath.  I didn't think this would be a 
big deal...

It turns out that when derbytools.jar precedes derby.jar in my classpath, all 
tests fail at boot-time when trying to create the "wombat" database.  The full 
stack trace is shown at the bottom of this email.  I can successfully create a 
database manually, but for whatever reason the test harness is unable to create 
the database itself because of a NullPointerException.

I can reproduce the problem with both IBM and Sun 1.4.2 JVMs.  If I change my 
classpath to put derby.jar before derbytools.jar, everything works fine.

Can anyone else reproduce this behavior, or do I have something amiss in my 
environment?

If this is not just my problem, I'll file a Jira issue for it...

Army

----

Full stack trace for the failure:

ERROR XBM01: Startup failed due to an exception. See next exception for details.
	at 
org.apache.derby.iapi.error.StandardException.newException(StandardException.java:297)
	at 
org.apache.derby.iapi.services.monitor.Monitor.exceptionStartingModule(Monitor.java:668)
	at 
org.apache.derby.impl.services.monitor.BaseMonitor.bootService(BaseMonitor.java:1849)
	at 
org.apache.derby.impl.services.monitor.BaseMonitor.createPersistentService(BaseMonitor.java:1013)
	at 
org.apache.derby.iapi.services.monitor.Monitor.createPersistentService(Monitor.java:587)
	at 
org.apache.derby.impl.jdbc.EmbedConnection.createDatabase(EmbedConnection.java:1563)
	at org.apache.derby.impl.jdbc.EmbedConnection.<init>(EmbedConnection.java:243)
	at org.apache.derby.impl.jdbc.EmbedConnection30.<init>(EmbedConnection30.java:72)
	at org.apache.derby.jdbc.Driver30.getNewEmbedConnection(Driver30.java:73)
	at org.apache.derby.jdbc.InternalDriver.connect(InternalDriver.java:209)
	at org.apache.derby.jdbc.AutoloadedDriver.connect(AutoloadedDriver.java:116)
	at java.sql.DriverManager.getConnection(DriverManager.java:539)
	at java.sql.DriverManager.getConnection(DriverManager.java:158)
	at org.apache.derby.impl.tools.ij.util.startJBMS(util.java:491)
	at org.apache.derby.impl.tools.ij.util.startJBMS(util.java:571)
	at org.apache.derby.impl.tools.ij.ConnectionEnv.init(ConnectionEnv.java:62)
	at org.apache.derby.impl.tools.ij.utilMain.<init>(utilMain.java:149)
	at org.apache.derby.impl.tools.ij.utilMain14.<init>(utilMain14.java:51)
	at org.apache.derby.impl.tools.ij.Main14.getutilMain(Main14.java:102)
	at org.apache.derby.impl.tools.ij.Main.<init>(Main.java:232)
	at org.apache.derby.impl.tools.ij.Main14.<init>(Main14.java:68)
	at org.apache.derby.impl.tools.ij.Main14.getMain(Main14.java:91)
	at org.apache.derby.impl.tools.ij.Main.mainCore(Main.java:170)
	at org.apache.derby.impl.tools.ij.Main14.main(Main14.java:55)
	at org.apache.derby.tools.ij.main(ij.java:60)
============= begin nested exception, level (1) ===========
java.lang.NullPointerException
	at java.io.Reader.<init>(Reader.java(Inlined Compiled Code))
	at java.io.InputStreamReader.<init>(InputStreamReader.java(Inlined Compiled Code))
	at java.util.Properties.load(Properties.java(Compiled Code))
	at 
org.apache.derby.impl.sql.catalog.DataDictionaryImpl.run(DataDictionaryImpl.java:9757)
	at java.security.AccessController.doPrivileged1(Native Method)
	at java.security.AccessController.doPrivileged(AccessController.java:287)
	at 
org.apache.derby.impl.sql.catalog.DataDictionaryImpl.getQueryDescriptions(DataDictionaryImpl.java:9747)
	at 
org.apache.derby.impl.sql.catalog.DataDictionaryImpl.createSPSSet(DataDictionaryImpl.java:8275)
	at 
org.apache.derby.impl.sql.catalog.DataDictionaryImpl.createSystemSps(DataDictionaryImpl.java:8262)
	at 
org.apache.derby.impl.sql.catalog.DataDictionaryImpl.boot(DataDictionaryImpl.java:651)
	at org.apache.derby.impl.services.monitor.BaseMonitor.boot(BaseMonitor.java:1996)
	at 
org.apache.derby.impl.services.monitor.TopService.bootModule(TopService.java:290)
	at 
org.apache.derby.impl.services.monitor.BaseMonitor.startModule(BaseMonitor.java:542)
	at 
org.apache.derby.iapi.services.monitor.Monitor.bootServiceModule(Monitor.java:418)
	at 
org.apache.derby.impl.sql.conn.GenericLanguageConnectionFactory.bootDataDictionary(GenericLanguageConnectionFactory.java:357)
	at 
org.apache.derby.impl.sql.conn.GenericLanguageConnectionFactory.boot(GenericLanguageConnectionFactory.java:330)
	at org.apache.derby.impl.services.monitor.BaseMonitor.boot(BaseMonitor.java:1996)
	at 
org.apache.derby.impl.services.monitor.TopService.bootModule(TopService.java:290)
	at 
org.apache.derby.impl.services.monitor.BaseMonitor.startModule(BaseMonitor.java:542)
	at 
org.apache.derby.iapi.services.monitor.Monitor.bootServiceModule(Monitor.java:418)
	at org.apache.derby.impl.db.BasicDatabase.boot(BasicDatabase.java:193)
	at org.apache.derby.impl.services.monitor.BaseMonitor.boot(BaseMonitor.java:1996)
	at 
org.apache.derby.impl.services.monitor.TopService.bootModule(TopService.java:290)
	at 
org.apache.derby.impl.services.monitor.BaseMonitor.bootService(BaseMonitor.java:1831)
	at 
org.apache.derby.impl.services.monitor.BaseMonitor.createPersistentService(BaseMonitor.java:1013)
	at 
org.apache.derby.iapi.services.monitor.Monitor.createPersistentService(Monitor.java:587)
	at 
org.apache.derby.impl.jdbc.EmbedConnection.createDatabase(EmbedConnection.java:1563)
	at org.apache.derby.impl.jdbc.EmbedConnection.<init>(EmbedConnection.java:243)
	at org.apache.derby.impl.jdbc.EmbedConnection30.<init>(EmbedConnection30.java:72)
	at org.apache.derby.jdbc.Driver30.getNewEmbedConnection(Driver30.java:73)
	at org.apache.derby.jdbc.InternalDriver.connect(InternalDriver.java:209)
	at org.apache.derby.jdbc.AutoloadedDriver.connect(AutoloadedDriver.java:116)
	at java.sql.DriverManager.getConnection(DriverManager.java:539)
	at java.sql.DriverManager.getConnection(DriverManager.java:158)
	at org.apache.derby.impl.tools.ij.util.startJBMS(util.java:491)
	at org.apache.derby.impl.tools.ij.util.startJBMS(util.java:571)
	at org.apache.derby.impl.tools.ij.ConnectionEnv.init(ConnectionEnv.java:62)
	at org.apache.derby.impl.tools.ij.utilMain.<init>(utilMain.java:149)
	at org.apache.derby.impl.tools.ij.utilMain14.<init>(utilMain14.java:51)
	at org.apache.derby.impl.tools.ij.Main14.getutilMain(Main14.java:102)
	at org.apache.derby.impl.tools.ij.Main.<init>(Main.java:232)
	at org.apache.derby.impl.tools.ij.Main14.<init>(Main14.java:68)
	at org.apache.derby.impl.tools.ij.Main14.getMain(Main14.java:91)
	at org.apache.derby.impl.tools.ij.Main.mainCore(Main.java:170)
	at org.apache.derby.impl.tools.ij.Main14.main(Main14.java:55)
	at org.apache.derby.tools.ij.main(ij.java:60)
============= end nested exception, level (1) ===========
Cleanup action completed


Mime
View raw message