Quantcast

xqueries w/ xpath not returning data

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

xqueries w/ xpath not returning data

yrichard
I have been using eXist for a year now so not a complete rookie. I recently rebuilt my computer and re-installed eXist on it as my local dev copy. I transferred all data over from production with Super Flexible File Synchronizer. All was working at one point but just recently i started having issues. if i run a query like document('/db/collection/document.xml') it returns data. As soon as i add an xpath expression after like document('/db/collection/document.xml')//ELEMENT it returns nothing. I did declare the default namespace in the prolog. Any ideas what might be happening here? Thank you for your time.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: xqueries w/ xpath not returning data

yrichard
The following query will also return data: document('/db/collection/document.xml')/*

Does seem like a namespace issue but can't seem to pinpoint it.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: xqueries w/ xpath not returning data

yrichard
found this in the log:

2011-01-06 22:58:06,388 [P1-9] WARN  (Type.java [getSuperType]:384) - no supertype for empty()
java.lang.Throwable
        at org.exist.xquery.value.Type.getSuperType(Type.java:384)
        at org.exist.xquery.value.Type.getCommonSuperType(Type.java:410)
        at org.exist.xquery.ConditionalExpression.returnsType(ConditionalExpression.java:153)
        at org.exist.xquery.PathExpr.returnsType(PathExpr.java:364)
        at org.exist.xquery.CastExpression.<init>(CastExpression.java:54)
        at org.exist.xquery.FunctionFactory.createFunction(FunctionFactory.java:181)
        at org.exist.xquery.parser.XQueryTreeParser.functionCall(XQueryTreeParser.java:7917)
        at org.exist.xquery.parser.XQueryTreeParser.primaryExpr(XQueryTreeParser.java:5564)
        at org.exist.xquery.parser.XQueryTreeParser.expr(XQueryTreeParser.java:2753)
....keeps going
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: xqueries w/ xpath not returning data

ron.vandenbranden
In reply to this post by yrichard
Hi,

> I recently rebuilt my computer and re-installed eXist on it as my local dev copy. I
> transferred all data over from production with Super Flexible File
> Synchronizer. All was working at one point but just recently i started
> having issues. if i run a query like document('/db/collection/document.xml')
> it returns data. As soon as i add an xpath expression after like
> document('/db/collection/document.xml')//ELEMENT it returns nothing. I did
> declare the default namespace in the prolog. Any ideas what might be
> happening here? Thank you for your time.

In order to get help, it would be useful to know what eXist version
you're using. However, I recall similar issues with eXist-1.2.6, where
adding new documents to a collection sometimes caused XPath steps with
element names to stop working; only XPath steps with wildcards would
select elements.

I don't know if this is related to your issue, but you could definitely
try to:
     a) reindex the collection(s) in your db
     b) if this doesn't help, try to start from a fresh db, by backing
up, cleaning the WEB-INF\data folder and restoring the database from the
backup

Hope this helps,

Ron

--
Ron Van den Branden
Wetenschappelijk attaché / Senior Researcher

Centrum voor Teksteditie en Bronnenstudie - CTB (KANTL)
Centre for Scholarly Editing and Document Studies
Koninklijke Academie voor Nederlandse Taal- en Letterkunde
Royal Academy of Dutch Language and Literature
Koningstraat 18 / b-9000 Gent / Belgium
tel: +32 9 265 93 51 / fax: +32 9 265 93 49
E-mail : [hidden email]
www.kantl.be/ctb


------------------------------------------------------------------------------
Gaining the trust of online customers is vital for the success of any company
that requires sensitive data to be transmitted over the Web.   Learn how to
best implement a security strategy that keeps consumers' information secure
and instills the confidence they need to proceed with transactions.
http://p.sf.net/sfu/oracle-sfdevnl 
_______________________________________________
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
star

Re: xqueries w/ xpath not returning data

Dannes Wessels-3
In reply to this post by yrichard
why do you use the  'document' function in stead of the standard 'doc' ?

On 7 Jan 2011, at 16:59 , yrichard wrote:

The following query will also return data:
document('/db/collection/document.xml')/*

Kind regards

Dannes

--
eXist-db Native XML Database - http://exist-db.org









------------------------------------------------------------------------------
Gaining the trust of online customers is vital for the success of any company
that requires sensitive data to be transmitted over the Web.   Learn how to
best implement a security strategy that keeps consumers' information secure
and instills the confidence they need to proceed with transactions.
http://p.sf.net/sfu/oracle-sfdevnl 
_______________________________________________
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
star

Re: xqueries w/ xpath not returning data

yrichard
Not too sure. I was just testing in the sandbox. I do use the doc in my actual code though.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: xqueries w/ xpath not returning data

yrichard
In reply to this post by ron.vandenbranden
Ron, That worked. I guess the db got tangled up somehow. Thank you for your help.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: xqueries w/ xpath not returning data

yrichard
I am getting the same error again. I haven't updated any data since the restore. After the restore it worked for a day or so and then the same issue again. My environment is MS W7 64bit. Everytime i run a query in the sandbox i get the following error in the open cmd window for eXist:

[Fatal Error] :-1:-1: Premature end of file.

Any ideas?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: xqueries w/ xpath not returning data

Wolfgang Meier-2

If you are using 1.4, you may try the latest bugfixes in the 1.4.x branch. Some indexing issues have been fixed there. Otherwise I'm not sure what could cause this problem. Do you see th he same issues when running your query from the java client?

Wolfgang

Am 18.01.2011 22:25 schrieb "yrichard" <[hidden email]>:
>
> I am getting the same error again. I haven't updated any data since the
> restore. After the restore it worked for a day or so and then the same issue
> again. My environment is MS W7 64bit. Everytime i run a query in the sandbox
> i get the following error in the open cmd window for eXist:
>
> [Fatal Error] :-1:-1: Premature end of file.
>
> Any ideas?
> --
> View this message in context: http://exist.2174344.n4.nabble.com/xqueries-w-xpath-not-returning-data-tp3179340p3224045.html
> Sent from the exist-open mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> Protect Your Site and Customers from Malware Attacks
> Learn about various malware tactics and how to avoid them. Understand
> malware threats, the impact they can have on your business, and how you
> can protect your company and customers by using code signing.
> http://p.sf.net/sfu/oracle-sfdevnl
> _______________________________________________
> Exist-open mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/exist-open


------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand
malware threats, the impact they can have on your business, and how you
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
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
star

Re: xqueries w/ xpath not returning data

Dmitriy Shabanov
On Wed, Jan 19, 2011 at 2:32 AM, Wolfgang Meier <[hidden email]> wrote:

If you are using 1.4, you may try the latest bugfixes in the 1.4.x branch. Some indexing issues have been fixed there. Otherwise I'm not sure what could cause this problem. Do you see th he same issues when running your query from the java client?

Wolfgang

Am 18.01.2011 22:25 schrieb "yrichard" <[hidden email]>:


>
> I am getting the same error again. I haven't updated any data since the
> restore. After the restore it worked for a day or so and then the same issue
> again. My environment is MS W7 64bit. Everytime i run a query in the sandbox
> i get the following error in the open cmd window for eXist:
>
> [Fatal Error] :-1:-1: Premature end of file.


That come from xslt on "empty" file or stream.

--
Dmitriy Shabanov

------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand
malware threats, the impact they can have on your business, and how you
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
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
star

Re: xqueries w/ xpath not returning data

Dannes Wessels-3
yes is a known logging, we cannot get rid of it. Nothing to worry about.

On 18 Jan 2011, at 23:53 , Dmitriy Shabanov wrote:

> [Fatal Error] :-1:-1: Premature end of file.


That come from xslt on "empty" file or stream.

--
Dannes Wessels
eXist-db Open Source Native XML Database
e: [hidden email]
w: http://www.exist-db.org 







------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand
malware threats, the impact they can have on your business, and how you
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open

smime.p7s (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: xqueries w/ xpath not returning data

Wolfgang Meier-2

As written in the original post, I assumed the logging was accompanied by wrong query results. If this is not the case, the logging can indeed be ignored.

Wolfgang

Am 19.01.2011 08:41 schrieb "Dannes Wessels" <[hidden email]>:
> yes is a known logging, we cannot get rid of it. Nothing to worry about.
>
> On 18 Jan 2011, at 23:53 , Dmitriy Shabanov wrote:
>
>> > [Fatal Error] :-1:-1: Premature end of file.
>>
>>
>> That come from xslt on "empty" file or stream.
>
> --
> Dannes Wessels
> eXist-db Open Source Native XML Database
> e: [hidden email]
> w: http://www.exist-db.org
>
>
>
>
>
>


------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand
malware threats, the impact they can have on your business, and how you
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
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
star

Re: xqueries w/ xpath not returning data

yrichard
Any other suggestions; places to look (logs) to find the issue.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: xqueries w/ xpath not returning data

Dannes Wessels-3
Hi

On Thu, Jan 20, 2011 at 1:05 AM, yrichard <[hidden email]> wrote:
> Any other suggestions; places to look (logs) to find the issue.

there is no issue, it is a known bug.... (as I wrote before)

D.


--
eXist-db Native XML Database - http://exist-db.org
Join us on linked-in: http://www.linkedin.com/groups?gid=35624

------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand
malware threats, the impact they can have on your business, and how you
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
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
star

Re: xqueries w/ xpath not returning data

yrichard
Started from scratch again. New install copied over data. getting results now at least but sandbox still not returning any results. The sandbox say "retrieving results"; result window says "found 17 in xx seconds" but nothing ever shows up. Any ideas?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: xqueries w/ xpath not returning data

Joe Wicentowski
> Started from scratch again. New install copied over data. getting results now
> at least but sandbox still not returning any results. The sandbox say
> "retrieving results"; result window says "found 17 in xx seconds" but
> nothing ever shows up. Any ideas?

Just to confirm, did you force a reload of the sandbox window in your
browser?  In my experience, this is necessary after a restart of
eXist.

Joe

------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires
February 28th, so secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
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
star

Re: xqueries w/ xpath not returning data

yrichard
Yes tried that but still no results. I have also seen this in the past which sometimes a refresh would fix but not this time. I also keep getting the premature end of file error i mentioned earlier in this thread. Not too sure what to do now. Thank you!
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: xqueries w/ xpath not returning data

Joe Wicentowski
> Yes tried that but still no results. I have also seen this in the past which
> sometimes a refresh would fix but not this time. I also keep getting the
> premature end of file error i mentioned earlier in this thread. Not too sure
> what to do now. Thank you!

Re: the premature end of file error, as Dmitriy and Dannes already
said, this is a known cosmetic bug (related to the use of XSL to
process the display of sandbox results), and it does not indicate any
problem with the sandbox's functioning.

First, you're not still using document() instead of doc() are you?

Second, are you getting no results for any query (try a simple query
like 'a')?  Or are you only getting no results for your query?  If
other queries work and only your query has this issue, then we need to
know more about your query.  Ideally, you could send an example that
we could use to reproduce your results.

Lastly, we need to know what version of eXist you're using.  We've
asked for this before but I don't see your response.  The version
information is critical for people to help you with any
troubleshooting.

Cheers,
Joe

------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires
February 28th, so secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
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
star

Re: xqueries w/ xpath not returning data

yrichard
Apologies for not specifying the build:

eXist Version: 1.4.0
eXist Build: 20091111

Ran a simple query as you requested; 'a' as a query and still no result.

Thank you!
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: xqueries w/ xpath not returning data

yrichard
running the simple query still says "retrieving results" and status says "found 1 in xxx sec". Seems to be something wrong with the rendering of results somehow. My environment is W7 64bit.
12
Loading...