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 "Steve Ebersole (JIRA)" <ji...@apache.org> on 2008/02/25 22:42:51 UTC

[jira] Created: (DERBY-3464) NPE is seemingly simple query

NPE is seemingly simple query
-----------------------------

                 Key: DERBY-3464
                 URL: https://issues.apache.org/jira/browse/DERBY-3464
             Project: Derby
          Issue Type: Bug
    Affects Versions: 10.3.1.4
            Reporter: Steve Ebersole


Not sure if this is specifically a regression caused by DERBY-1624, however I noticed this as a regression to our tests in an attempt to verify the fixes for DERBY-1624 with release 10.3.1.4.

The offending query seems very simple and innocuous:

select count(customer0_.ID) as col_0_0_ from CUSTOMER_TABLE customer0_ group by customer0_.code having customer0_.code in ('GBR' , 'CHA')

leading the the following NPE:

2008-02-25 14:55:56,062 DEBUG [org.hibernate.util.JDBCExceptionReporter:69] could not execute query [select count(customer0_.ID) as col_0_0_ from CUSTOMER_TABLE customer0_ group by customer0_.code having customer0_.code in ('GBR' , 'CHA')]
java.sql.SQLException: The exception 'java.lang.NullPointerException' was thrown while evaluating an expression.
       at org.apache.derby.client.am.SQLExceptionFactory.getSQLException(Unknown Source)
       at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source)
       at org.apache.derby.client.am.PreparedStatement.executeQuery(Unknown Source)
       at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeQuery(WrappedPreparedStatement.java:235)
       at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:186)
       at org.hibernate.loader.Loader.getResultSet(Loader.java:1787)
       at org.hibernate.loader.Loader.doQuery(Loader.java:674)
       at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
       at org.hibernate.loader.Loader.doList(Loader.java:2220)
       at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104)
       at org.hibernate.loader.Loader.list(Loader.java:2099)
       at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:378)
       at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:338)
       at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)
       at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121)
       at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
       at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:65)
       at com.sun.ts.tests.ejb30.persistence.query.language.Client.test_groupByHaving(Client.java:5197)
Caused by: org.apache.derby.client.am.SqlException: The exception 'java.lang.NullPointerException' was thrown while evaluating an expression.
       at org.apache.derby.client.am.Statement.completeSqlca(Unknown Source)
       at org.apache.derby.client.net.NetStatementReply.parseOpenQueryError(Unknown Source)
       at org.apache.derby.client.net.NetStatementReply.parseOPNQRYreply(Unknown Source)
       at org.apache.derby.client.net.NetStatementReply.readOpenQuery(Unknown Source)
       at org.apache.derby.client.net.StatementReply.readOpenQuery(Unknown Source)
       at org.apache.derby.client.net.NetStatement.readOpenQuery_(Unknown Source)
       at org.apache.derby.client.am.Statement.readOpenQuery(Unknown Source)
       at org.apache.derby.client.am.PreparedStatement.flowExecute(Unknown Source)
       at org.apache.derby.client.am.PreparedStatement.executeQueryX(Unknown Source)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DERBY-3464) NPE is seemingly simple query

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-3464?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12593748#action_12593748 ] 

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

The Subversion repository is down, so I can't verify it, but I would guess that it was fixed in DERBY-3253.

> NPE is seemingly simple query
> -----------------------------
>
>                 Key: DERBY-3464
>                 URL: https://issues.apache.org/jira/browse/DERBY-3464
>             Project: Derby
>          Issue Type: Bug
>    Affects Versions: 10.3.1.4
>            Reporter: Steve Ebersole
>
> Not sure if this is specifically a regression caused by DERBY-1624, however I noticed this as a regression to our tests in an attempt to verify the fixes for DERBY-1624 with release 10.3.1.4.
> The offending query seems very simple and innocuous:
> select count(customer0_.ID) as col_0_0_ from CUSTOMER_TABLE customer0_ group by customer0_.code having customer0_.code in ('GBR' , 'CHA')
> leading the the following NPE:
> 2008-02-25 14:55:56,062 DEBUG [org.hibernate.util.JDBCExceptionReporter:69] could not execute query [select count(customer0_.ID) as col_0_0_ from CUSTOMER_TABLE customer0_ group by customer0_.code having customer0_.code in ('GBR' , 'CHA')]
> java.sql.SQLException: The exception 'java.lang.NullPointerException' was thrown while evaluating an expression.
>        at org.apache.derby.client.am.SQLExceptionFactory.getSQLException(Unknown Source)
>        at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source)
>        at org.apache.derby.client.am.PreparedStatement.executeQuery(Unknown Source)
>        at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeQuery(WrappedPreparedStatement.java:235)
>        at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:186)
>        at org.hibernate.loader.Loader.getResultSet(Loader.java:1787)
>        at org.hibernate.loader.Loader.doQuery(Loader.java:674)
>        at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
>        at org.hibernate.loader.Loader.doList(Loader.java:2220)
>        at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104)
>        at org.hibernate.loader.Loader.list(Loader.java:2099)
>        at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:378)
>        at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:338)
>        at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)
>        at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121)
>        at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
>        at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:65)
>        at com.sun.ts.tests.ejb30.persistence.query.language.Client.test_groupByHaving(Client.java:5197)
> Caused by: org.apache.derby.client.am.SqlException: The exception 'java.lang.NullPointerException' was thrown while evaluating an expression.
>        at org.apache.derby.client.am.Statement.completeSqlca(Unknown Source)
>        at org.apache.derby.client.net.NetStatementReply.parseOpenQueryError(Unknown Source)
>        at org.apache.derby.client.net.NetStatementReply.parseOPNQRYreply(Unknown Source)
>        at org.apache.derby.client.net.NetStatementReply.readOpenQuery(Unknown Source)
>        at org.apache.derby.client.net.StatementReply.readOpenQuery(Unknown Source)
>        at org.apache.derby.client.net.NetStatement.readOpenQuery_(Unknown Source)
>        at org.apache.derby.client.am.Statement.readOpenQuery(Unknown Source)
>        at org.apache.derby.client.am.PreparedStatement.flowExecute(Unknown Source)
>        at org.apache.derby.client.am.PreparedStatement.executeQueryX(Unknown Source)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DERBY-3464) NPE is seemingly simple query

