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 Robert Enyedi <ro...@intland.com> on 2006/08/28 13:56:53 UTC

NullPointerException in Derby client

Hi,

I receive a NullPointerException in the Derby client when trying to 
execute a prepared statement from iBATIS. This is the stack trace:

org.apache.derby.client.am.SqlException: The exception 
'java.lang.NullPointerException' was thrown while evaluating an 
expression. SQLSTATE: XJ001: Java exception: ': 
java.lang.NullPointerException'.
    at 
org.apache.derby.client.am.Statement.completeSqlca(Statement.java:1371)
    at 
org.apache.derby.client.am.Statement.completeOpenQuery(Statement.java:1042)
    at 
org.apache.derby.client.net.NetStatementReply.parseOpenQueryFailure(NetStatementReply.java:503)
    at 
org.apache.derby.client.net.NetStatementReply.parseOPNQRYreply(NetStatementReply.java:226)
    at 
org.apache.derby.client.net.NetStatementReply.readOpenQuery(NetStatementReply.java:56)
    at 
org.apache.derby.client.net.StatementReply.readOpenQuery(StatementReply.java:49)
    at 
org.apache.derby.client.net.NetStatement.readOpenQuery_(NetStatement.java:151)
    at 
org.apache.derby.client.am.Statement.readOpenQuery(Statement.java:1038)
    at 
org.apache.derby.client.am.PreparedStatement.flowExecute(PreparedStatement.java:1396)
    at 
org.apache.derby.client.am.PreparedStatement.executeX(PreparedStatement.java:893)
    at 
org.apache.derby.client.am.PreparedStatement.execute(PreparedStatement.java:884)
    at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at 
com.ibatis.common.jdbc.logging.PreparedStatementLogProxy.invoke(PreparedStatementLogProxy.java:62)
    at $Proxy1.execute(Unknown Source)
    at 
com.ibatis.sqlmap.engine.execution.SqlExecutor.executeQuery(SqlExecutor.java:180)
    at 
com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.sqlExecuteQuery(GeneralStatement.java:205)
    at 
com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryWithCallback(GeneralStatement.java:173)
    at 
com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryForObject(GeneralStatement.java:104)
    at 
com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForObject(SqlMapExecutorDelegate.java:561)
    at 
com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForObject(SqlMapExecutorDelegate.java:536)
    at 
com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.queryForObject(SqlMapSessionImpl.java:93)
    at 
com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.queryForObject(SqlMapClientImpl.java:70)

The SQL I'm running contains two inner joins, a WHERE and ORDER BY 
clause and two parameters. Both the parameters are in the WHERE clause.

I did a short test with the 10.2.1.1 beta release too, but the error is 
the same.

Any ideas on how I should deal with this internal server error?

Thanks,
Robert

Re: NullPointerException in Derby client

Posted by Craig L Russell <Cr...@Sun.COM>.
On Aug 28, 2006, at 7:17 AM, Daniel John Debrunner wrote:

> Craig L Russell wrote:
>
>> Hi Robert,
>>
>> Please file a bug report in the Derby JIRA. Include the stack trace
>> along with an ij script that creates the tables and a simple jdbc
>> program that issues the query that causes the NPE.
>>
>> Someone on the Derby dev team will follow up.
>
> There is no "Derby team", Derby is an open-source community where  
> anyone
> can get involved and work on improving Derby in many ways including
> fixing bugs.

Of course, Dan has it right. What I meant by "Derby team" is the  
community of Derby contributors and developers who work on Derby. And  
if someone looks into the NPE and contributes a patch, then a Derby  
committer will have to actually apply the patch...

Craig

> People work on what interests them: "fry their own fish" or
> "scratch their own itch". Entering a bug may catch the interest of
> someone already active in the community, but it may not, there is no
> "will" about it. One sure way to get a bug fixed is to work in the
> community on fixing it.
>
> Here's an explanation of how development at Apache works:
>
> http://db.apache.org/derby/derby_comm.html#Understand+How 
> +Development+Works+at+Apache
>
> The community is always ready to welcome new people.
>
> http://wiki.apache.org/db-derby/DerbyDev
>
> Dan.
>
>
>

Craig Russell
Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
408 276-5638 mailto:Craig.Russell@sun.com
P.S. A good JDO? O, Gasp!


Re: NullPointerException in Derby client

Posted by Robert Enyedi <ro...@intland.com>.
I filed the bug report http://issues.apache.org/jira/browse/DERBY-1774 
with detailed information on how to reproduce this right from inside ij.

Any suggestions on how to avoid this bug would be warmly welcome.

Regards,
Robert

