"no supertype for empty()" in eXist 1.4 rc 10028

View: New views
1 Messages — Rating Filter:   Alert me  

"no supertype for empty()" in eXist 1.4 rc 10028

by Jason Smith-11 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
eXist 1.4rc 10028
 
Perhaps one of the enlightened eXist developers can shed some light on this bug.  I've included a stack trace at the end.  Thanks!!!
 
When running the following function:
 

declare function itg:doc($arg as xs:string?) as document-node()?

{

    if(fn:starts-with($arg, "/")) then

        fn:doc(fn:concat('/db', xs:string($arg)))

    else

        fn:error(fn:QName(http://www.infotrustgroup.com, "relativePathsNotSupported"), $arg)

};

 
I get the dreaded "no supertype for empty()" message in my log, with a stack trace.  Of course, no error is thrown, and the query executes the way I would expect it to.  The only thing wrong is, apparently, this log entry.
 
 
Through experimentation, I found that the way to make the issue go away, the only way I could find, was to comment out the "if(...)then" portion, like this:

declare function itg:doc($arg as xs:string?) as document-node()?

{

    (: if(fn:starts-with($arg, "/")) then :)

        fn:doc(fn:concat('/db', xs:string($arg)))

    (: else

        fn:error(fn:QName("http://www.infotrustgroup.com", "relativePathsNotSupported"), $arg) :) 

};

 

The best I can tell, and this is just a guess, but this looks like when eXist is parsing the if...then statement, it cannot determine a type.  Perhaps this is specific to document-node(), which is the type that is supposed to be returned by fn:doc(). 

 

 
INFO   | 2009/10/29 12:48:41 | jvm 1    | 2009-10-29 12:48:41,970  WARN org.exist.xquery.value.Type:no supertype for empty()
INFO   | 2009/10/29 12:48:41 | jvm 1    | java.lang.Throwable
INFO   | 2009/10/29 12:48:41 | jvm 1    |  at org.exist.xquery.value.Type.getSuperType(Type.java:384)
INFO   | 2009/10/29 12:48:41 | jvm 1    |  at org.exist.xquery.value.Type.getCommonSuperType(Type.java:417)
INFO   | 2009/10/29 12:48:41 | jvm 1    |  at org.exist.xquery.ConditionalExpression.returnsType(ConditionalExpression.java:150)
INFO   | 2009/10/29 12:48:41 | jvm 1    |  at org.exist.xquery.PathExpr.eval(PathExpr.java:232)
INFO   | 2009/10/29 12:48:41 | jvm 1    |  at org.exist.xquery.UserDefinedFunction.eval(UserDefinedFunction.java:135)
INFO   | 2009/10/29 12:48:41 | jvm 1    |  at org.exist.xquery.DynamicCardinalityCheck.eval(DynamicCardinalityCheck.java:71)
INFO   | 2009/10/29 12:48:41 | jvm 1    |  at org.exist.xquery.DynamicTypeCheck.eval(DynamicTypeCheck.java:61)
INFO   | 2009/10/29 12:48:41 | jvm 1    |  at org.exist.xquery.FunctionCall.evalFunction(FunctionCall.java:270)
INFO   | 2009/10/29 12:48:41 | jvm 1    |  at org.exist.xquery.FunctionCall.eval(FunctionCall.java:201)
INFO   | 2009/10/29 12:48:41 | jvm 1    |  at org.exist.xquery.PathExpr.eval(PathExpr.java:242)
INFO   | 2009/10/29 12:48:41 | jvm 1    |  at org.exist.xquery.DynamicCardinalityCheck.eval(DynamicCardinalityCheck.java:71)
INFO   | 2009/10/29 12:48:41 | jvm 1    |  at org.exist.xquery.BasicFunction.eval(BasicFunction.java:61)
INFO   | 2009/10/29 12:48:41 | jvm 1    |  at org.exist.xquery.InternalFunctionCall.eval(InternalFunctionCall.java:53)
INFO   | 2009/10/29 12:48:41 | jvm 1    |  at org.exist.xquery.PathExpr.eval(PathExpr.java:244)
INFO   | 2009/10/29 12:48:41 | jvm 1    |  at org.exist.xquery.AbstractExpression.eval(AbstractExpression.java:60)
INFO   | 2009/10/29 12:48:41 | jvm 1    |  at org.exist.xquery.XQuery.execute(XQuery.java:226)
INFO   | 2009/10/29 12:48:41 | jvm 1    |  at org.exist.xquery.XQuery.execute(XQuery.java:195)
...
 
 

Jason Smith
Software Engineer

InfoTrust Group, Inc.

500 Discovery Parkway, Suite 200
Superior, CO 80027
Office 303-627-6571
Fax 303-666-6711

Email jsmith@...

WEB www.infotrustgroup.com

This e-mail and all information included herein do not constitute a legal agreement accorded by INFOTRUST GROUP and its affiliates and subsidiaries.  All legal agreements must be formulated in writing by a legal representative of INFOTRUST GROUP. This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed.  If you have received this e-mail by mistake, please inform us and destroy this e-mail and any documents it might contain.  Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Finally, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.  Thank you for your cooperation.


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Exist-open mailing list
Exist-open@...
https://lists.sourceforge.net/lists/listinfo/exist-open