[
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.