[ 
https://issues.apache.org/jira/browse/DERBY-6396?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13807761#comment-13807761
 ] 

Knut Anders Hatlen commented on DERBY-6396:
-------------------------------------------

I'm able to reproduce this by doing "chmod 000" on the database's tmp directory 
before booting the database.

{noformat}
java.lang.NullPointerException
        at org.apache.derby.impl.io.DirFile.deleteAll(Unknown Source)
        at org.apache.derby.impl.io.BaseStorageFactory.createTempDir(Unknown 
Source)
        at org.apache.derby.impl.io.DirStorageFactory.doInit(Unknown Source)
        at org.apache.derby.impl.io.BaseStorageFactory.init(Unknown Source)
        at 
org.apache.derby.impl.services.monitor.StorageFactoryService.privGetStorageFactoryInstance(Unknown
 Source)
        at 
org.apache.derby.impl.services.monitor.StorageFactoryService.access$400(Unknown 
Source)
        at 
org.apache.derby.impl.services.monitor.StorageFactoryService$3.run(Unknown 
Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at 
org.apache.derby.impl.services.monitor.StorageFactoryService.getStorageFactoryInstance(Unknown
 Source)
        at 
org.apache.derby.impl.store.raw.data.BaseDataFileFactory.boot(Unknown Source)
{noformat}

> NullPointerException in DirFile
> -------------------------------
>
>                 Key: DERBY-6396
>                 URL: https://issues.apache.org/jira/browse/DERBY-6396
>             Project: Derby
>          Issue Type: Bug
>          Components: Miscellaneous
>    Affects Versions: 10.10.1.1
>         Environment: Windows 7
>            Reporter: Fabian Depry
>
> We got a NullPointerException trying to start a Derby database in embedded 
> mode; the stacktrace indicated it happened in 
> org.apache.derby.impl.io.DirFile.deleteAll(); that method got called from 
> org.apache.derby.impl.io.BaseStorageFactory.createTempDir().
> After investigating, it appears that the deleteAll() method calls 
> "super.list()", which according to the java.io.File specifications, can 
> return null. But the deleteAll() method doesn't handle that case gracefully.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to