Posted by "Dag H. Wanvik (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-3464?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12594223#action_12594223 ] 

Dag H. Wanvik commented on DERBY-3464:
--------------------------------------

Knut Anders> The Subversion repository is down, so I can't verify it,
Knut Anders> but I would guess that it was fixed in DERBY-3253.

Verified that Kathey's script error is fixed on 10.3 by svn 606277 (DERBY-3253).
You OK with closing issue this, Shelly?



> NPE is seemingly simple query
> -----------------------------
>
>                 Key: DERBY-3464
>                 URL: https://issues.apache.org/jira/browse/DERBY-3464
>             Project: Derby
>          Issue Type: Bug
>    Affects Versions: 10.3.1.4
>            Reporter: Steve Ebersole
>
> Not sure if this is specifically a regression caused by DERBY-1624, however I noticed this as a regression to our tests in an attempt to verify the fixes for DERBY-1624 with release 10.3.1.4.
> The offending query seems very simple and innocuous:
> select count(customer0_.ID) as col_0_0_ from CUSTOMER_TABLE customer0_ group by customer0_.code having customer0_.code in ('GBR' , 'CHA')
> leading the the following NPE:
> 2008-02-25 14:55:56,062 DEBUG [org.hibernate.util.JDBCExceptionReporter:69] could not execute query [select count(customer0_.ID) as col_0_0_ from CUSTOMER_TABLE customer0_ group by customer0_.code having customer0_.code in ('GBR' , 'CHA')]
> java.sql.SQLException: The exception 'java.lang.NullPointerException' was thrown while evaluating an expression.
>        at org.apache.derby.client.am.SQLExceptionFactory.getSQLException(Unknown Source)
>        at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source)
>        at org.apache.derby.client.am.PreparedStatement.executeQuery(Unknown Source)
>        at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeQuery(WrappedPreparedStatement.java:235)
>        at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:186)
>        at org.hibernate.loader.Loader.getResultSet(Loader.java:1787)
>        at org.hibernate.loader.Loader.doQuery(Loader.java:674)
>        at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
>        at org.hibernate.loader.Loader.doList(Loader.java:2220)
>        at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104)
>        at org.hibernate.loader.Loader.list(Loader.java:2099)
>        at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:378)
>        at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:338)
>        at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)
>        at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121)
>        at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
>        at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:65)
>        at com.sun.ts.tests.ejb30.persistence.query.language.Client.test_groupByHaving(Client.java:5197)
> Caused by: org.apache.derby.client.am.SqlException: The exception 'java.lang.NullPointerException' was thrown while evaluating an expression.
>        at org.apache.derby.client.am.Statement.completeSqlca(Unknown Source)
>        at org.apache.derby.client.net.NetStatementReply.parseOpenQueryError(Unknown Source)
>        at org.apache.derby.client.net.NetStatementReply.parseOPNQRYreply(Unknown Source)
>        at org.apache.derby.client.net.NetStatementReply.readOpenQuery(Unknown Source)
>        at org.apache.derby.client.net.StatementReply.readOpenQuery(Unknown Source)
>        at org.apache.derby.client.net.NetStatement.readOpenQuery_(Unknown Source)
>        at org.apache.derby.client.am.Statement.readOpenQuery(Unknown Source)
>        at org.apache.derby.client.am.PreparedStatement.flowExecute(Unknown Source)
>        at org.apache.derby.client.am.PreparedStatement.executeQueryX(Unknown Source)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DERBY-3464) NPE is seemingly simple query

Posted by "Shelly McGowan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-3464?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12593556#action_12593556 ] 

Shelly McGowan commented on DERBY-3464:
---------------------------------------

This is fixed in 10.4 but would be interesting to know the "duplicate" or related issue to the resolution as Kathey notes above.

