db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andreas Korneliussen <Andreas.Kornelius...@Sun.COM>
Subject Re: AccessControlException on log/logmirror.ctrl after bouncing server...
Date Thu, 27 Jul 2006 09:14:27 GMT
Myrna van Lunteren wrote:
> Hi,
..
> Now here are my ponderables:
> - why does derbynet.jar need to have this permission, isn't it
> sufficient for derby.jar to have them (derby.jar has these permissions
> already).

I think it should be sufficient if derby.jar has these permissions, and 
that you have encountered a bug, which appears when starting an 
exisiting DB. I have reproduced the problem.

> - why are these permissions only required after bouncing the server?
> - is this situation not tested anywhere? i.e. not one networkserver test
>  that bounces the server and reconnects to the same database?

Probably not.

> - what can I do to get a stack trace?

I added a try / catch block in 
org.apache.derby.impl.drda.Database.makeConnection() and got this stack 
trace:


Apache Derby Network Server - 10.2.0.5 alpha started and ready to accept 
connections on port 1527 at 2006-07-27 09:06:07.044 GMT
java.sql.SQLException: Failed to start database 
'/export/home/tmp/devel/derbydev/testing/testdb', see the next exception 
for details.
         at 
org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java:44)
         at 
org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Util.java:88)
         at 
org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Util.java:94)
         at 
org.apache.derby.impl.jdbc.Util.generateCsSQLException(Util.java:173)
         at 
org.apache.derby.impl.jdbc.EmbedConnection.newSQLException(EmbedConnection.java:1955)
         at 
org.apache.derby.impl.jdbc.EmbedConnection.bootDatabase(EmbedConnection.java:1619)
         at 
org.apache.derby.impl.jdbc.EmbedConnection.<init>(EmbedConnection.java:216)
         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 
org.apache.derby.impl.drda.Database.makeConnection(Database.java:232)
         at 
org.apache.derby.impl.drda.DRDAConnThread.getConnFromDatabaseName(DRDAConnThread.java:1191)
         at 
org.apache.derby.impl.drda.DRDAConnThread.verifyUserIdPassword(DRDAConnThread.java:1169)
         at 
org.apache.derby.impl.drda.DRDAConnThread.parseSECCHK(DRDAConnThread.java:2758)
         at 
org.apache.derby.impl.drda.DRDAConnThread.parseDRDAConnection(DRDAConnThread.java:1031)
         at 
org.apache.derby.impl.drda.DRDAConnThread.processCommands(DRDAConnThread.java:874)
         at 
org.apache.derby.impl.drda.DRDAConnThread.run(DRDAConnThread.java:254)
NEXT Exception follows
java.security.AccessControlException: access denied 
(java.io.FilePermission 
/export/home/tmp/devel/derbydev/testing/testdb/log/logmirror.ctrl read)
         at 
java.security.AccessControlContext.checkPermission(AccessControlContext.java:269)
         at 
java.security.AccessController.checkPermission(AccessController.java:401)
         at 
java.lang.SecurityManager.checkPermission(SecurityManager.java:524)
         at java.lang.SecurityManager.checkRead(SecurityManager.java:863)
         at java.io.File.exists(File.java:678)
         at 
org.apache.derby.impl.store.raw.log.LogToFile.boot(LogToFile.java:2987)
         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.store.raw.data.BaseDataFileFactory.bootLogFactory(BaseDataFileFactory.java:1761)
         at 
org.apache.derby.impl.store.raw.data.BaseDataFileFactory.setRawStoreFactory(BaseDataFileFactory.java:1217)
         at org.apache.derby.impl.store.raw.RawStore.boot(RawStore.java:373)
         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.store.access.RAMAccessManager.boot(RAMAccessManager.java:987)
         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.bootStore(BasicDatabase.java:738)
         at 
org.apache.derby.impl.db.BasicDatabase.boot(BasicDatabase.java:178)
         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.startProviderService(BaseMonitor.java:1697)
         at 
org.apache.derby.impl.services.monitor.BaseMonitor.findProviderAndStartService(BaseMonitor.java:1577)
         at 
org.apache.derby.impl.services.monitor.BaseMonitor.startPersistentService(BaseMonitor.java:990)
         at 
org.apache.derby.iapi.services.monitor.Monitor.startPersistentService(Monitor.java:541)
         at 
org.apache.derby.impl.jdbc.EmbedConnection.bootDatabase(EmbedConnection.java:1602)
         at 
org.apache.derby.impl.jdbc.EmbedConnection.<init>(EmbedConnection.java:216)
         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 
org.apache.derby.impl.drda.Database.makeConnection(Database.java:232)
         at 
org.apache.derby.impl.drda.DRDAConnThread.getConnFromDatabaseName(DRDAConnThread.java:1191)
         at 
org.apache.derby.impl.drda.DRDAConnThread.verifyUserIdPassword(DRDAConnThread.java:1169)
         at 
org.apache.derby.impl.drda.DRDAConnThread.parseSECCHK(DRDAConnThread.java:2758)
         at 
org.apache.derby.impl.drda.DRDAConnThread.parseDRDAConnection(DRDAConnThread.java:1031)
         at 
org.apache.derby.impl.drda.DRDAConnThread.processCommands(DRDAConnThread.java:874)
         at 
org.apache.derby.impl.drda.DRDAConnThread.run(DRDAConnThread.java:254)


> - is it ok to add this permission to derby_tests.policy?
> 

If this is a bug, it is probably not ok, as it will hide this bug, and 
other bugs in the area of security manager.

Andreas

> Thx,
> Myrna


Mime
View raw message