Bug in last CVS from 20-09-2005

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Bug in last CVS from 20-09-2005

Евгений-8
In exprettion
--------------------------------
    if ($a) then (....) else (....)
--------------------------------

if "$a" is sequence.
in previos CVS (from 13-09-2005 for example) all works!



  Internal Server Error

Message: error FORG0006: effectiveBooleanValue: first item not a node,
and sequence length>1 [at line 84, column 25] In call to function:
etc:content(item*) [84, 25] etc:content() [5, 1]

Description: org.apache.cocoon.ProcessingException: XMLDBException
occurred: error FORG0006: effectiveBooleanValue: first item not a node,
and sequence length>1 [at line 84, column 25] In call to function:
etc:content(item*) [84, 25] etc:content() [5, 1]:
org.xmldb.api.base.XMLDBException: error FORG0006:
effectiveBooleanValue: first item not a node, and sequence length>1 [at
line 84, column 25] In call to function: etc:content(item*) [84, 25]
etc:content() [5, 1]

Sender: org.apache.cocoon.servlet.CocoonServlet

Source: Cocoon Servlet

Request URI

cause

org.exist.xquery.XPathException: error FORG0006: effectiveBooleanValue: first item not a node, and sequence length>1 [at line 84, column 25]
In call to function:
        etc:content(item*) [84, 25]
        etc:content() [5, 1]

request-uri

/

full exception chain stacktrace

org.apache.cocoon.ProcessingException: XMLDBException occurred: error FORG0006: effectiveBooleanValue: first item not a node, and sequence length>1 [at line 84, column 25]
In call to function:
        etc:content(item*) [84, 25]
        etc:content() [5, 1]: org.xmldb.api.base.XMLDBException: error FORG0006: effectiveBooleanValue: first item not a node, and sequence length>1 [at line 84, column 25]
In call to function:
        etc:content(item*) [84, 25]
        etc:content() [5, 1]
        at org.exist.cocoon.XQueryGenerator.generate(Unknown Source)
        at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.processXMLPipeline(AbstractProcessingPipeline.java:575)
        at org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline.processXMLPipeline(AbstractCachingProcessingPipeline.java:183)
        at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(AbstractProcessingPipeline.java:483)
        at org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke(SerializeNode.java:120)
        at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:46)
        at org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:130)
        at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:68)
        at org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:138)
        at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:68)
        at org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:92)
        at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:234)
        at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:176)
        at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:243)
        at org.apache.cocoon.Cocoon.process(Cocoon.java:608)
        at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1123)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
        at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:427)
        at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:473)
        at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:568)
        at org.mortbay.http.HttpContext.handle(HttpContext.java:1565)
        at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:635)
        at org.mortbay.http.HttpContext.handle(HttpContext.java:1517)
        at org.mortbay.http.HttpServer.service(HttpServer.java:954)
        at org.mortbay.http.HttpConnection.service(HttpConnection.java:816)
        at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:983)
        at org.mortbay.http.HttpConnection.handle(HttpConnection.java:833)
        at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:244)
        at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357)
        at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)
Caused by: org.xmldb.api.base.XMLDBException: error FORG0006: effectiveBooleanValue: first item not a node, and sequence length>1 [at line 84, column 25]
In call to function:
        etc:content(item*) [84, 25]
        etc:content() [5, 1]
        at org.exist.xmldb.LocalXPathQueryService.execute(Unknown Source)
        ... 30 more



-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: change in boolean conversion - was: Bug in last CVS from 20-09-2005

Jean-Marc Vanel-3
Sorry, there was an update (in AbstractSequence.java) to the latest "Effective Boolean Value" specification :
http://www.w3.org/TR/xquery/#id-ebv

The eXist message says that boolean conversion cannot be applied to a sequence of length > 1
unless the first item is a node .

Have a look at your function etc:content(item*) line 84 .
The common correction is to change:
if ($test)

in:
if (exists($test))

For your convenince, here is the spec.:

   1.

      If its operand is an empty sequence, |fn:boolean| returns |false|.

   2.

      If its operand is a sequence whose first item is a node,
      |fn:boolean| returns |true|.

   3.

      If its operand is a singleton
      <http://www.w3.org/TR/xquery/#dt-singleton> value of type
      |xs:boolean| or derived from |xs:boolean|, |fn:boolean| returns
      the value of its operand unchanged.

   4.

      If its operand is a singleton
      <http://www.w3.org/TR/xquery/#dt-singleton> value of type
      |xs:string|, |xdt:untypedAtomic|, or a type derived from one of
      these, |fn:boolean| returns |false| if the operand value has zero
      length; otherwise it returns |true|.

   5.

      If its operand is a singleton
      <http://www.w3.org/TR/xquery/#dt-singleton> value of any numeric
      <http://www.w3.org/TR/xquery/#dt-numeric> type or derived from a
      numeric type, |fn:boolean| returns |false| if the operand value is
      |NaN| or is numerically equal to zero; otherwise it returns |true|.

   6.

      In all other cases, |fn:boolean| raises a type error [err:FORG0006].


Евгений wrote:

> In expression
> --------------------------------
>    if ($a) then (....) else (....)
> --------------------------------
>
> if "$a" is sequence.
> in previos CVS (from 13-09-2005 for example) all works!
>
>
>  Internal Server Error
>
> Message: error FORG0006: effectiveBooleanValue: first item not a node,
> and sequence length>1 [at line 84, column 25] In call to function:
> etc:content(item*) [84, 25] etc:content() [5, 1]
>
> ....
> In call to function:
>     etc:content(item*) [84, 25]
>     etc:content() [5, 1]
>


--
Jean-Marc Vanel
Conseil et Services / développement & intégration logiciels
Logiciel libre, Web, Java, XML ...
A la pointe de la technique, au service des projets
http://jmvanel.free.fr/ ===) CV, software resources

Mes journaux:
- sujets généraux en Français: http://jmvanel.free.fr/Block-note.html
- sujets informatiques en Français: http://jmvanel.free.fr/notes-informatiques.html
- computer science diary : http://jmvanel.free.fr/computer-notes.html

Worldwide Botanical Knowledge Base
http://wwbota.free.fr/ 
test XML query engine: http://jmvanel.free.fr/protea.html




-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: change in boolean conversion - was: Bug in last CVS from 20-09-2005

Евгений-8
Jean-Marc Vanel пишет:

> Sorry, there was an update (in AbstractSequence.java) to the latest
> "Effective Boolean Value" specification :
> http://www.w3.org/TR/xquery/#id-ebv
>
> The eXist message says that boolean conversion cannot be applied to a
> sequence of length > 1
> unless the first item is a node .
>
> Have a look at your function etc:content(item*) line 84 .
> The common correction is to change:
> if ($test)
>
> in:
> if (exists($test))
>

Yes! I alredy do it!


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Loading...