i have not used netbeans so can't help much there.
A good place to start looking for errors is derby.log, which should be in your
testdb directory. it is probably
in your current directory, but could be elsewhere based on various
environmental variables. It definitely seems
like a setup/jar file/permissions issue.
if possible i would suggest getting something running outside netbeans first,
if you have not done it yet. just get
ij runnings against delivered jars and create a db and run some simple sql.
Then try that in netbeans and you will
know it is a problem with netbeans setup and not environmental in your system.
/mikem
On 12/16/2015 12:03 PM, Colm McHugh wrote:
Hi Derby devs,
I am getting the exception below when running RunOptimizerTest (in org.apache.derbyTesting.system.optimizer). My goal is to step
through the query compilation code to understand how it works. I am using Java 1.8. I am using netbeans 8.0.1 and the class path
includes derbyrun.jar and derbyTesting.jar. Any help appreciated.
run:
Running test with url jdbc:derby:testdb;create=true
Initializing db ...
SQL Exception :java.sql.SQLException: XJ041.C : [0] testdb
java.sql.SQLException: XJ041.C : [0] testdb
at
org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java:115)
at
org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java:141)
at org.apache.derby.impl.jdbc.Util.seeNextException(Util.java:255)
at
org.apache.derby.impl.jdbc.EmbedConnection.createDatabase(EmbedConnection.java:2656)
at org.apache.derby.impl.jdbc.EmbedConnection.<init>(EmbedConnection.java:435)
at org.apache.derby.jdbc.InternalDriver$1.run(InternalDriver.java:663)
at org.apache.derby.jdbc.InternalDriver$1.run(
InternalDriver.java:659)
========================= R E S U L T S =========================
at java.security.AccessController.doPrivileged(Native Method)
at
org.apache.derby.jdbc.InternalDriver.getNewEmbedConnection(InternalDriver.java:657)
at org.apache.derby.jdbc.InternalDriver.connect(InternalDriver.java:306)
at org.apache.derby.jdbc.InternalDriver.connect(InternalDriver.java:963)
at org.apache.derby.jdbc.AutoloadedDriver.connect(AutoloadedDriver.java:147)
at java.sql.DriverManager.getConnection(DriverManager.java:664)
at java.sql.DriverManager.getConnection(DriverManager.java:270)
at
org.apache.derbyTesting.system.optimizer.RunOptimizerTest.main(RunOptimizerTest.java:94)
Caused by: ERROR XJ041: XJ041.C : [0] testdb
at
org.apache.derby.iapi.error.StandardException.newException(StandardException.java:290)
at
org.apache.derby.impl.jdbc.SQLExceptionFactory.wrapArgsForTransportAcrossDRDA(SQLExceptionFactory.java:170)
at
org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java:75)
... 14 more
Caused by: ERROR XBM01: XBM01.D
at
org.apache.derby.iapi.error.StandardException.newException(StandardException.java:290)
at
org.apache.derby.iapi.services.monitor.Monitor.exceptionStartingModule(Monitor.java:743)
at
org.apache.derby.impl.services.monitor.BaseMonitor.bootService(BaseMonitor.java:1841)
at
org.apache.derby.impl.services.monitor.BaseMonitor.createPersistentService(BaseMonitor.java:1006)
at
org.apache.derby.impl.services.monitor.FileMonitor.createPersistentService(FileMonitor.java:48)
at
org.apache.derby.iapi.services.monitor.Monitor.createPersistentService(Monitor.java:650)
at org.apache.derby.impl.jdbc.EmbedConnection$5.run(EmbedConnection.java:4062)
at java.security.AccessController.doPrivileged(Native Method)
at
org.apache.derby.impl.jdbc.EmbedConnection.createPersistentService(EmbedConnection.java:4056)
at
org.apache.derby.impl.jdbc.EmbedConnection.createDatabase(EmbedConnection.java:2649)
... 11 more
Caused by: java.lang.NullPointerException
at
org.apache.derby.impl.store.raw.log.LogToFile.writeControlFile(LogToFile.java:2411)
at org.apache.derby.impl.store.raw.log.LogToFile.boot(LogToFile.java:3383)
at
org.apache.derby.impl.services.monitor.BaseMonitor.boot(BaseMonitor.java:1986)
at
org.apache.derby.impl.services.monitor.TopService.bootModule(TopService.java:334)
at
org.apache.derby.impl.services.monitor.BaseMonitor.startModule(BaseMonitor.java:537)
at
org.apache.derby.impl.services.monitor.FileMonitor.startModule(FileMonitor.java:48)
at
org.apache.derby.iapi.services.monitor.Monitor.bootServiceModule(Monitor.java:460)
at
org.apache.derby.impl.store.raw.data.BaseDataFileFactory$10.run(BaseDataFileFactory.java:3058)
at java.security.AccessController.doPrivileged(Native Method)
at
org.apache.derby.impl.store.raw.data.BaseDataFileFactory.bootServiceModule(BaseDataFileFactory.java:3052)
at
org.apache.derby.impl.store.raw.data.BaseDataFileFactory.bootLogFactory(BaseDataFileFactory.java:1811)
at
org.apache.derby.impl.store.raw.data.BaseDataFileFactory.setRawStoreFactory(BaseDataFileFactory.java:1287)
at org.apache.derby.impl.store.raw.RawStore.boot(RawStore.java:227)
at
org.apache.derby.impl.services.monitor.BaseMonitor.boot(BaseMonitor.java:1986)
at
org.apache.derby.impl.services.monitor.TopService.bootModule(TopService.java:334)
at
org.apache.derby.impl.services.monitor.BaseMonitor.startModule(BaseMonitor.java:537)
at
org.apache.derby.impl.services.monitor.FileMonitor.startModule(FileMonitor.java:48)
at
org.apache.derby.iapi.services.monitor.Monitor.bootServiceModule(Monitor.java:460)
at
org.apache.derby.impl.store.access.RAMAccessManager$5.run(RAMAccessManager.java:1393)
at java.security.AccessController.doPrivileged(Native Method)
at
org.apache.derby.impl.store.access.RAMAccessManager.bootServiceModule(RAMAccessManager.java:1387)
at
org.apache.derby.impl.store.access.RAMAccessManager.boot(RAMAccessManager.java:1039)
at
org.apache.derby.impl.services.monitor.BaseMonitor.boot(BaseMonitor.java:1986)
at
org.apache.derby.impl.services.monitor.TopService.bootModule(TopService.java:334)
at
org.apache.derby.impl.services.monitor.BaseMonitor.startModule(BaseMonitor.java:537)
at
org.apache.derby.impl.services.monitor.FileMonitor.startModule(FileMonitor.java:48)
at
org.apache.derby.iapi.services.monitor.Monitor.bootServiceModule(Monitor.java:460)
at org.apache.derby.impl.db.BasicDatabase$5.run(BasicDatabase.java:1001)
at java.security.AccessController.doPrivileged(Native Method)
at
org.apache.derby.impl.db.BasicDatabase.bootServiceModule(BasicDatabase.java:995)
at org.apache.derby.impl.db.BasicDatabase.bootStore(BasicDatabase.java:777)
at org.apache.derby.impl.db.BasicDatabase.boot(BasicDatabase.java:186)
at
org.apache.derby.impl.services.monitor.BaseMonitor.boot(BaseMonitor.java:1986)
at
org.apache.derby.impl.services.monitor.TopService.bootModule(TopService.java:334)
at
org.apache.derby.impl.services.monitor.BaseMonitor.bootService(BaseMonitor.java:1814)
... 18 more
BUILD SUCCESSFUL (total time: 2 seconds)
--
email: Mike Matrigali - [email protected]
linkedin: https://www.linkedin.com/in/MikeMatrigali