Daniel John Debrunner wrote:
> Craig L Russell wrote:
>
>   
>> Hi Robert,
>>
>> Please file a bug report in the Derby JIRA. Include the stack trace 
>> along with an ij script that creates the tables and a simple jdbc 
>> program that issues the query that causes the NPE.
>>
>> Someone on the Derby dev team will follow up.
>>     
>
> There is no "Derby team", Derby is an open-source community where anyone
> can get involved and work on improving Derby in many ways including
> fixing bugs. People work on what interests them: "fry their own fish" or
> "scratch their own itch". Entering a bug may catch the interest of
> someone already active in the community, but it may not, there is no
> "will" about it. One sure way to get a bug fixed is to work in the
> community on fixing it.
>
> Here's an explanation of how development at Apache works:
>
> http://db.apache.org/derby/derby_comm.html#Understand+How+Development+Works+at+Apache
>
> The community is always ready to welcome new people.
>
> http://wiki.apache.org/db-derby/DerbyDev
>
> Dan.
>
>
>
>
>   


Re: NullPointerException in Derby client

Posted by Daniel John Debrunner <dj...@apache.org>.
Craig L Russell wrote:

> Hi Robert,
> 
> Please file a bug report in the Derby JIRA. Include the stack trace 
> along with an ij script that creates the tables and a simple jdbc 
> program that issues the query that causes the NPE.
>
> Someone on the Derby dev team will follow up.

There is no "Derby team", Derby is an open-source community where anyone
can get involved and work on improving Derby in many ways including
fixing bugs. People work on what interests them: "fry their own fish" or
"scratch their own itch". Entering a bug may catch the interest of
someone already active in the community, but it may not, there is no
"will" about it. One sure way to get a bug fixed is to work in the
community on fixing it.

Here's an explanation of how development at Apache works:

http://db.apache.org/derby/derby_comm.html#Understand+How+Development+Works+at+Apache

The community is always ready to welcome new people.

http://wiki.apache.org/db-derby/DerbyDev

Dan.




Re: NullPointerException in Derby client

Posted by Craig L Russell <Cr...@Sun.COM>.
Hi Robert,

Please file a bug report in the Derby JIRA. Include the stack trace  
along with an ij script that creates the tables and a simple jdbc  
program that issues the query that causes the NPE.

Someone on the Derby dev team will follow up.

Thanks,

Craig

On Aug 28, 2006, at 4:56 AM, Robert Enyedi wrote:

> Hi,
>
> I receive a NullPointerException in the Derby client when trying to  
> execute a prepared statement from iBATIS. This is the stack trace:
>
> org.apache.derby.client.am.SqlException: The exception  
> 'java.lang.NullPointerException' was thrown while evaluating an  
> expression. SQLSTATE: XJ001: Java exception: ':  
> java.lang.NullPointerException'.
>    at org.apache.derby.client.am.Statement.completeSqlca 
> (Statement.java:1371)
>    at org.apache.derby.client.am.Statement.completeOpenQuery 
> (Statement.java:1042)
>    at  
> org.apache.derby.client.net.NetStatementReply.parseOpenQueryFailure 
> (NetStatementReply.java:503)
>    at org.apache.derby.client.net.NetStatementReply.parseOPNQRYreply 
> (NetStatementReply.java:226)
>    at org.apache.derby.client.net.NetStatementReply.readOpenQuery 
> (NetStatementReply.java:56)
>    at org.apache.derby.client.net.StatementReply.readOpenQuery 
> (StatementReply.java:49)
>    at org.apache.derby.client.net.NetStatement.readOpenQuery_ 
> (NetStatement.java:151)
>    at org.apache.derby.client.am.Statement.readOpenQuery 
> (Statement.java:1038)
>    at org.apache.derby.client.am.PreparedStatement.flowExecute 
> (PreparedStatement.java:1396)
>    at org.apache.derby.client.am.PreparedStatement.executeX 
> (PreparedStatement.java:893)
>    at org.apache.derby.client.am.PreparedStatement.execute 
> (PreparedStatement.java:884)
>    at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
>    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>    at java.lang.reflect.Method.invoke(Unknown Source)
>    at  
> com.ibatis.common.jdbc.logging.PreparedStatementLogProxy.invoke 
> (PreparedStatementLogProxy.java:62)
>    at $Proxy1.execute(Unknown Source)
>    at com.ibatis.sqlmap.engine.execution.SqlExecutor.executeQuery 
> (SqlExecutor.java:180)
>    at  
> com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.sqlExecute 
> Query(GeneralStatement.java:205)
>    at  
> com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQue 
> ryWithCallback(GeneralStatement.java:173)
>    at  
> com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQue 
> ryForObject(GeneralStatement.java:104)
>    at  
> com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForObject 
> (SqlMapExecutorDelegate.java:561)
>    at  
> com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForObject 
> (SqlMapExecutorDelegate.java:536)
>    at com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.queryForObject 
> (SqlMapSessionImpl.java:93)
>    at com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.queryForObject 
> (SqlMapClientImpl.java:70)
>
> The SQL I'm running contains two inner joins, a WHERE and ORDER BY  
> clause and two parameters. Both the parameters are in the WHERE  
> clause.
>
> I did a short test with the 10.2.1.1 beta release too, but the  
> error is the same.
>
> Any ideas on how I should deal with this internal server error?
>
> Thanks,
> Robert

Craig Russell
Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
408 276-5638 mailto:Craig.Russell@sun.com
P.S. A good JDO? O, Gasp!