> NPE is seemingly simple query
> -----------------------------
>
>                 Key: DERBY-3464
>                 URL: https://issues.apache.org/jira/browse/DERBY-3464
>             Project: Derby
>          Issue Type: Bug
>    Affects Versions: 10.3.1.4
>            Reporter: Steve Ebersole
>
> Not sure if this is specifically a regression caused by DERBY-1624, however I noticed this as a regression to our tests in an attempt to verify the fixes for DERBY-1624 with release 10.3.1.4.
> The offending query seems very simple and innocuous:
> select count(customer0_.ID) as col_0_0_ from CUSTOMER_TABLE customer0_ group by customer0_.code having customer0_.code in ('GBR' , 'CHA')
> leading the the following NPE:
> 2008-02-25 14:55:56,062 DEBUG [org.hibernate.util.JDBCExceptionReporter:69] could not execute query [select count(customer0_.ID) as col_0_0_ from CUSTOMER_TABLE customer0_ group by customer0_.code having customer0_.code in ('GBR' , 'CHA')]
> java.sql.SQLException: The exception 'java.lang.NullPointerException' was thrown while evaluating an expression.
>        at org.apache.derby.client.am.SQLExceptionFactory.getSQLException(Unknown Source)
>        at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source)
>        at org.apache.derby.client.am.PreparedStatement.executeQuery(Unknown Source)
>        at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeQuery(WrappedPreparedStatement.java:235)
>        at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:186)
>        at org.hibernate.loader.Loader.getResultSet(Loader.java:1787)
>        at org.hibernate.loader.Loader.doQuery(Loader.java:674)
>        at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
>        at org.hibernate.loader.Loader.doList(Loader.java:2220)
>        at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104)
>        at org.hibernate.loader.Loader.list(Loader.java:2099)
>        at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:378)
>        at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:338)
>        at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)
>        at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121)
>        at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
>        at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:65)
>        at com.sun.ts.tests.ejb30.persistence.query.language.Client.test_groupByHaving(Client.java:5197)
> Caused by: org.apache.derby.client.am.SqlException: The exception 'java.lang.NullPointerException' was thrown while evaluating an expression.
>        at org.apache.derby.client.am.Statement.completeSqlca(Unknown Source)
>        at org.apache.derby.client.net.NetStatementReply.parseOpenQueryError(Unknown Source)
>        at org.apache.derby.client.net.NetStatementReply.parseOPNQRYreply(Unknown Source)
>        at org.apache.derby.client.net.NetStatementReply.readOpenQuery(Unknown Source)
>        at org.apache.derby.client.net.StatementReply.readOpenQuery(Unknown Source)
>        at org.apache.derby.client.net.NetStatement.readOpenQuery_(Unknown Source)
>        at org.apache.derby.client.am.Statement.readOpenQuery(Unknown Source)
>        at org.apache.derby.client.am.PreparedStatement.flowExecute(Unknown Source)
>        at org.apache.derby.client.am.PreparedStatement.executeQueryX(Unknown Source)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DERBY-3464) NPE is seemingly simple query

Posted by "Shelly McGowan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-3464?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12603882#action_12603882 ] 

Shelly McGowan commented on DERBY-3464:
---------------------------------------

I'll verify against 10.3 and update.

> NPE is seemingly simple query
> -----------------------------
>
>                 Key: DERBY-3464
>                 URL: https://issues.apache.org/jira/browse/DERBY-3464
>             Project: Derby
>          Issue Type: Bug
>    Affects Versions: 10.3.1.4
>            Reporter: Steve Ebersole
>
> Not sure if this is specifically a regression caused by DERBY-1624, however I noticed this as a regression to our tests in an attempt to verify the fixes for DERBY-1624 with release 10.3.1.4.
> The offending query seems very simple and innocuous:
> select count(customer0_.ID) as col_0_0_ from CUSTOMER_TABLE customer0_ group by customer0_.code having customer0_.code in ('GBR' , 'CHA')
> leading the the following NPE:
> 2008-02-25 14:55:56,062 DEBUG [org.hibernate.util.JDBCExceptionReporter:69] could not execute query [select count(customer0_.ID) as col_0_0_ from CUSTOMER_TABLE customer0_ group by customer0_.code having customer0_.code in ('GBR' , 'CHA')]
> java.sql.SQLException: The exception 'java.lang.NullPointerException' was thrown while evaluating an expression.
>        at org.apache.derby.client.am.SQLExceptionFactory.getSQLException(Unknown Source)
>        at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source)
>        at org.apache.derby.client.am.PreparedStatement.executeQuery(Unknown Source)
>        at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeQuery(WrappedPreparedStatement.java:235)
>        at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:186)
>        at org.hibernate.loader.Loader.getResultSet(Loader.java:1787)
>        at org.hibernate.loader.Loader.doQuery(Loader.java:674)
>        at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
>        at org.hibernate.loader.Loader.doList(Loader.java:2220)
>        at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104)
>        at org.hibernate.loader.Loader.list(Loader.java:2099)
>        at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:378)
>        at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:338)
>        at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)
>        at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121)
>        at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
>        at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:65)
>        at com.sun.ts.tests.ejb30.persistence.query.language.Client.test_groupByHaving(Client.java:5197)
> Caused by: org.apache.derby.client.am.SqlException: The exception 'java.lang.NullPointerException' was thrown while evaluating an expression.
>        at org.apache.derby.client.am.Statement.completeSqlca(Unknown Source)
>        at org.apache.derby.client.net.NetStatementReply.parseOpenQueryError(Unknown Source)
>        at org.apache.derby.client.net.NetStatementReply.parseOPNQRYreply(Unknown Source)
>        at org.apache.derby.client.net.NetStatementReply.readOpenQuery(Unknown Source)
>        at org.apache.derby.client.net.StatementReply.readOpenQuery(Unknown Source)
>        at org.apache.derby.client.net.NetStatement.readOpenQuery_(Unknown Source)
>        at org.apache.derby.client.am.Statement.readOpenQuery(Unknown Source)
>        at org.apache.derby.client.am.PreparedStatement.flowExecute(Unknown Source)
>        at org.apache.derby.client.am.PreparedStatement.executeQueryX(Unknown Source)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DERBY-3464) NPE is seemingly simple query

