db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lily Wei (JIRA)" <j...@apache.org>
Subject [jira] Created: (DERBY-5041) NullPointerException in generated code in query with group by
Date Mon, 14 Feb 2011 23:51:57 GMT
NullPointerException in generated code in query with group by
-------------------------------------------------------------

                 Key: DERBY-5041
                 URL: https://issues.apache.org/jira/browse/DERBY-5041
             Project: Derby
          Issue Type: Bug
          Components: SQL
            Reporter: Lily Wei
             Fix For: 10.8.0.0


Report on behave of Pavel Bortnovskiy.
Our query (which Pavel cannot show here for now) was complex, with case statements and 'group
by' generated NullPointerException
This is the stack:
2011-02-09 10:39:13,576 ERROR DataProcessor  - SQL Exception due to executing statement after
shutdown 
java.sql.SQLException: The exception 'java.lang.NullPointerException' was thrown while evaluating
an expression. 
        at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source)

        at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source) 
        at org.apache.derby.impl.jdbc.Util.seeNextException(Unknown Source) 
        at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown Source)

        at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown Source)

        at org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown Source) 
        at org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown Source) 
        at org.apache.derby.impl.jdbc.EmbedResultSet.closeOnTransactionError(Unknown Source)

        at org.apache.derby.impl.jdbc.EmbedResultSet.movePosition(Unknown Source) 
        at org.apache.derby.impl.jdbc.EmbedResultSet.next(Unknown Source) 
        at com.jefco.processors.DataProcessor.process(DataProcessor.java:189) 
        at java.lang.Thread.run(Thread.java:619) 
Caused by: java.sql.SQLException: The exception 'java.lang.NullPointerException' was thrown
while evaluating an expression. 
        at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)

        at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown
Source) 
        ... 13 more 
Caused by: java.sql.SQLException: Java exception: ': java.lang.NullPointerException'. 
        at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)

        at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown
Source) 
        at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source)

        at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source) 
        at org.apache.derby.impl.jdbc.Util.javaException(Unknown Source) 
        at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown Source)

        ... 10 more 
Caused by: java.lang.NullPointerException 
        at org.apache.derby.exe.ac96c5c136x012ex0b13x5d52xffff9ccc25960.e9(Unknown Source)

        at org.apache.derby.impl.services.reflect.DirectCall.invoke(Unknown Source) 
        at org.apache.derby.impl.sql.execute.ProjectRestrictResultSet.doProjection(Unknown
Source) 
        at org.apache.derby.impl.sql.execute.ProjectRestrictResultSet.getNextRowCore(Unknown
Source) 
        at org.apache.derby.impl.sql.execute.ScrollInsensitiveResultSet.getNextRowFromSource(Unknown
Source) 
        at org.apache.derby.impl.sql.execute.ScrollInsensitiveResultSet.getNextRowCore(Unknown
Source) 
        at org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl.getNextRow(Unknown Source)

        ... 5 more 

Interestingly, as soon as the query was reworked to remove group by clause, the code worked
flawlessly. 


-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message