Hi Kathey,

Here is what happens...

Yes, this is a multi-threaded system. No, only one shutdown request is 
happening. I have not tried with deregister=true.

The new finding is...

This NullPointerException is only happening in a Single CPU (or single Core) 
system. When the system and Kernel is upgraded to 2 CPU / core system - the 
NullPointerException no longer happens, also the same has been tried on a 4 CPU 
/ core system and it does not happen there again. So strangely this is only 
happening on a single processor system.

I feel that there should be a check for null in 
org.apache.derby.impl.store.raw.xact.XactFactory.add() method to check for ttab 
for null.

Regards,
Oskar



________________________________
 From: Katherine Marsden <kmarsdende...@sbcglobal.net>
To: Derby Discussion <derby-user@db.apache.org> 
Cc: Oskar Zinger <oska...@yahoo.com> 
Sent: Tuesday, January 29, 2013 12:22 AM
Subject: Re: NullPointerException when Shuting Down Derby
 

On 1/28/2013 3:04 PM, Oskar Zinger wrote:

I just upgraded to 10.8.3 and I am still running into the same 
NullPointerException (NPE).
>
>
>
>This is actually different, it comes from:
>org.apache.derby.impl.store.raw.xact.XactFactory.add(Unknown Source)
>
>
Hi Oskar,

Thank you for upgrading to the latest. That always makes things
    easier to debug.
I guess the next step is to understand how you get into this state.
Is there a stand alone reproduction that you can post in Jira?
Is there something in the log prior to this NPE that might give us
    an indication of what was going on when you got the NPE?

Is your program multi-threaded? Is there possibly more than one
    thread shutting down at once?  Do you have the same problem if you
    use deregister=true?


Best 

Kathey



Thanks,
>Oskar
>
>
>
>
>________________________________
> From: Katherine Marsden <kmarsdende...@sbcglobal.net>
>To: Derby Discussion <derby-user@db.apache.org> 
>Cc: Oskar Zinger <oska...@yahoo.com> 
>Sent: Monday, January 28, 2013 4:28 PM
>Subject: Re: NullPointerException when Shuting Down Derby
> 
>
>On 1/28/2013 12:52 PM, Oskar Zinger wrote:
>
>When I do the following it sometimes returns a NullPointerException:
>>
>>
>>     
DriverManager.getConnection("jdbc:derby:;shutdown=true;deregister=false");
>>
>>
>>Here is the exception stack trace:
>>
>>
>>Caused by: java.lang.NullPointerException
>>        at org.apache.derby.impl.store.raw.xact.XactFactory.add(Unknown 
>>Source)
>>        at 
>>org.apache.derby.impl.store.raw.xact.XactFactory.pushTransactionContext(Unknown
>> Source)
>>        at 
>>org.apache.derby.impl.store.raw.xact.XactFactory.startInternalTransaction(Unknown
>> Source)
>>        at 
>>org.apache.derby.impl.store.raw.log.LogToFile.checkpointWithTran(Unknown 
>>Source)
>>        at org.apache.derby.impl.store.raw.log.LogToFile.checkpoint(Unknown 
>>Source)
>>        at org.apache.derby.impl.store.raw.RawStore.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.shutdown(Unknown Source)
>>        at 
>>org.apache.derby.impl.services.monitor.BaseMonitor.shutdown(Unknown Source)
>>        at org.apache.derby.jdbc.InternalDriver.connect(Unknown Source)
>>        at org.apache.derby.jdbc.AutoloadedDriver.connect(Unknown Source)
>>        at java.sql.DriverManager.getConnection(DriverManager.java:399)
>>        at java.sql.DriverManager.getConnection(DriverManager.java:350)
>>
>>
>>Does anyone know why this is happening?
>>
>>
>>I am using Derby 10.8.2.3
>>
>>
>>Thanks,
>>Oskar Zinger
>https://issues.apache.org/jira/browse/DERBY-5916 was backported to 10.8 with 
>revision 1395186 and looks similar
>I suggest you pick up 10.8.3 that has that fix.
>
>
>
>

Reply via email to