db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Colm McHugh <colm.mch...@gmail.com>
Subject Re: Exception running RunOptimizerTest
Date Mon, 21 Dec 2015 23:33:12 GMT
I get the exact same results as Bryan when running the test from the
command line, per Bryan's last reply.
I'm in the process of defining a policy file for running in the IDE per
Rick's suggestion, and muddling through
that. I am able to step through query execution code in the IDE by running
the debug-server target, (and
debug-ij target to submit queries) so have achieved my main goal... I'll
report back if I get anywhere with
specifying the required permissions for running in netbeans, but as it's
unlikely to be any improvement over
running from the command line it's not such a priority at this point.

Thanks for your help!
Colm.

On Sat, Dec 19, 2015 at 7:34 AM, Rick Hillegas <rick.hillegas@gmail.com>
wrote:

> Hi Colm,
>
> I agree with Bryan that it appears that this test has not been run since
> we introduced the BOOLEAN datatype five years ago in release 10.7.1.1. And
> I agree with Mike that the real problem seems to be that the correct Java
> security permissions haven't been granted to the Derby engine. The test
> doesn't appear to be designed to be run under a Java Security Manager. I
> say this because there is no doPrivileged block wrapping the check for the
> existence of the database directory at line 69. Here's a theory about
> what's going on:
>
> 1) The test itself is running on a client-side VM which is not governed by
> a SecurityManager.
>
> 2) But the IDE is running the engine in a separate server VM under a
> SecurityManager.
>
> 3) The server-side security policy is missing a permission.
>
> It may be that your IDE hasn't been adjusted to account for the new
> permission which must be granted to derby.jar when you use Derby 10.12.1.1
> :
>
>   permission org.apache.derby.security.SystemPermission "engine",
> "usederbyinternals";
>
> Hope this helps,
> -Rick
>
>
>
> On 12/16/15 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)
>
>
>
>

Mime
View raw message