Posted by "Kathey Marsden (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-3464?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12572275#action_12572275 ] 

Kathey Marsden commented on DERBY-3464:
---------------------------------------

I see the NPE with 10.3.2.1 with this script:
connect 'jdbc:derby:wombat;create=true';
drop table customer_table;
 
CREATE TABLE CUSTOMER_TABLE ( ID VARCHAR(255)   PRIMARY KEY NOT NULL, NAME VARCHAR(255) , CODE VARCHAR(255));
insert into CUSTOMER_TABLE VALUES('1234','Customer 1', 'GBR');
insert into CUSTOMER_TABLE VALUES('1235','Customer 2', 'CHA');

select count(customer0_.ID) as col_0_0_ from CUSTOMER_TABLE customer0_ group by customer0_.code having customer0_.code in ('GBR' , 'CHA') ;

but I do not see it with the latest on the 10.3 branch. I'm not sure what fixed it. I'll backtrack and see.


> NPE is seemingly simple query
> -----------------------------
>
>                 Key: DERBY-3464
>                 URL: https://issues.apache.org/jira/browse/DERBY-3464
>             Project: Derby
>          Issue Type: Bug
>    Affects Versions: 10.3.1.4
>            Reporter: Steve Ebersole
>
> Not sure if this is specifically a regression caused by DERBY-1624, however I noticed this as a regression to our tests in an attempt to verify the fixes for DERBY-1624 with release 10.3.1.4.
> The offending query seems very simple and innocuous:
> select count(customer0_.ID) as col_0_0_ from CUSTOMER_TABLE customer0_ group by customer0_.code having customer0_.code in ('GBR' , 'CHA')
> leading the the following NPE:
> 2008-02-25 14:55:56,062 DEBUG [org.hibernate.util.JDBCExceptionReporter:69] could not execute query [select count(customer0_.ID) as col_0_0_ from CUSTOMER_TABLE customer0_ group by customer0_.code having customer0_.code in ('GBR' , 'CHA')]
> java.sql.SQLException: The exception 'java.lang.NullPointerException' was thrown while evaluating an expression.
>        at org.apache.derby.client.am.SQLExceptionFactory.getSQLException(Unknown Source)
>        at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source)
>        at org.apache.derby.client.am.PreparedStatement.executeQuery(Unknown Source)
>        at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeQuery(WrappedPreparedStatement.java:235)
>        at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:186)
>        at org.hibernate.loader.Loader.getResultSet(Loader.java:1787)
>        at org.hibernate.loader.Loader.doQuery(Loader.java:674)
>        at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
>        at org.hibernate.loader.Loader.doList(Loader.java:2220)
>        at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104)
>        at org.hibernate.loader.Loader.list(Loader.java:2099)
>        at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:378)
>        at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:338)
>        at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)
>        at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121)
>        at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
>        at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:65)
>        at com.sun.ts.tests.ejb30.persistence.query.language.Client.test_groupByHaving(Client.java:5197)
> Caused by: org.apache.derby.client.am.SqlException: The exception 'java.lang.NullPointerException' was thrown while evaluating an expression.
>        at org.apache.derby.client.am.Statement.completeSqlca(Unknown Source)
>        at org.apache.derby.client.net.NetStatementReply.parseOpenQueryError(Unknown Source)
>        at org.apache.derby.client.net.NetStatementReply.parseOPNQRYreply(Unknown Source)
>        at org.apache.derby.client.net.NetStatementReply.readOpenQuery(Unknown Source)
>        at org.apache.derby.client.net.StatementReply.readOpenQuery(Unknown Source)
>        at org.apache.derby.client.net.NetStatement.readOpenQuery_(Unknown Source)
>        at org.apache.derby.client.am.Statement.readOpenQuery(Unknown Source)
>        at org.apache.derby.client.am.PreparedStatement.flowExecute(Unknown Source)
>        at org.apache.derby.client.am.PreparedStatement.executeQueryX(Unknown Source)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (DERBY-3464) NPE is seemingly simple query

Posted by "Kathey Marsden (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-3464?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kathey Marsden closed DERBY-3464.
---------------------------------

    Resolution: Duplicate

Duplicate DERBY-3253

