You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Bryan Pendleton (JIRA)" <ji...@apache.org> on 2012/09/01 16:42:07 UTC

[jira] [Commented] (DERBY-5916) java.lang.NullPointerException org.apache.derby.impl.store.raw.data.BaseDataFileFactory.stop() connecting to network server

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

Bryan Pendleton commented on DERBY-5916:
----------------------------------------

This part of the stack is interesting:

        at org.apache.derby.impl.services.monitor.TopService.shutdown(Unknown Source) 
        at org.apache.derby.impl.services.monitor.BaseMonitor.bootService(Unknown Source) 

There's only one place where bootService calls shutdown like this, and it's
in the catch (Throwable) block.

It sounds like there was such a severe error trying to start up the database that
we were trying to abort the startup and shutdown the parts that did start.

But we were in a state where, having failed to start up, we couldn't shut down, either.

BaseDataFileFactory.stop is very thorough with its null pointer checks, so it's not
easy to see how that code could get a NPE.

But I notice that line 532, the call to storageFactory.shutdown in this:

        if (isReadOnly())       // do enough to close all files, then return 
        {
            storageFactory.shutdown();
            return;
        }

isn't protected by "if( storageFactory != null )"

Perhaps you could reproduce this artificially by arranging by forcing
the startup code to throw an exception at just the right point...


                
> java.lang.NullPointerException org.apache.derby.impl.store.raw.data.BaseDataFileFactory.stop() connecting to network server
> ---------------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-5916
>                 URL: https://issues.apache.org/jira/browse/DERBY-5916
>             Project: Derby
>          Issue Type: Bug
>          Components: Store
>            Reporter: Kathey Marsden
>
>  I got a report of the exception below trying to connect to  database with absolute path and network server and the database name attribute.  I haven't gotten  information  on the derby version or  platform, Below is the url I received with some characters replaced.
> ij> connect 'jdbc:derby://localhost:1527/;databaseName=/home/uxxxx/Installs/hxxx_ext/mxxxxxxxx_db;create=true' ;
>  java.lang.NullPointerException
>         at org.apache.derby.impl.store.raw.data.BaseDataFileFactory.stop(Unknown Source)
>         at org.apache.derby.impl.services.monitor.TopService.stop(Unknown Source)
>         at org.apache.derby.impl.services.monitor.TopService.shutdown(Unknown Source)
>         at org.apache.derby.impl.services.monitor.BaseMonitor.bootService(Unknown Source)
>         at org.apache.derby.impl.services.monitor.BaseMonitor.startProviderService(Unknown Source)
>         at org.apache.derby.impl.services.monitor.BaseMonitor.findProviderAndStartService(Unknown Source)
>         at org.apache.derby.impl.services.monitor.BaseMonitor.startPersistentService(Unknown Source)
>         at org.apache.derby.iapi.services.monitor.Monitor.startPersistentService(Unknown Source)
>         at org.apache.derby.impl.jdbc.EmbedConnection.bootDatabase(Unknown Source)
>         at org.apache.derby.impl.jdbc.EmbedConnection.<init>(Unknown Source)
>         at org.apache.derby.jdbc.Driver40.getNewEmbedConnection(Unknown Source)
>         at org.apache.derby.jdbc.InternalDriver.connect(Unknown Source)
>         at org.apache.derby.jdbc.AutoloadedDriver.connect(Unknown Source)
>         at org.apache.derby.impl.drda.Database.makeConnection(Unknown Source)
>         at org.apache.derby.impl.drda.DRDAConnThread.getConnFromDatabaseName(Unknown Source)
>         at org.apache.derby.impl.drda.DRDAConnThread.verifyUserIdPassword(Unknown Source)
>         at org.apache.derby.impl.drda.DRDAConnThread.parseSECCHK(Unknown Source)
>         at org.apache.derby.impl.drda.DRDAConnThread.parseDRDAConnection(Unknown Source)
>         at org.apache.derby.impl.drda.DRDAConnThread.processCommands(Unknown Source)
>         at org.apache.derby.impl.drda.DRDAConnThread.run(Unknown Source)
> Cleanup action completed
> 2012-08-31 22:41:09.216 GMT Thread[DRDAConnThread_10,5,main] (DATABASE = ), (DRDAID = {1}), Java exception: ': java.lang.NullPointerException'.
> I wanted to go ahead and file it even without much information as I noticed there was a similar issue reported on the list but never filed:
> http://old.nabble.com/Random-DRDA-Error-on-IBM-J9-JVM-td33532717.html#a33532717

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira