detail.php
OW2 Forge: Detail: 300795 Querying CLOB with null value throws NullPointerException

Advanced - Powered by Google


   
Log In
New Account
  
 
Home
My Page
Project Tree
Project Openings
XQuare
          
 
 
Summary
Forums
Tracker
Lists
Tasks
Docs
News
CVS
Files
SVN
                    
 

Tracker: Bugs

Submit New | Browse | Admin | ExportToXml

[ #300795 ] Querying CLOB with null value throws NullPointerException

Date:
2004-09-07 16:45
Priority:
5
Submitted By:
Alan Tam (at2000)
Assigned To:
Nobody (None)
Category:
all products
State:
Open
Summary:
Querying CLOB with null value throws NullPointerException

Detailed description:
When I update a CLOB column to null, the following exception is thrown. java.lang.NullPointerException at org.xquark.extractor.metadata.ExtractorMappingInfo.getParameter(Unknown Source) at org.xquark.extractor.runtime.LookAheadJdbcResultSet.refreshBuffer(Unknown Source) at org.xquark.extractor.runtime.LookAheadJdbcResultSet.next(Unknown Source) at org.xquark.extractor.runtime.SynchronizedResultSet.nextInThis(Unknown Source) at org.xquark.extractor.runtime.SynchronizedResultSet.next_internalNode(Unknown Source) at org.xquark.extractor.runtime.SynchronizedResultSet.next(Unknown Source) at org.xquark.xquery.xdbc.XResultSetImpl.nextAsSAX(Unknown Source) at org.xquark.xquery.reconstruction.ReconstructionVisitor.nextAsSAX(Unknown Source) at org.xquark.xquery.reconstruction.ReconstructionVisitor.visit(Unknown Source) ... I am using MySQL database. Please have a look. Thanks!

Add A Comment:

Please login

Followup

Message
Date: 2004-10-26 20:48
Sender: at2000
Logged In: YES 
user_id=2500

This patch fixes the problem. I don't know if it is the
correct way to fix the bug.

Index: ExtractorMappingInfo.java
=================================================================
==
RCS file:
/cvsroot/xquark/dev/extractor/src/org/xquark/extractor/metadata/E
xtractorMappingInfo.java,v
retrieving revision 1.23
diff -r1.23 ExtractorMappingInfo.java
252a254
>                                         if (reader ==
null) return null;
322a325
>                                         if (is == null)
return null;
Date: 2004-10-26 20:21
Sender: at2000
Logged In: YES 
user_id=2500

Updated summary.
Date: 2004-10-26 20:20
Sender: at2000
Logged In: YES 
user_id=2500

MySQL:
create table a (b text);
insert into a values (null);

XQuery:
<Result>{
for $a in collection("a")/a
return $a
}</Result>

Result:
DEBUG [2004-10-27 02:17:15,233] (?:?) - START SPECIAL TREATMENT 
DEBUG [2004-10-27 02:17:15,248] (?:?) - STOP SPECIAL TREATMENT 
DEBUG [2004-10-27 02:17:15,249] (?:?) - dependMaps = [$var5]
DEBUG [2004-10-27 02:17:15,250] (?:?) - varList = [$var1]
DEBUG [2004-10-27 02:17:15,250] (?:?) - returnVariables =
[$var1]
DEBUG [2004-10-27 02:17:15,251] (?:?) - idVariables = [$var1]
DEBUG [2004-10-27 02:17:15,251] (?:?) - $var1 --> trees
-->
[org.xquark.xpath.schema.SchemaNode@1195c2b[Decl = a]]
DEBUG [2004-10-27 02:17:15,252] (?:?) - $var1 -->
subPathList --> [$var1]
DEBUG [2004-10-27 02:17:15,252] (?:?) - $var1 -->
xtrees-->
[org.xquark.xpath.schema.SchemaNode@1195c2b[Decl = a]]
DEBUG [2004-10-27 02:17:15,253] (?:?) - $var1 --> loopIDs
--> null
DEBUG [2004-10-27 02:17:15,254] (?:?) - QDB[0]:  for $var1
in collection("*:a")/child::a return ($var1)
DEBUG [2004-10-27 02:17:15,259] (?:?) - QMEM:
<Result>{$var1}</Result>
DEBUG [2004-10-27 02:17:15,259] (?:?) - =================<
QMEM >=================
DEBUG [2004-10-27 02:17:15,260] (?:?) - <Result>
        {$var1}
</Result>
DEBUG [2004-10-27 02:17:15,260] (?:?) - =================<
QDBs >=================
DEBUG [2004-10-27 02:17:15,261] (?:?) -
         for $var1 in collection("*:a")/child::a
         return
                ($var1)

DEBUG [2004-10-27 02:17:15,308] (?:?) - =================<
SQL >=================
DEBUG [2004-10-27 02:17:15,308] (?:?) - SELECT ALL a0.b
FROM test.a a0
DEBUG [2004-10-27 02:17:15,309] (?:?) - =================<
MAPPER >=================
DEBUG [2004-10-27 02:17:15,310] (?:?) -
=====================      mapper     
==========================================================
No.  path,                   tag,                    item
name,              part             children,

-----------------------------------------------------------------
--------------------------------
1       $var1                                           a  
                                                           
                                0       [$var1/child::b,   
    ]
2       $var1/child::b                                  b  
                                            b              
                                0       [null]

_mapItemAddedForId-----------------------------------------------
------------------------------------

_idList----------------------------------------------------------
---------------------------------

=================================================================
================================

java.lang.NullPointerException
        at
org.xquark.extractor.metadata.ExtractorMappingInfo.getParameter(U
nknown
Source)
        at
org.xquark.extractor.runtime.LookAheadJdbcResultSet.refreshBuffer
(Unknown
Source)
        at
org.xquark.extractor.runtime.LookAheadJdbcResultSet.<init>(
Unknown
Source)
        at
org.xquark.extractor.runtime.SynchronizedResultSet.init(Unknown
Source)
        at
org.xquark.extractor.runtime.SynchronizedResultSet.<init>(U
nknown
Source)
        at
org.xquark.extractor.runtime.ExtractorStatement.executeSQL(Unknow
n
Source)
        at
org.xquark.extractor.runtime.ExtractorStatement.runQueryTree(Unkn
own
Source)
        at
org.xquark.extractor.runtime.ExtractorStatement.runQuery(Unknown
Source)
        at
org.xquark.extractor.runtime.ExtractorStatement.runQuery(Unknown
Source)
        at
org.xquark.extractor.runtime.ExtractorStatement.executeXQuery(Unk
nown
Source)
        at
org.xquark.extractor.runtime.ExtractorStatement.execute(Unknown
Source)
        at
org.xquark.extractor.runtime.ExtractorStatement.executeQuery(Unkn
own
Source)
        at Test.main(Test.java:30)
Date: 2004-09-08 10:57
Sender: at2000
Logged In: YES 
user_id=2500

Oh, sorry, I made a mistake. Our developer just corrects me
that it actually happens during select. We are using a
nullable mediumtext field and the XQuery is just a very
simple one.
Date: 2004-09-07 17:25
Sender: srouges
Logged In: YES 
user_id=740

Could you give us more explanations ? You talk about updates
(i.e. mapping feature) and your exception occurs in
extraction (XQuery feature). Could you join all your test
data to reactivate and potentially fix this bug, please ?

Thanks.

Attached Files:

Name Description Download
No Files Currently Attached

Changes:

Field Old Value Date By
summaryUpdate CLOB to Null throws NullPointerException2004-10-26 20:21at2000
resolution_idNone2004-09-07 17:25srouges

Copyright © 1999-2008, OW2 Consortium | contact | You have a difficulty, a problem ? Please report an issue using your OW2 forge account credentials