> NPE is seemingly simple query
> -----------------------------
>
>                 Key: DERBY-3464
>                 URL: https://issues.apache.org/jira/browse/DERBY-3464
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Client
>    Affects Versions: 10.3.1.4
>            Reporter: Steve Ebersole
>
> Not sure if this is specifically a regression caused by DERBY-1624, however I noticed this as a regression to our tests in an attempt to verify the fixes for DERBY-1624 with release 10.3.1.4.
> The offending query seems very simple and innocuous:
> select count(customer0_.ID) as col_0_0_ from CUSTOMER_TABLE customer0_ group by customer0_.code having customer0_.code in ('GBR' , 'CHA')
> leading the the following NPE:
> 2008-02-25 14:55:56,062 DEBUG [org.hibernate.util.JDBCExceptionReporter:69] could not execute query [select count(customer0_.ID) as col_0_0_ from CUSTOMER_TABLE customer0_ group by customer0_.code having customer0_.code in ('GBR' , 'CHA')]
> java.sql.SQLException: The exception 'java.lang.NullPointerException' was thrown while evaluating an expression.
>        at org.apache.derby.client.am.SQLExceptionFactory.getSQLException(Unknown Source)
>        at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source)
>        at org.apache.derby.client.am.PreparedStatement.executeQuery(Unknown Source)
>        at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeQuery(WrappedPreparedStatement.java:235)
>        at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:186)
>        at org.hibernate.loader.Loader.getResultSet(Loader.java:1787)
>        at org.hibernate.loader.Loader.doQuery(Loader.java:674)
>        at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
>        at org.hibernate.loader.Loader.doList(Loader.java:2220)
>        at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104)
>        at org.hibernate.loader.Loader.list(Loader.java:2099)
>        at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:378)
>        at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:338)
>        at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)
>        at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121)
>        at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
>        at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:65)
>        at com.sun.ts.tests.ejb30.persistence.query.language.Client.test_groupByHaving(Client.java:5197)
> Caused by: org.apache.derby.client.am.SqlException: The exception 'java.lang.NullPointerException' was thrown while evaluating an expression.
>        at org.apache.derby.client.am.Statement.completeSqlca(Unknown Source)
>        at org.apache.derby.client.net.NetStatementReply.parseOpenQueryError(Unknown Source)
>        at org.apache.derby.client.net.NetStatementReply.parseOPNQRYreply(Unknown Source)
>        at org.apache.derby.client.net.NetStatementReply.readOpenQuery(Unknown Source)
>        at org.apache.derby.client.net.StatementReply.readOpenQuery(Unknown Source)
>        at org.apache.derby.client.net.NetStatement.readOpenQuery_(Unknown Source)
>        at org.apache.derby.client.am.Statement.readOpenQuery(Unknown Source)
>        at org.apache.derby.client.am.PreparedStatement.flowExecute(Unknown Source)
>        at org.apache.derby.client.am.PreparedStatement.executeQueryX(Unknown Source)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DERBY-3464) NPE is seemingly simple query

Posted by "Shelly McGowan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-3464?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12572564#action_12572564 ] 

Shelly McGowan commented on DERBY-3464:
---------------------------------------

Building the latest trunk, Apache Derby Network Server - 10.4.0.0 alpha - (631277), the query no longer fails which is consistent with your results above.
Hibernate: select count(customer0_.ID) as col_0_0_ from CUSTOMER_TABLE customer0_ group by customer0_.code having customer0_.code in ('GBR' , 'CHA')
Check result received . . .
Check result received . . .
Expected results received.
STATUS:Passed.


> NPE is seemingly simple query
> -----------------------------
>
>                 Key: DERBY-3464
>                 URL: https://issues.apache.org/jira/browse/DERBY-3464
>             Project: Derby
>          Issue Type: Bug
>    Affects Versions: 10.3.1.4
>            Reporter: Steve Ebersole
>
> Not sure if this is specifically a regression caused by DERBY-1624, however I noticed this as a regression to our tests in an attempt to verify the fixes for DERBY-1624 with release 10.3.1.4.
> The offending query seems very simple and innocuous:
> select count(customer0_.ID) as col_0_0_ from CUSTOMER_TABLE customer0_ group by customer0_.code having customer0_.code in ('GBR' , 'CHA')
> leading the the following NPE:
> 2008-02-25 14:55:56,062 DEBUG [org.hibernate.util.JDBCExceptionReporter:69] could not execute query [select count(customer0_.ID) as col_0_0_ from CUSTOMER_TABLE customer0_ group by customer0_.code having customer0_.code in ('GBR' , 'CHA')]
> java.sql.SQLException: The exception 'java.lang.NullPointerException' was thrown while evaluating an expression.
>        at org.apache.derby.client.am.SQLExceptionFactory.getSQLException(Unknown Source)
>        at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source)
>        at org.apache.derby.client.am.PreparedStatement.executeQuery(Unknown Source)
>        at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeQuery(WrappedPreparedStatement.java:235)
>        at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:186)
>        at org.hibernate.loader.Loader.getResultSet(Loader.java:1787)
>        at org.hibernate.loader.Loader.doQuery(Loader.java:674)
>        at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
>        at org.hibernate.loader.Loader.doList(Loader.java:2220)
>        at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104)
>        at org.hibernate.loader.Loader.list(Loader.java:2099)
>        at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:378)
>        at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:338)
>        at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)
>        at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121)
>        at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
>        at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:65)
>        at com.sun.ts.tests.ejb30.persistence.query.language.Client.test_groupByHaving(Client.java:5197)
> Caused by: org.apache.derby.client.am.SqlException: The exception 'java.lang.NullPointerException' was thrown while evaluating an expression.
>        at org.apache.derby.client.am.Statement.completeSqlca(Unknown Source)
>        at org.apache.derby.client.net.NetStatementReply.parseOpenQueryError(Unknown Source)
>        at org.apache.derby.client.net.NetStatementReply.parseOPNQRYreply(Unknown Source)
>        at org.apache.derby.client.net.NetStatementReply.readOpenQuery(Unknown Source)
>        at org.apache.derby.client.net.StatementReply.readOpenQuery(Unknown Source)
>        at org.apache.derby.client.net.NetStatement.readOpenQuery_(Unknown Source)
>        at org.apache.derby.client.am.Statement.readOpenQuery(Unknown Source)
>        at org.apache.derby.client.am.PreparedStatement.flowExecute(Unknown Source)
>        at org.apache.derby.client.am.PreparedStatement.executeQueryX(Unknown Source)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DERBY-3464) NPE is seemingly simple query

