NPE in deepEquals

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

NPE in deepEquals

Wolfgang Hoschek-2
There's a NullPointerException in standard deepEquals() of  
saxonb-8.6.1 (it's a regression, not present in 8.6), using Nux/XOM  
(untyped wrappers),
Running unmodified xqts-0.8.0:

...
...
testcase 8570: ../xqts-0.8.0/Queries/XQuery/UseCase/UseCaseXMP/xmp-
queries-results-q12.xq ...

<test-case is-XPath2="false" name="xmp-queries-results-q12"  
FilePath="UseCase/UseCaseXMP/" scenario="standard" Creator="XML Query  
Group" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  
xmlns="http://www.w3.org/2005/02/query-test-XQTSCatalog">
     <description>Find pairs of books that have different titles but  
the same set of authors (possibly in a different order).</description>
     <spec-citation spec="UseCases" section-number="1.1.9.12" section-
title="Q12" section-pointer="xmp-queries-results-q12"/>
     <query name="xmp-queries-results-q12" date="2005-02-03"/>
     <input-file role="principal-data" variable="input-context">bib</
input-file>
     <output-file role="principal" compare="XML">xmp-queries-results-
q12.txt</output-file>
</test-case>

Exception in thread "main" java.lang.NullPointerException
         at net.sf.saxon.functions.DeepEqual.deepEquals
(DeepEqual.java:259)
         at net.sf.saxon.functions.DeepEqual.deepEquals
(DeepEqual.java:125)
         at net.sf.saxon.functions.DeepEqual.evaluateItem
(DeepEqual.java:90)
         at net.sf.saxon.expr.ComputedExpression.iterate
(ComputedExpression.java:528)
         at net.sf.saxon.expr.ComputedExpression.effectiveBooleanValue
(ComputedExpression.java:545)
         at net.sf.saxon.expr.IfExpression.process(IfExpression.java:
237)
         at net.sf.saxon.expr.LetExpression.process
(LetExpression.java:202)
         at net.sf.saxon.expr.IfExpression.process(IfExpression.java:
238)
         at net.sf.saxon.expr.ForExpression.process
(ForExpression.java:535)
         at net.sf.saxon.expr.LetExpression.process
(LetExpression.java:202)
         at net.sf.saxon.expr.ForExpression.process
(ForExpression.java:535)
         at net.sf.saxon.expr.LetExpression.process
(LetExpression.java:202)
         at net.sf.saxon.instruct.ElementCreator.constructElement
(ElementCreator.java:246)
         at net.sf.saxon.instruct.ElementCreator.evaluateItem
(ElementCreator.java:193)
         at net.sf.saxon.instruct.Instruction.iterate
(Instruction.java:307)
         at net.sf.saxon.query.XQueryExpression.iterator
(XQueryExpression.java:199)
         at nux.xom.xquery.XQuery.newResultSequence(XQuery.java:562)
         at nux.xom.xquery.XQuery.execute(XQuery.java:474)
         at nux.xom.tests.XQueryTestSuiteW3C.run
(XQueryTestSuiteW3C.java:144)
         at nux.xom.tests.XQueryTestSuiteW3C.main
(XQueryTestSuiteW3C.java:98)





-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
saxon-help mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help
Reply | Threaded
Open this post in threaded view
|

RE: NPE in deepEquals

Michael Kay
This seems to be NUX/XOM dependent - I can't immediately see what's wrong,
and the query runs fine with TinyTree. Can you tell me exactly what I need
to do to reproduce it?

Michael Kay
http://www.saxonica.com/

 

> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]] On Behalf Of
> Wolfgang Hoschek
> Sent: 25 November 2005 01:52
> To: [hidden email]
> Subject: [saxon] NPE in deepEquals
>
> There's a NullPointerException in standard deepEquals() of  
> saxonb-8.6.1 (it's a regression, not present in 8.6), using Nux/XOM  
> (untyped wrappers),
> Running unmodified xqts-0.8.0:
>
> ...
> ...
> testcase 8570: ../xqts-0.8.0/Queries/XQuery/UseCase/UseCaseXMP/xmp-
> queries-results-q12.xq ...
>
> <test-case is-XPath2="false" name="xmp-queries-results-q12"  
> FilePath="UseCase/UseCaseXMP/" scenario="standard"
> Creator="XML Query  
> Group" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  
> xmlns="http://www.w3.org/2005/02/query-test-XQTSCatalog">
>      <description>Find pairs of books that have different titles but  
> the same set of authors (possibly in a different order).</description>
>      <spec-citation spec="UseCases" section-number="1.1.9.12"
> section-
> title="Q12" section-pointer="xmp-queries-results-q12"/>
>      <query name="xmp-queries-results-q12" date="2005-02-03"/>
>      <input-file role="principal-data" variable="input-context">bib</
> input-file>
>      <output-file role="principal" compare="XML">xmp-queries-results-
> q12.txt</output-file>
> </test-case>
>
> Exception in thread "main" java.lang.NullPointerException
>          at net.sf.saxon.functions.DeepEqual.deepEquals
> (DeepEqual.java:259)
>          at net.sf.saxon.functions.DeepEqual.deepEquals
> (DeepEqual.java:125)
>          at net.sf.saxon.functions.DeepEqual.evaluateItem
> (DeepEqual.java:90)
>          at net.sf.saxon.expr.ComputedExpression.iterate
> (ComputedExpression.java:528)
>          at
> net.sf.saxon.expr.ComputedExpression.effectiveBooleanValue
> (ComputedExpression.java:545)
>          at net.sf.saxon.expr.IfExpression.process(IfExpression.java:
> 237)
>          at net.sf.saxon.expr.LetExpression.process
> (LetExpression.java:202)
>          at net.sf.saxon.expr.IfExpression.process(IfExpression.java:
> 238)
>          at net.sf.saxon.expr.ForExpression.process
> (ForExpression.java:535)
>          at net.sf.saxon.expr.LetExpression.process
> (LetExpression.java:202)
>          at net.sf.saxon.expr.ForExpression.process
> (ForExpression.java:535)
>          at net.sf.saxon.expr.LetExpression.process
> (LetExpression.java:202)
>          at net.sf.saxon.instruct.ElementCreator.constructElement
> (ElementCreator.java:246)
>          at net.sf.saxon.instruct.ElementCreator.evaluateItem
> (ElementCreator.java:193)
>          at net.sf.saxon.instruct.Instruction.iterate
> (Instruction.java:307)
>          at net.sf.saxon.query.XQueryExpression.iterator
> (XQueryExpression.java:199)
>          at nux.xom.xquery.XQuery.newResultSequence(XQuery.java:562)
>          at nux.xom.xquery.XQuery.execute(XQuery.java:474)
>          at nux.xom.tests.XQueryTestSuiteW3C.run
> (XQueryTestSuiteW3C.java:144)
>          at nux.xom.tests.XQueryTestSuiteW3C.main
> (XQueryTestSuiteW3C.java:98)
>
>
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep
> through log files
> for problems?  Stop!  Download the new AJAX search engine that makes
> searching your log files as easy as surfing the  web.  
> DOWNLOAD SPLUNK!
> http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
> _______________________________________________
> saxon-help mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/saxon-help
>




-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
saxon-help mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help
Reply | Threaded
Open this post in threaded view
|

RE: NPE in deepEquals

Michael Kay
In reply to this post by Wolfgang Hoschek-2
Got it. The getTypeAnnotation() method in the XOM NodeWrapper is still
returning -1 to mean "unknown" - the DeepEqual function is expecting
XDT_UNTYPED. The JDOM and DOM NodeWrappers do the same. A case of
specification drift.

Michael Kay
http://www.saxonica.com/ 

> -----Original Message-----
> From: Michael Kay [mailto:[hidden email]]
> Sent: 26 November 2005 00:07
> To: '[hidden email]'
> Subject: RE: [saxon] NPE in deepEquals
>
> This seems to be NUX/XOM dependent - I can't immediately see
> what's wrong, and the query runs fine with TinyTree. Can you
> tell me exactly what I need to do to reproduce it?
>
> Michael Kay
> http://www.saxonica.com/
>
>  
>
> > -----Original Message-----
> > From: [hidden email]
> > [mailto:[hidden email]] On Behalf Of
> > Wolfgang Hoschek
> > Sent: 25 November 2005 01:52
> > To: [hidden email]
> > Subject: [saxon] NPE in deepEquals
> >
> > There's a NullPointerException in standard deepEquals() of  
> > saxonb-8.6.1 (it's a regression, not present in 8.6), using
> Nux/XOM  
> > (untyped wrappers),
> > Running unmodified xqts-0.8.0:
> >
> > ...
> > ...
> > testcase 8570: ../xqts-0.8.0/Queries/XQuery/UseCase/UseCaseXMP/xmp-
> > queries-results-q12.xq ...
> >
> > <test-case is-XPath2="false" name="xmp-queries-results-q12"  
> > FilePath="UseCase/UseCaseXMP/" scenario="standard"
> > Creator="XML Query  
> > Group" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  
> > xmlns="http://www.w3.org/2005/02/query-test-XQTSCatalog">
> >      <description>Find pairs of books that have different
> titles but  
> > the same set of authors (possibly in a different
> order).</description>
> >      <spec-citation spec="UseCases" section-number="1.1.9.12"
> > section-
> > title="Q12" section-pointer="xmp-queries-results-q12"/>
> >      <query name="xmp-queries-results-q12" date="2005-02-03"/>
> >      <input-file role="principal-data"
> variable="input-context">bib</
> > input-file>
> >      <output-file role="principal"
> compare="XML">xmp-queries-results-
> > q12.txt</output-file>
> > </test-case>
> >
> > Exception in thread "main" java.lang.NullPointerException
> >          at net.sf.saxon.functions.DeepEqual.deepEquals
> > (DeepEqual.java:259)
> >          at net.sf.saxon.functions.DeepEqual.deepEquals
> > (DeepEqual.java:125)
> >          at net.sf.saxon.functions.DeepEqual.evaluateItem
> > (DeepEqual.java:90)
> >          at net.sf.saxon.expr.ComputedExpression.iterate
> > (ComputedExpression.java:528)
> >          at
> > net.sf.saxon.expr.ComputedExpression.effectiveBooleanValue
> > (ComputedExpression.java:545)
> >          at
> net.sf.saxon.expr.IfExpression.process(IfExpression.java:
> > 237)
> >          at net.sf.saxon.expr.LetExpression.process
> > (LetExpression.java:202)
> >          at
> net.sf.saxon.expr.IfExpression.process(IfExpression.java:
> > 238)
> >          at net.sf.saxon.expr.ForExpression.process
> > (ForExpression.java:535)
> >          at net.sf.saxon.expr.LetExpression.process
> > (LetExpression.java:202)
> >          at net.sf.saxon.expr.ForExpression.process
> > (ForExpression.java:535)
> >          at net.sf.saxon.expr.LetExpression.process
> > (LetExpression.java:202)
> >          at net.sf.saxon.instruct.ElementCreator.constructElement
> > (ElementCreator.java:246)
> >          at net.sf.saxon.instruct.ElementCreator.evaluateItem
> > (ElementCreator.java:193)
> >          at net.sf.saxon.instruct.Instruction.iterate
> > (Instruction.java:307)
> >          at net.sf.saxon.query.XQueryExpression.iterator
> > (XQueryExpression.java:199)
> >          at nux.xom.xquery.XQuery.newResultSequence(XQuery.java:562)
> >          at nux.xom.xquery.XQuery.execute(XQuery.java:474)
> >          at nux.xom.tests.XQueryTestSuiteW3C.run
> > (XQueryTestSuiteW3C.java:144)
> >          at nux.xom.tests.XQueryTestSuiteW3C.main
> > (XQueryTestSuiteW3C.java:98)
> >
> >
> >
> >
> >
> > -------------------------------------------------------
> > This SF.net email is sponsored by: Splunk Inc. Do you grep
> > through log files
> > for problems?  Stop!  Download the new AJAX search engine that makes
> > searching your log files as easy as surfing the  web.  
> > DOWNLOAD SPLUNK!
> > http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
> > _______________________________________________
> > saxon-help mailing list
> > [hidden email]
> > https://lists.sourceforge.net/lists/listinfo/saxon-help
> >
>




-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
saxon-help mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help
Reply | Threaded
Open this post in threaded view
|

Re: NPE in deepEquals

Wolfgang Hoschek-2
Thanks. I've now updated to XDT_UNTYPED.
Wolfgang.

On Nov 25, 2005, at 4:17 PM, Michael Kay wrote:

> Got it. The getTypeAnnotation() method in the XOM NodeWrapper is still
> returning -1 to mean "unknown" - the DeepEqual function is expecting
> XDT_UNTYPED. The JDOM and DOM NodeWrappers do the same. A case of
> specification drift.
>
> Michael Kay
> http://www.saxonica.com/
>
>
>> -----Original Message-----
>> From: Michael Kay [mailto:[hidden email]]
>> Sent: 26 November 2005 00:07
>> To: '[hidden email]'
>> Subject: RE: [saxon] NPE in deepEquals
>>
>> This seems to be NUX/XOM dependent - I can't immediately see
>> what's wrong, and the query runs fine with TinyTree. Can you
>> tell me exactly what I need to do to reproduce it?
>>
>> Michael Kay
>> http://www.saxonica.com/
>>
>>
>>
>>
>>> -----Original Message-----
>>> From: [hidden email]
>>> [mailto:[hidden email]] On Behalf Of
>>> Wolfgang Hoschek
>>> Sent: 25 November 2005 01:52
>>> To: [hidden email]
>>> Subject: [saxon] NPE in deepEquals
>>>
>>> There's a NullPointerException in standard deepEquals() of
>>> saxonb-8.6.1 (it's a regression, not present in 8.6), using
>>>
>> Nux/XOM
>>
>>> (untyped wrappers),
>>> Running unmodified xqts-0.8.0:
>>>
>>> ...
>>> ...
>>> testcase 8570: ../xqts-0.8.0/Queries/XQuery/UseCase/UseCaseXMP/xmp-
>>> queries-results-q12.xq ...
>>>
>>> <test-case is-XPath2="false" name="xmp-queries-results-q12"
>>> FilePath="UseCase/UseCaseXMP/" scenario="standard"
>>> Creator="XML Query
>>> Group" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>> xmlns="http://www.w3.org/2005/02/query-test-XQTSCatalog">
>>>      <description>Find pairs of books that have different
>>>
>> titles but
>>
>>> the same set of authors (possibly in a different
>>>
>> order).</description>
>>
>>>      <spec-citation spec="UseCases" section-number="1.1.9.12"
>>> section-
>>> title="Q12" section-pointer="xmp-queries-results-q12"/>
>>>      <query name="xmp-queries-results-q12" date="2005-02-03"/>
>>>      <input-file role="principal-data"
>>>
>> variable="input-context">bib</
>>
>>> input-file>
>>>      <output-file role="principal"
>>>
>> compare="XML">xmp-queries-results-
>>
>>> q12.txt</output-file>
>>> </test-case>
>>>
>>> Exception in thread "main" java.lang.NullPointerException
>>>          at net.sf.saxon.functions.DeepEqual.deepEquals
>>> (DeepEqual.java:259)
>>>          at net.sf.saxon.functions.DeepEqual.deepEquals
>>> (DeepEqual.java:125)
>>>          at net.sf.saxon.functions.DeepEqual.evaluateItem
>>> (DeepEqual.java:90)
>>>          at net.sf.saxon.expr.ComputedExpression.iterate
>>> (ComputedExpression.java:528)
>>>          at
>>> net.sf.saxon.expr.ComputedExpression.effectiveBooleanValue
>>> (ComputedExpression.java:545)
>>>          at
>>>
>> net.sf.saxon.expr.IfExpression.process(IfExpression.java:
>>
>>> 237)
>>>          at net.sf.saxon.expr.LetExpression.process
>>> (LetExpression.java:202)
>>>          at
>>>
>> net.sf.saxon.expr.IfExpression.process(IfExpression.java:
>>
>>> 238)
>>>          at net.sf.saxon.expr.ForExpression.process
>>> (ForExpression.java:535)
>>>          at net.sf.saxon.expr.LetExpression.process
>>> (LetExpression.java:202)
>>>          at net.sf.saxon.expr.ForExpression.process
>>> (ForExpression.java:535)
>>>          at net.sf.saxon.expr.LetExpression.process
>>> (LetExpression.java:202)
>>>          at net.sf.saxon.instruct.ElementCreator.constructElement
>>> (ElementCreator.java:246)
>>>          at net.sf.saxon.instruct.ElementCreator.evaluateItem
>>> (ElementCreator.java:193)
>>>          at net.sf.saxon.instruct.Instruction.iterate
>>> (Instruction.java:307)
>>>          at net.sf.saxon.query.XQueryExpression.iterator
>>> (XQueryExpression.java:199)
>>>          at nux.xom.xquery.XQuery.newResultSequence(XQuery.java:562)
>>>          at nux.xom.xquery.XQuery.execute(XQuery.java:474)
>>>          at nux.xom.tests.XQueryTestSuiteW3C.run
>>> (XQueryTestSuiteW3C.java:144)
>>>          at nux.xom.tests.XQueryTestSuiteW3C.main
>>> (XQueryTestSuiteW3C.java:98)
>>>
>>>
>>>
>>>
>>>
>>> -------------------------------------------------------
>>> This SF.net email is sponsored by: Splunk Inc. Do you grep
>>> through log files
>>> for problems?  Stop!  Download the new AJAX search engine that makes
>>> searching your log files as easy as surfing the  web.
>>> DOWNLOAD SPLUNK!
>>> http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
>>> _______________________________________________
>>> saxon-help mailing list
>>> [hidden email]
>>> https://lists.sourceforge.net/lists/listinfo/saxon-help
>>>
>>>
>>
>>
>
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep through  
> log files
> for problems?  Stop!  Download the new AJAX search engine that makes
> searching your log files as easy as surfing the  web.  DOWNLOAD  
> SPLUNK!
> http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
> _______________________________________________
> saxon-help mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/saxon-help
>



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
saxon-help mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help