You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-user@db.apache.org by Mu...@tolina.com on 2010/02/15 18:00:51 UTC

NPE in JBitSet

Greetings,

I'm getting a NPE with Derby 10.5.3.0. Is there a known workaround or can 
I post this as a bug at JIRA?

A NPE occured at the same location before: 
http://issues.apache.org/jira/browse/DERBY-1574

To reproduce:
----------------------

CREATE TABLE ABC (ID int PRIMARY KEY NOT NULL);
CREATE TABLE DEF (ID int PRIMARY KEY NOT NULL);

SELECT * 
FROM ABC t1
WHERE (SELECT DISTINCT t2.ID FROM DEF t2) 
        IN (SELECT t3.ID FROM DEF t3) 

----------------------

Leads to 

error message: 
Error: DERBY SQL error: SQLCODE: -1, SQLSTATE: XJ001, SQLERRMC: 
java.lang.NullPointerExceptionXJ001.U
SQLState:  XJ001
ErrorCode: -1

Stacktrace:
java.lang.NullPointerException
        at org.apache.derby.iapi.util.JBitSet.or(Unknown Source)
        at org.apache.derby.impl.sql.compile.OptimizerImpl.<init>(Unknown 
Source)
        at 
org.apache.derby.impl.sql.compile.Level2OptimizerImpl.<init>(Unknown 
Source)
        at 
org.apache.derby.impl.sql.compile.Level2OptimizerFactoryImpl.getOptimizerImpl(Unknown 
Source)
        at 
org.apache.derby.impl.sql.compile.OptimizerFactoryImpl.getOptimizer(Unknown 
Source)
        at 
org.apache.derby.impl.sql.compile.ResultSetNode.getOptimizer(Unknown 
Source)
        at org.apache.derby.impl.sql.compile.SelectNode.optimize(Unknown 
Source)
        at org.apache.derby.impl.sql.compile.SubqueryNode.optimize(Unknown 
Source)
        at org.apache.derby.impl.sql.compile.SubqueryList.optimize(Unknown 
Source)
        at org.apache.derby.impl.sql.compile.SelectNode.optimize(Unknown 
Source)
        at 
org.apache.derby.impl.sql.compile.DMLStatementNode.optimizeStatement(Unknown 
Source)
        at 
org.apache.derby.impl.sql.compile.CursorNode.optimizeStatement(Unknown 
Source)
        at org.apache.derby.impl.sql.GenericStatement.prepMinion(Unknown 
Source)
        at org.apache.derby.impl.sql.GenericStatement.prepare(Unknown 
Source)
        at 
org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.prepareInternalStatement(Unknown 
Source)
        at 
org.apache.derby.impl.jdbc.EmbedPreparedStatement.<init>(Unknown Source)
        at 
org.apache.derby.impl.jdbc.EmbedPreparedStatement20.<init>(Unknown Source)
        at 
org.apache.derby.impl.jdbc.EmbedPreparedStatement30.<init>(Unknown Source)
        at 
org.apache.derby.impl.jdbc.EmbedPreparedStatement40.<init>(Unknown Source)
        at 
org.apache.derby.jdbc.Driver40.newEmbedPreparedStatement(Unknown Source)
        at 
org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(Unknown 
Source)
        at 
org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(Unknown 
Source)
        at org.apache.derby.impl.drda.DRDAStatement.prepare(Unknown 
Source)
        at 
org.apache.derby.impl.drda.DRDAStatement.explicitPrepare(Unknown Source)
        at 
org.apache.derby.impl.drda.DRDAConnThread.parsePRPSQLSTT(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


Regards,
Murat

Antwort: Re: NPE in JBitSet

Posted by Mu...@tolina.com.
Hi Bryan,

thanks for the reply. I submitted the bug as #4549.

https://issues.apache.org/jira/browse/DERBY-4549

Regards,
Murat





Von:
Bryan Pendleton <bp...@amberpoint.com>
An:
Derby Discussion <de...@db.apache.org>
Datum:
16.02.2010 02:39
Betreff:
Re: NPE in JBitSet



> I'm getting a NPE with Derby 10.5.3.0. Is there a known workaround or 
> can I post this as a bug at JIRA?

Hi Murat,

I see the same problem with the current Derby trunk, so this seems
like a new bug to me. If you could post it as a bug at JIRA that would
be very much appreciated.

Please include your test case, and the Derby stack trace, just as you
did in your email; it was very clearly presented, thank you!

Regarding a workaround, I'm afraid I don't know of any. Something
has gone wrong in the data structures in the SQL compiler, but it will
take some study to figure out exactly what.

thanks,

bryan



Re: NPE in JBitSet

Posted by Bryan Pendleton <bp...@amberpoint.com>.
> I'm getting a NPE with Derby 10.5.3.0. Is there a known workaround or 
> can I post this as a bug at JIRA?

Hi Murat,

I see the same problem with the current Derby trunk, so this seems
like a new bug to me. If you could post it as a bug at JIRA that would
be very much appreciated.

Please include your test case, and the Derby stack trace, just as you
did in your email; it was very clearly presented, thank you!

Regarding a workaround, I'm afraid I don't know of any. Something
has gone wrong in the data structures in the SQL compiler, but it will
take some study to figure out exactly what.

thanks,

bryan