Posted by "Myrna van Lunteren (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-3464?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12593440#action_12593440 ] 

Myrna van Lunteren commented on DERBY-3464:
-------------------------------------------

So, this should get closed as fixed in 10.4, or maybe a duplicate?

> NPE is seemingly simple query
> -----------------------------
>
>                 Key: DERBY-3464
>                 URL: https://issues.apache.org/jira/browse/DERBY-3464
>             Project: Derby
>          Issue Type: Bug
>    Affects Versions: 10.3.1.4
>            Reporter: Steve Ebersole
>
> Not sure if this is specifically a regression caused by DERBY-1624, however I noticed this as a regression to our tests in an attempt to verify the fixes for DERBY-1624 with release 10.3.1.4.
> The offending query seems very simple and innocuous:
> select count(customer0_.ID) as col_0_0_ from CUSTOMER_TABLE customer0_ group by customer0_.code having customer0_.code in ('GBR' , 'CHA')
> leading the the following NPE:
> 2008-02-25 14:55:56,062 DEBUG [org.hibernate.util.JDBCExceptionReporter:69] could not execute query [select count(customer0_.ID) as col_0_0_ from CUSTOMER_TABLE customer0_ group by customer0_.code having customer0_.code in ('GBR' , 'CHA')]
> java.sql.SQLException: The exception 'java.lang.NullPointerException' was thrown while evaluating an expression.
>        at org.apache.derby.client.am.SQLExceptionFactory.getSQLException(Unknown Source)
>        at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source)
>        at org.apache.derby.client.am.PreparedStatement.executeQuery(Unknown Source)
>        at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeQuery(WrappedPreparedStatement.java:235)
>        at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:186)
>        at org.hibernate.loader.Loader.getResultSet(Loader.java:1787)
>        at org.hibernate.loader.Loader.doQuery(Loader.java:674)
>        at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
>        at org.hibernate.loader.Loader.doList(Loader.java:2220)
>        at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104)
>        at org.hibernate.loader.Loader.list(Loader.java:2099)
>        at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:378)
>        at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:338)
>        at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)
>        at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121)
>        at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
>        at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:65)
>        at com.sun.ts.tests.ejb30.persistence.query.language.Client.test_groupByHaving(Client.java:5197)
> Caused by: org.apache.derby.client.am.SqlException: The exception 'java.lang.NullPointerException' was thrown while evaluating an expression.
>        at org.apache.derby.client.am.Statement.completeSqlca(Unknown Source)
>        at org.apache.derby.client.net.NetStatementReply.parseOpenQueryError(Unknown Source)
>        at org.apache.derby.client.net.NetStatementReply.parseOPNQRYreply(Unknown Source)
>        at org.apache.derby.client.net.NetStatementReply.readOpenQuery(Unknown Source)
>        at org.apache.derby.client.net.StatementReply.readOpenQuery(Unknown Source)
>        at org.apache.derby.client.net.NetStatement.readOpenQuery_(Unknown Source)
>        at org.apache.derby.client.am.Statement.readOpenQuery(Unknown Source)
>        at org.apache.derby.client.am.PreparedStatement.flowExecute(Unknown Source)
>        at org.apache.derby.client.am.PreparedStatement.executeQueryX(Unknown Source)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (DERBY-3464) NPE is seemingly simple query

Posted by "Kathey Marsden (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-3464?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kathey Marsden updated DERBY-3464:
----------------------------------

    Component/s: Network Client

I wonder if we can go ahead and close this out as a dup?   Unless I hear back. I will close it Monday.


> NPE is seemingly simple query
> -----------------------------
>
>                 Key: DERBY-3464
>                 URL: https://issues.apache.org/jira/browse/DERBY-3464
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Client
>    Affects Versions: 10.3.1.4
>            Reporter: Steve Ebersole
>
> Not sure if this is specifically a regression caused by DERBY-1624, however I noticed this as a regression to our tests in an attempt to verify the fixes for DERBY-1624 with release 10.3.1.4.
> The offending query seems very simple and innocuous:
> select count(customer0_.ID) as col_0_0_ from CUSTOMER_TABLE customer0_ group by customer0_.code having customer0_.code in ('GBR' , 'CHA')
> leading the the following NPE:
> 2008-02-25 14:55:56,062 DEBUG [org.hibernate.util.JDBCExceptionReporter:69] could not execute query [select count(customer0_.ID) as col_0_0_ from CUSTOMER_TABLE customer0_ group by customer0_.code having customer0_.code in ('GBR' , 'CHA')]
> java.sql.SQLException: The exception 'java.lang.NullPointerException' was thrown while evaluating an expression.
>        at org.apache.derby.client.am.SQLExceptionFactory.getSQLException(Unknown Source)
>        at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source)
>        at org.apache.derby.client.am.PreparedStatement.executeQuery(Unknown Source)
>        at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeQuery(WrappedPreparedStatement.java:235)
>        at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:186)
>        at org.hibernate.loader.Loader.getResultSet(Loader.java:1787)
>        at org.hibernate.loader.Loader.doQuery(Loader.java:674)
>        at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
>        at org.hibernate.loader.Loader.doList(Loader.java:2220)
>        at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104)
>        at org.hibernate.loader.Loader.list(Loader.java:2099)
>        at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:378)
>        at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:338)
>        at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)
>        at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121)
>        at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
>        at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:65)
>        at com.sun.ts.tests.ejb30.persistence.query.language.Client.test_groupByHaving(Client.java:5197)
> Caused by: org.apache.derby.client.am.SqlException: The exception 'java.lang.NullPointerException' was thrown while evaluating an expression.
>        at org.apache.derby.client.am.Statement.completeSqlca(Unknown Source)
>        at org.apache.derby.client.net.NetStatementReply.parseOpenQueryError(Unknown Source)
>        at org.apache.derby.client.net.NetStatementReply.parseOPNQRYreply(Unknown Source)
>        at org.apache.derby.client.net.NetStatementReply.readOpenQuery(Unknown Source)
>        at org.apache.derby.client.net.StatementReply.readOpenQuery(Unknown Source)
>        at org.apache.derby.client.net.NetStatement.readOpenQuery_(Unknown Source)
>        at org.apache.derby.client.am.Statement.readOpenQuery(Unknown Source)
>        at org.apache.derby.client.am.PreparedStatement.flowExecute(Unknown Source)
>        at org.apache.derby.client.am.PreparedStatement.executeQueryX(Unknown Source)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DERBY-3464) NPE is seemingly simple query

Posted by "Shelly McGowan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-3464?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12617660#action_12617660 ] 

Shelly McGowan commented on DERBY-3464:
---------------------------------------

Kathey, I have verified this is resolved with 10.3 and 10.4.

> NPE is seemingly simple query
> -----------------------------
>
>                 Key: DERBY-3464
>                 URL: https://issues.apache.org/jira/browse/DERBY-3464
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Client
>    Affects Versions: 10.3.1.4
>            Reporter: Steve Ebersole
>
> Not sure if this is specifically a regression caused by DERBY-1624, however I noticed this as a regression to our tests in an attempt to verify the fixes for DERBY-1624 with release 10.3.1.4.
> The offending query seems very simple and innocuous:
> select count(customer0_.ID) as col_0_0_ from CUSTOMER_TABLE customer0_ group by customer0_.code having customer0_.code in ('GBR' , 'CHA')
> leading the the following NPE:
> 2008-02-25 14:55:56,062 DEBUG [org.hibernate.util.JDBCExceptionReporter:69] could not execute query [select count(customer0_.ID) as col_0_0_ from CUSTOMER_TABLE customer0_ group by customer0_.code having customer0_.code in ('GBR' , 'CHA')]
> java.sql.SQLException: The exception 'java.lang.NullPointerException' was thrown while evaluating an expression.
>        at org.apache.derby.client.am.SQLExceptionFactory.getSQLException(Unknown Source)
>        at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source)
>        at org.apache.derby.client.am.PreparedStatement.executeQuery(Unknown Source)
>        at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeQuery(WrappedPreparedStatement.java:235)
>        at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:186)
>        at org.hibernate.loader.Loader.getResultSet(Loader.java:1787)
>        at org.hibernate.loader.Loader.doQuery(Loader.java:674)
>        at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
>        at org.hibernate.loader.Loader.doList(Loader.java:2220)
>        at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104)
>        at org.hibernate.loader.Loader.list(Loader.java:2099)
>        at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:378)
>        at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:338)
>        at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)
>        at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121)
>        at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
>        at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:65)
>        at com.sun.ts.tests.ejb30.persistence.query.language.Client.test_groupByHaving(Client.java:5197)
> Caused by: org.apache.derby.client.am.SqlException: The exception 'java.lang.NullPointerException' was thrown while evaluating an expression.
>        at org.apache.derby.client.am.Statement.completeSqlca(Unknown Source)
>        at org.apache.derby.client.net.NetStatementReply.parseOpenQueryError(Unknown Source)
>        at org.apache.derby.client.net.NetStatementReply.parseOPNQRYreply(Unknown Source)
>        at org.apache.derby.client.net.NetStatementReply.readOpenQuery(Unknown Source)
>        at org.apache.derby.client.net.StatementReply.readOpenQuery(Unknown Source)
>        at org.apache.derby.client.net.NetStatement.readOpenQuery_(Unknown Source)
>        at org.apache.derby.client.am.Statement.readOpenQuery(Unknown Source)
>        at org.apache.derby.client.am.PreparedStatement.flowExecute(Unknown Source)
>        at org.apache.derby.client.am.PreparedStatement.executeQueryX(Unknown Source)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DERBY-3464) NPE is seemingly simple query

Posted by "A B (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-3464?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12572272#action_12572272 ] 

A B commented on DERBY-3464:
----------------------------

Hi Steve, thanks for the filing this issue.  The stack trace that you posted seems like it may not be complete--esp. the underlying cause of the error does not appear in the trace (from what I can tell).  Is there more to the trace that you have not posted?  Or if possible, do you have a "derby.log" file which contains any errors in it?

Do you have a simple reproduction case for this issue?  I looked at the query above and was able to generate an NPE against 10.3.1.4 with the following:

  connect 'testdb;create=true';
  create table t1 (i int, c char(3));
  insert into t1 values (1, 'ONE'), (2, 'TWO'), (3, 'CHA');
  select count(a.i) as col0_0_ from t1 a group by a.c having a.c in ('GBR', 'CHA');

If you run those simple statements do you see an NPE, and if so, does it look like the same problem you are seeing?  Without having any further information, I'm wondering if you are seeing DERBY-3253, which was also filed against 10.3.1.4 but has since been fixed in the 10.3 codeline.  At least, the above example query, which fails with 10.3.1.4, now runs without error on the latest 10.3 branch.

Is it possible for you to build a set of jars from the 10.3 codeline and see if your query still fails?

> NPE is seemingly simple query
> -----------------------------
>
>                 Key: DERBY-3464
>                 URL: https://issues.apache.org/jira/browse/DERBY-3464
>             Project: Derby
>          Issue Type: Bug
>    Affects Versions: 10.3.1.4
>            Reporter: Steve Ebersole
>
> Not sure if this is specifically a regression caused by DERBY-1624, however I noticed this as a regression to our tests in an attempt to verify the fixes for DERBY-1624 with release 10.3.1.4.
> The offending query seems very simple and innocuous:
> select count(customer0_.ID) as col_0_0_ from CUSTOMER_TABLE customer0_ group by customer0_.code having customer0_.code in ('GBR' , 'CHA')
> leading the the following NPE:
> 2008-02-25 14:55:56,062 DEBUG [org.hibernate.util.JDBCExceptionReporter:69] could not execute query [select count(customer0_.ID) as col_0_0_ from CUSTOMER_TABLE customer0_ group by customer0_.code having customer0_.code in ('GBR' , 'CHA')]
> java.sql.SQLException: The exception 'java.lang.NullPointerException' was thrown while evaluating an expression.
>        at org.apache.derby.client.am.SQLExceptionFactory.getSQLException(Unknown Source)
>        at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source)
>        at org.apache.derby.client.am.PreparedStatement.executeQuery(Unknown Source)
>        at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeQuery(WrappedPreparedStatement.java:235)
>        at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:186)
>        at org.hibernate.loader.Loader.getResultSet(Loader.java:1787)
>        at org.hibernate.loader.Loader.doQuery(Loader.java:674)
>        at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
>        at org.hibernate.loader.Loader.doList(Loader.java:2220)
>        at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104)
>        at org.hibernate.loader.Loader.list(Loader.java:2099)
>        at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:378)
>        at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:338)
>        at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)
>        at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121)
>        at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
>        at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:65)
>        at com.sun.ts.tests.ejb30.persistence.query.language.Client.test_groupByHaving(Client.java:5197)
> Caused by: org.apache.derby.client.am.SqlException: The exception 'java.lang.NullPointerException' was thrown while evaluating an expression.
>        at org.apache.derby.client.am.Statement.completeSqlca(Unknown Source)
>        at org.apache.derby.client.net.NetStatementReply.parseOpenQueryError(Unknown Source)
>        at org.apache.derby.client.net.NetStatementReply.parseOPNQRYreply(Unknown Source)
>        at org.apache.derby.client.net.NetStatementReply.readOpenQuery(Unknown Source)
>        at org.apache.derby.client.net.StatementReply.readOpenQuery(Unknown Source)
>        at org.apache.derby.client.net.NetStatement.readOpenQuery_(Unknown Source)
>        at org.apache.derby.client.am.Statement.readOpenQuery(Unknown Source)
>        at org.apache.derby.client.am.PreparedStatement.flowExecute(Unknown Source)
>        at org.apache.derby.client.am.PreparedStatement.executeQueryX(Unknown Source)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.