Error 400 after update, solved by querying Function Library

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

Error 400 after update, solved by querying Function Library

by Joe Wicentowski :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Dear eXist list,

I'm writing with a question that is puzzling me.  When I return go to
work or return home from work and load my latest eXist collection into
my  computer (delete the old collection, upload the newer one via Java
admin), I get an Error 400 when I access the files (XQuery files
serializing as HTML) via eXist's REST interface.  Nothing I do
(reloading the webpage, restarting eXist) will stop the error.  The
only thing that fixes the problem is going to the Function Library
(via http://localhost:8080/exist/xquery/functions.xq) and typing in a
search term to the function library; then, my own .xq files
mysteriously work.

I'm using eXist 1.2, on an iBook, iMac, and WinXP.  Why do you think
eXist is getting stuck on my code, and then unstuck by the Function
Library?

Thanks in advance,
- Joe

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Exist-open mailing list
Exist-open@...
https://lists.sourceforge.net/lists/listinfo/exist-open

Re: Error 400 after update, solved by querying Function Library

by Dannes Wessels :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

On Tue, May 13, 2008 at 2:35 AM, Joe Wicentowski <joewiz@...> wrote:
I'm writing with a question that is puzzling me.

Strange. Please could you check the exist.log file? Are there any hints likeExceptions ?
What message in reported together with this 400 code (there should be a text)

regards

Dannes

--
# Dannes Wessels # The Netherlands #
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Exist-open mailing list
Exist-open@...
https://lists.sourceforge.net/lists/listinfo/exist-open

Re: Error 400 after update, solved by querying Function Library

by Joe Wicentowski :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks for your reply, Dannes.  I'm sorry for this long reply, but I
hope it helps illuminate the problem.  I'm pretty baffled by this
behavior!  I'd be interested to know if this information helps point
to a problem with my code, or something deeper than this.

First, the 400 code says:
   HTTP ERROR: 400
   Error while serializing xml: java.lang.NullPointerException
   RequestURI=/exist/rest/db/frus/index.xq
   Powered by Jetty://

Second, I reviewed the exist.log file from the portion where I deleted
the older collection, uploaded the newer collection, and began to
request the index.xq file.  My hunch is that the problem isn't with
the deleting/uploading, but with the first access of the post-upload
material.  So I'll jump right into the log at the last step -- what
the log shows when I request index.xq:

2008-05-13 20:20:52,932 [P1-8] DEBUG (RESTServer.java [doGet]:271) -
stylesheet = null
2008-05-13 20:20:52,933 [P1-8] DEBUG (RESTServer.java [doGet]:272) -
query = null
2008-05-13 20:20:52,934 [P1-8] DEBUG (XQueryContext.java
[checkOptions]:2439) - Setting serialization property from pragma:
method = xhtml
2008-05-13 20:20:52,934 [P1-8] DEBUG (XQueryContext.java
[checkOptions]:2439) - Setting serialization property from pragma:
media-type = text/html
2008-05-13 20:20:52,937 [P1-8] DEBUG (XQuery.java [execute]:222) -
Execution took 3 ms
2008-05-13 20:20:52,937 [P1-8] DEBUG (HTTPUtils.java
[addLastModifiedHeader]:61) - mostRecentDocumentTime: 0
2008-05-13 20:20:52,938 [P1-8] DEBUG (XIncludeFilter.java
[startElement]:212) - processing include ...
2008-05-13 20:20:52,938 [P1-8] DEBUG (XIncludeFilter.java
[processXInclude]:268) - found href="/db/frus/includes/header.xq"
2008-05-13 20:20:52,938 [P1-8] WARN  (RESTServer.java [printResults]:1195) -

Then, when I bring up /exist/xquery/functions.xq, this appears:

2008-05-13 20:50:09,729 [P1-23] DEBUG (XQueryContext.java
[importModule]:1849) - Module http://exist-db.org/xquery/util already
present.
2008-05-13 20:50:09,729 [P1-23] DEBUG (XQueryContext.java
[importModule]:1849) - Module http://exist-db.org/xquery/request
already present.
2008-05-13 20:50:09,729 [P1-23] DEBUG (XQueryContext.java
[importModule]:1849) - Module http://exist-db.org/xquery/xmldb already
present.
2008-05-13 20:50:09,730 [P1-23] DEBUG (XQueryContext.java
[importModule]:1849) - Module http://exist-db.org/xquery/ngram already
present.
2008-05-13 20:50:09,742 [P1-23] DEBUG (XQuery.java [compile]:165) -
Query diagnostics:
2008-05-13 20:50:09,742 [P1-23] DEBUG (XQuery.java [compile]:169) -
Compilation took 58 ms
2008-05-13 20:50:09,746 [P1-23] DEBUG (LogFunction.java [eval]:128) -
(Line: 251) action = search
2008-05-13 20:50:09,746 [P1-23] DEBUG (LogFunction.java [eval]:128) -
(Line: 251) prev = Search
2008-05-13 20:50:09,747 [P1-23] DEBUG (LogFunction.java [eval]:128) -
(Line: 251) type = name
2008-05-13 20:50:09,747 [P1-23] DEBUG (LogFunction.java [eval]:128) -
(Line: 251) mode = ajax
2008-05-13 20:50:09,748 [P1-23] DEBUG (LogFunction.java [eval]:128) -
(Line: 251) q = url
2008-05-13 20:50:09,748 [P1-23] DEBUG (LogFunction.java [eval]:128) -
(Line: 251) module = All
2008-05-13 20:50:09,766 [P1-23] DEBUG (XQuery.java [execute]:222) -
Execution took 24 ms
2008-05-13 20:50:09,766 [P1-23] DEBUG (HTTPUtils.java
[addLastModifiedHeader]:61) - mostRecentDocumentTime: 0

Lastly, when I reload my file index.xq, the file displays as it
should, but the log shows the following:

2008-05-13 20:39:12,376 [P1-15] DEBUG (RESTServer.java [doGet]:271) -
stylesheet = null
2008-05-13 20:39:12,376 [P1-15] DEBUG (RESTServer.java [doGet]:272) -
query = null
2008-05-13 20:39:12,398 [P1-15] DEBUG (XQuery.java [compile]:165) -
Query diagnostics:
2008-05-13 20:39:12,399 [P1-15] DEBUG (XQuery.java [compile]:169) -
Compilation took 22 ms
2008-05-13 20:39:12,399 [P1-15] DEBUG (XQueryContext.java
[checkOptions]:2439) - Setting serialization property from pragma:
method = xhtml
2008-05-13 20:39:12,399 [P1-15] DEBUG (XQueryContext.java
[checkOptions]:2439) - Setting serialization property from pragma:
media-type = text/html
2008-05-13 20:39:12,414 [P1-15] DEBUG (XQuery.java [execute]:222) -
Execution took 15 ms
2008-05-13 20:39:12,415 [P1-15] DEBUG (HTTPUtils.java
[addLastModifiedHeader]:61) - mostRecentDocumentTime: 0
2008-05-13 20:39:12,415 [P1-15] DEBUG (XIncludeFilter.java
[startElement]:212) - processing include ...
2008-05-13 20:39:12,415 [P1-15] DEBUG (XIncludeFilter.java
[processXInclude]:268) - found href="/db/frus/includes/header.xq"
2008-05-13 20:39:12,420 [P1-15] DEBUG (XQueryContext.java
[importModule]:1849) - Module http://exist-db.org/xquery/request
already present.
2008-05-13 20:39:12,435 [P1-15] DEBUG (XQuery.java [compile]:163) -
Query diagnostics:
2008-05-13 20:39:12,436 [P1-15] DEBUG (XQuery.java [compile]:169) -
Compilation took 20 ms
2008-05-13 20:39:12,437 [P1-15] INFO  (XIncludeFilter.java
[processXInclude]:389) - xpointer query: (
2008-05-13 20:39:12,438 [P1-15] DEBUG (XQuery.java [execute]:222) -
Execution took 1 ms
2008-05-13 20:39:12,438 [P1-15] DEBUG (HTTPUtils.java
[addLastModifiedHeader]:61) - mostRecentDocumentTime: 0
2008-05-13 20:39:12,439 [P1-15] DEBUG (XIncludeFilter.java
[processXInclude]:394) - xpointer found: 5
2008-05-13 20:39:12,443 [P1-15] DEBUG (XIncludeFilter.java
[startElement]:212) - processing include ...
2008-05-13 20:39:12,443 [P1-15] DEBUG (XIncludeFilter.java
[processXInclude]:268) - found href="/db/frus/includes/footer.xq"
2008-05-13 20:39:12,447 [P1-15] DEBUG (XQueryContext.java
[importModule]:1849) - Module http://exist-db.org/xquery/request
already present.
2008-05-13 20:39:12,447 [P1-15] DEBUG (XQuery.java [compile]:163) -
Query diagnostics:
2008-05-13 20:39:12,448 [P1-15] DEBUG (XQuery.java [compile]:169) -
Compilation took 4 ms
2008-05-13 20:39:12,448 [P1-15] INFO  (XIncludeFilter.java
[processXInclude]:389) - xpointer query: (
2008-05-13 20:39:12,449 [P1-15] DEBUG (XQuery.java [execute]:222) -
Execution took 0 ms
2008-05-13 20:39:12,450 [P1-15] DEBUG (HTTPUtils.java
[addLastModifiedHeader]:61) - mostRecentDocumentTime: 0
2008-05-13 20:39:12,450 [P1-15] DEBUG (XIncludeFilter.java
[processXInclude]:394) - xpointer found: 3
2008-05-13 20:39:12,456 [P1-15] DEBUG (RESTServer.java [doGet]:271) -
stylesheet = null
2008-05-13 20:39:12,458 [P1-15] DEBUG (RESTServer.java [doGet]:272) -
query = null
2008-05-13 20:39:12,469 [P1-15] DEBUG (RESTServer.java [doGet]:271) -
stylesheet = null
2008-05-13 20:39:12,469 [P1-15] DEBUG (RESTServer.java [doGet]:272) -
query = null
2008-05-13 20:39:12,470 [P1-19] DEBUG (TextSearchEngine.java
[<init>]:112) - using tokenizer:
org.exist.storage.analysis.SimpleTokenizer
2008-05-13 20:39:12,470 [P1-19] DEBUG (NativeBroker.java [<init>]:167)
- Initializing broker 8453122
2008-05-13 20:39:12,474 [P1-19] DEBUG (BrokerPool.java
[createBroker]:1068) - created broker
'org.exist.storage.NativeBroker_exist_2 for database instance 'exist'
2008-05-13 20:39:12,474 [P1-19] DEBUG (RESTServer.java [doGet]:271) -
stylesheet = null
2008-05-13 20:39:12,474 [P1-19] DEBUG (RESTServer.java [doGet]:272) -
query = null
2008-05-13 20:39:12,475 [P1-15] DEBUG (RESTServer.java [doGet]:271) -
stylesheet = null
2008-05-13 20:39:12,475 [P1-15] DEBUG (RESTServer.java [doGet]:272) -
query = null
2008-05-13 20:39:12,497 [P1-15] DEBUG (RESTServer.java [doGet]:271) -
stylesheet = null
2008-05-13 20:39:12,497 [P1-15] DEBUG (RESTServer.java [doGet]:272) -
query = null
2008-05-13 20:39:12,498 [P1-15] DEBUG (RESTServer.java [doGet]:271) -
stylesheet = null
2008-05-13 20:39:12,498 [P1-15] DEBUG (RESTServer.java [doGet]:272) -
query = null
2008-05-13 20:39:12,499 [P1-15] DEBUG (RESTServer.java [doGet]:271) -
stylesheet = null
2008-05-13 20:39:12,499 [P1-15] DEBUG (RESTServer.java [doGet]:272) -
query = null
2008-05-13 20:39:12,500 [P1-15] DEBUG (RESTServer.java [doGet]:271) -
stylesheet = null
2008-05-13 20:39:12,500 [P1-15] DEBUG (RESTServer.java [doGet]:272) -
query = null
2008-05-13 20:39:12,501 [P1-15] DEBUG (RESTServer.java [doGet]:271) -
stylesheet = null
2008-05-13 20:39:12,501 [P1-15] DEBUG (RESTServer.java [doGet]:272) -
query = null
2008-05-13 20:39:12,503 [P1-15] DEBUG (RESTServer.java [doGet]:271) -
stylesheet = null
2008-05-13 20:39:12,503 [P1-15] DEBUG (RESTServer.java [doGet]:272) -
query = null
2008-05-13 20:39:12,504 [P1-15] DEBUG (RESTServer.java [doGet]:271) -
stylesheet = null
2008-05-13 20:39:12,504 [P1-15] DEBUG (RESTServer.java [doGet]:272) -
query = null
2008-05-13 20:39:12,505 [P1-19] DEBUG (RESTServer.java [doGet]:271) -
stylesheet = null
2008-05-13 20:39:12,505 [P1-19] DEBUG (RESTServer.java [doGet]:272) -
query = null
2008-05-13 20:39:12,505 [P1-15] DEBUG (RESTServer.java [doGet]:271) -
stylesheet = null
2008-05-13 20:39:12,505 [P1-15] DEBUG (RESTServer.java [doGet]:272) -
query = null
2008-05-13 20:39:12,506 [P1-19] DEBUG (RESTServer.java [doGet]:271) -
stylesheet = null
2008-05-13 20:39:12,506 [P1-19] DEBUG (RESTServer.java [doGet]:272) -
query = null

This file is very simple, basically:

declare namespace xi="http://www.w3.org/2001/XInclude";
declare option exist:serialize "method=xhtml media-type=text/html";
declare variable $sitename := "Site Name";
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>{$sitename}</title>
    <link rel="stylesheet" type="text/css" href="css/styles.css"/>
</head>
<body id="index">
    <div id="wrapper">
    <xi:include href="/db/frus/includes/header.xq" />
    <div id="maincontent">
        <p>...</p>
    </div>
    <xi:include href="/db/frus/includes/footer.xq" />
    </div>
</body>

On Tue, May 13, 2008 at 2:24 AM, Dannes Wessels <dizzzz@...> wrote:

> Hi,
>
>
> On Tue, May 13, 2008 at 2:35 AM, Joe Wicentowski <joewiz@...> wrote:
> > I'm writing with a question that is puzzling me.
>
> Strange. Please could you check the exist.log file? Are there any hints
> likeExceptions ?
> What message in reported together with this 400 code (there should be a
> text)
>
> regards
>
> Dannes
>
> --
> # Dannes Wessels # The Netherlands #

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Exist-open mailing list
Exist-open@...
https://lists.sourceforge.net/lists/listinfo/exist-open

Re: Error 400 after update, solved by querying Function Library

by Joe Wicentowski :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

p.s. The last line of the HTML didn't make it into the message:

</html>

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Exist-open mailing list
Exist-open@...
https://lists.sourceforge.net/lists/listinfo/exist-open

Re: Error 400 after update, solved by querying Function Library

by Dannes Wessels-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

On Wed, May 14, 2008 at 2:51 AM, Joe Wicentowski <joewiz@...> wrote:

>  First, the 400 code says:
>    HTTP ERROR: 400
>    Error while serializing xml: java.lang.NullPointerException
>    RequestURI=/exist/rest/db/frus/index.xq
>    Powered by Jetty://

Hmmm this NPE is something what never should happen. Strangely the log
does not give any clues on this.
>  2008-05-13 20:39:12,474 [P1-19] DEBUG (RESTServer.java [doGet]:271) -
>  stylesheet = null
>  2008-05-13 20:39:12,474 [P1-19] DEBUG (RESTServer.java [doGet]:272) -
>  query = null

(many times)

>  This file is very simple, basically:
>  declare namespace xi="http://www.w3.org/2001/XInclude";
>     <xi:include href="/db/frus/includes/header.xq" />
>     <xi:include href="/db/frus/includes/footer.xq" />

hmmmm maybe the xincludefilter has a problem here. Are these files
actually there? do they have circular references?

regards

Dannes

--
# Dannes Wessels # The Netherlands #

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Exist-open mailing list
Exist-open@...
https://lists.sourceforge.net/lists/listinfo/exist-open

Re: Error 400 after update, solved by querying Function Library

by Joe Wicentowski :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Dannes,

I've responded to your suggestions below.  (A disclaimer: Thanks again
for your help.  I wouldn't be continuing to ask the list if I didn't
think there might be an eXist bug at the bottom of this, since it is
puzzling that my page would only work after opening up a built-in
page.  Perhaps my coding is at fault here, but I hope this ends up
exposing an otherwise unknown issue for the eXist developer & user
community.)  Here are my findings:

I inspected the included files (header.xq and footer.xq) and found no
circular references; I did find two get-parameter calls that were no
longer necessary, so I removed those.  I also noticed that both files
lacked a 'serialize as xhtml' declaration, so I added that.  (Is that
necessary to add to included .xq files if the file that calls them
already has this declaration?)  Also, for your information, all 3
files (index.xq, header.xq, footer.xq) validate in oXygen's
eXist-based XQuery validator.

After these changes and repeating my experiment (deleting the
collection and re-uploading it), the log file now shows the following
when I call up index.xq:

2008-05-14 19:39:14,294 [P1-2] DEBUG (RESTServer.java [doGet]:271) -
stylesheet = null
2008-05-14 19:39:14,294 [P1-2] DEBUG (RESTServer.java [doGet]:272) -
query = null
2008-05-14 19:39:14,294 [P1-2] DEBUG (XQueryContext.java
[checkOptions]:2439) - Setting serialization property from pragma:
method = xhtml
2008-05-14 19:39:14,294 [P1-2] DEBUG (XQueryContext.java
[checkOptions]:2439) - Setting serialization property from pragma:
media-type = text/html
2008-05-14 19:39:14,305 [P1-2] DEBUG (XQuery.java [execute]:222) -
Execution took 10 ms
2008-05-14 19:39:14,305 [P1-2] DEBUG (HTTPUtils.java
[addLastModifiedHeader]:61) - mostRecentDocumentTime: 0
2008-05-14 19:39:14,306 [P1-2] DEBUG (XIncludeFilter.java
[startElement]:212) - processing include ...
2008-05-14 19:39:14,306 [P1-2] DEBUG (XIncludeFilter.java
[processXInclude]:268) - found href="/db/frus/includes/header.xq"
2008-05-14 19:39:14,307 [P1-2] WARN  (RESTServer.java [printResults]:1195) -
java.lang.NullPointerException
        at org.exist.storage.serializers.XIncludeFilter.processXInclude(XIncludeFilter.java:365)
        at org.exist.storage.serializers.XIncludeFilter.startElement(XIncludeFilter.java:214)
        at org.exist.memtree.DocumentImpl.startNode(DocumentImpl.java:933)
        at org.exist.memtree.DocumentImpl.streamTo(DocumentImpl.java:875)
        at org.exist.memtree.NodeImpl.streamTo(NodeImpl.java:635)
        at org.exist.storage.serializers.Serializer.serializeToReceiver(Serializer.java:871)
        at org.exist.storage.serializers.Serializer.serializeToReceiver(Serializer.java:864)
        at org.exist.storage.serializers.Serializer.toSAX(Serializer.java:819)
        at org.exist.http.RESTServer.printResults(RESTServer.java:1186)
        at org.exist.http.RESTServer.executeXQuery(RESTServer.java:987)
        at org.exist.http.RESTServer.doGet(RESTServer.java:309)
        at org.exist.http.servlets.EXistServlet.doGet(EXistServlet.java:316)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
        at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:428)
        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:1530)
        at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:633)
        at org.mortbay.http.HttpContext.handle(HttpContext.java:1482)
        at org.mortbay.http.HttpServer.service(HttpServer.java:909)
        at org.mortbay.http.HttpConnection.service(HttpConnection.java:820)
        at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:986)
        at org.mortbay.http.HttpConnection.handle(HttpConnection.java:837)
        at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:245)
        at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357)
        at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)

Then I began to do my workaround -- opening up the
xquery/functions.xq.  But as soon as I opened up the exist/index.xml,
my page began displaying properly.  Here is the log for the display of
exist/index.xml:

2008-05-14 19:47:37,216 [P1-13] INFO  (XQueryServlet.java [init]:135)
- form-encoding = UTF-8
2008-05-14 19:47:37,216 [P1-13] INFO  (XQueryServlet.java [init]:139)
- container-encoding = UTF-8
2008-05-14 19:47:37,216 [P1-13] INFO  (XQueryServlet.java [init]:143)
- encoding = UTF-8
2008-05-14 19:47:37,269 [P1-13] DEBUG (XQuery.java [compile]:163) -
Query diagnostics:

declare variable $atom:server <5> {
    "http://atomic.exist-db.org"
}


declare variable $atom:uri <6> {
    concat($atom:server, "/atom/summary/wiki/blogs/eXist/")
}

let  <26>
    $uri := $atom:uri cast as xs:anyURI,
    let  <27>
        $response := doc(untyped-value-check[xs:string, $uri])
    return
        atom:format-entry($response/child::atom:feed)
2008-05-14 19:47:37,269 [P1-13] DEBUG (XQuery.java [compile]:169) -
Compilation took 14 ms
2008-05-14 19:47:38,373 [P1-13] DEBUG (NativeBroker.java
[getOrCreateCollection]:600) - Creating collection
'/db/system/temp'...
2008-05-14 19:47:38,396 [P1-13] DEBUG (XQueryContext.java
[storeTemporaryDoc]:2133) - Stored: 941:
/db/system/temp/c813cf857969e8764b0ed5b64f7d88df.xml
2008-05-14 19:47:38,411 [P1-13] DEBUG (XQuery.java [execute]:222) -
Execution took 1,141 ms
2008-05-14 19:47:38,412 [P1-13] DEBUG (HTTPUtils.java
[addLastModifiedHeader]:61) - mostRecentDocumentTime: 0

And here is the log for the display of my index.xq (sorry this is long):

2008-05-14 19:48:24,783 [P1-13] DEBUG (RESTServer.java [doGet]:271) -
stylesheet = null
2008-05-14 19:48:24,783 [P1-13] DEBUG (RESTServer.java [doGet]:272) -
query = null
2008-05-14 19:48:24,801 [P1-13] DEBUG (XQuery.java [compile]:165) -
Query diagnostics:
[skipped: more than 150 expressions]
2008-05-14 19:48:24,802 [P1-13] DEBUG (XQuery.java [compile]:169) -
Compilation took 18 ms
2008-05-14 19:48:24,802 [P1-13] DEBUG (XQueryContext.java
[checkOptions]:2439) - Setting serialization property from pragma:
method = xhtml
2008-05-14 19:48:24,805 [P1-13] DEBUG (XQueryContext.java
[checkOptions]:2439) - Setting serialization property from pragma:
media-type = text/html
2008-05-14 19:48:24,810 [P1-13] DEBUG (XQuery.java [execute]:222) -
Execution took 5 ms
2008-05-14 19:48:24,811 [P1-13] DEBUG (HTTPUtils.java
[addLastModifiedHeader]:61) - mostRecentDocumentTime: 0
2008-05-14 19:48:24,811 [P1-13] DEBUG (XIncludeFilter.java
[startElement]:212) - processing include ...
2008-05-14 19:48:24,811 [P1-13] DEBUG (XIncludeFilter.java
[processXInclude]:268) - found href="/db/frus/includes/header.xq"
2008-05-14 19:48:24,816 [P1-13] DEBUG (XQuery.java [compile]:165) -
Query diagnostics:
[skipped: more than 150 expressions]
2008-05-14 19:48:24,816 [P1-13] DEBUG (XQuery.java [compile]:169) -
Compilation took 4 ms
2008-05-14 19:48:24,817 [P1-13] INFO  (XIncludeFilter.java
[processXInclude]:389) - xpointer query: [[[[code removed by joe!]]]]
2008-05-14 19:48:24,818 [P1-13] DEBUG (XQuery.java [execute]:222) -
Execution took 1 ms
2008-05-14 19:48:24,818 [P1-13] DEBUG (HTTPUtils.java
[addLastModifiedHeader]:61) - mostRecentDocumentTime: 0
2008-05-14 19:48:24,819 [P1-13] DEBUG (XIncludeFilter.java
[processXInclude]:394) - xpointer found: 5
2008-05-14 19:48:24,824 [P1-13] DEBUG (XIncludeFilter.java
[startElement]:212) - processing include ...
2008-05-14 19:48:24,824 [P1-13] DEBUG (XIncludeFilter.java
[processXInclude]:268) - found href="/db/frus/includes/footer.xq"
2008-05-14 19:48:24,834 [P1-13] DEBUG (XQuery.java [compile]:163) -
Query diagnostics: [[[[code removed by joe!]]]]
2008-05-14 19:48:24,835 [P1-13] DEBUG (XQuery.java [compile]:169) -
Compilation took 10 ms
2008-05-14 19:48:24,835 [P1-13] INFO  (XIncludeFilter.java
[processXInclude]:389) - xpointer query: [[[[code removed by joe!]]]]
2008-05-14 19:48:24,836 [P1-13] DEBUG (XQuery.java [execute]:222) -
Execution took 1 ms
2008-05-14 19:48:24,836 [P1-13] DEBUG (HTTPUtils.java
[addLastModifiedHeader]:61) - mostRecentDocumentTime: 0
2008-05-14 19:48:24,837 [P1-13] DEBUG (XIncludeFilter.java
[processXInclude]:394) - xpointer found: 3
2008-05-14 19:48:24,842 [P1-13] DEBUG (RESTServer.java [doGet]:271) -
stylesheet = null
2008-05-14 19:48:24,842 [P1-13] DEBUG (RESTServer.java [doGet]:272) -
query = null
2008-05-14 19:48:24,860 [P1-13] DEBUG (RESTServer.java [doGet]:271) -
stylesheet = null
2008-05-14 19:48:24,861 [P1-13] DEBUG (RESTServer.java [doGet]:272) -
query = null
2008-05-14 19:48:24,862 [P1-13] DEBUG (RESTServer.java [doGet]:271) -
stylesheet = null
2008-05-14 19:48:24,862 [P1-13] DEBUG (RESTServer.java [doGet]:272) -
query = null
2008-05-14 19:48:24,864 [P1-15] DEBUG (RESTServer.java [doGet]:271) -
stylesheet = null
2008-05-14 19:48:24,864 [P1-15] DEBUG (RESTServer.java [doGet]:272) -
query = null
2008-05-14 19:48:24,886 [P1-13] DEBUG (RESTServer.java [doGet]:271) -
stylesheet = null
2008-05-14 19:48:24,888 [P1-13] DEBUG (RESTServer.java [doGet]:272) -
query = null
2008-05-14 19:48:24,889 [P1-13] DEBUG (RESTServer.java [doGet]:271) -
stylesheet = null
2008-05-14 19:48:24,890 [P1-13] DEBUG (RESTServer.java [doGet]:272) -
query = null
2008-05-14 19:48:24,891 [P1-13] DEBUG (RESTServer.java [doGet]:271) -
stylesheet = null
2008-05-14 19:48:24,891 [P1-13] DEBUG (RESTServer.java [doGet]:272) -
query = null
2008-05-14 19:48:24,891 [P1-13] DEBUG (RESTServer.java [doGet]:271) -
stylesheet = null
2008-05-14 19:48:24,892 [P1-13] DEBUG (RESTServer.java [doGet]:272) -
query = null
2008-05-14 19:48:24,893 [P1-13] DEBUG (RESTServer.java [doGet]:271) -
stylesheet = null
2008-05-14 19:48:24,893 [P1-13] DEBUG (RESTServer.java [doGet]:272) -
query = null
2008-05-14 19:48:24,894 [P1-15] DEBUG (TextSearchEngine.java
[<init>]:112) - using tokenizer:
org.exist.storage.analysis.SimpleTokenizer
2008-05-14 19:48:24,894 [P1-15] DEBUG (NativeBroker.java [<init>]:167)
- Initializing broker 14036251
2008-05-14 19:48:24,895 [P1-15] DEBUG (BrokerPool.java
[createBroker]:1068) - created broker
'org.exist.storage.NativeBroker_exist_2 for database instance 'exist'
2008-05-14 19:48:24,895 [P1-15] DEBUG (RESTServer.java [doGet]:271) -
stylesheet = null
2008-05-14 19:48:24,895 [P1-15] DEBUG (RESTServer.java [doGet]:272) -
query = null
2008-05-14 19:48:24,896 [P1-13] DEBUG (RESTServer.java [doGet]:271) -
stylesheet = null
2008-05-14 19:48:24,896 [P1-13] DEBUG (RESTServer.java [doGet]:272) -
query = null
2008-05-14 19:48:24,901 [P1-13] DEBUG (RESTServer.java [doGet]:271) -
stylesheet = null
2008-05-14 19:48:24,901 [P1-13] DEBUG (RESTServer.java [doGet]:272) -
query = null
2008-05-14 19:48:24,902 [P1-13] DEBUG (RESTServer.java [doGet]:271) -
stylesheet = null
2008-05-14 19:48:24,902 [P1-13] DEBUG (RESTServer.java [doGet]:272) -
query = null
2008-05-14 19:48:24,904 [P1-15] DEBUG (RESTServer.java [doGet]:271) -
stylesheet = null
2008-05-14 19:48:24,905 [P1-15] DEBUG (RESTServer.java [doGet]:272) -
query = null

Thanks very much for any ideas you have,
Joe


On Wed, May 14, 2008 at 1:42 AM, Dannes Wessels <dizzzz@...> wrote:

> Hi,
>
> On Wed, May 14, 2008 at 2:51 AM, Joe Wicentowski <joewiz@...> wrote:
>
>>  First, the 400 code says:
>>    HTTP ERROR: 400
>>    Error while serializing xml: java.lang.NullPointerException
>>    RequestURI=/exist/rest/db/frus/index.xq
>>    Powered by Jetty://
>
> Hmmm this NPE is something what never should happen. Strangely the log
> does not give any clues on this.
>>  2008-05-13 20:39:12,474 [P1-19] DEBUG (RESTServer.java [doGet]:271) -
>>  stylesheet = null
>>  2008-05-13 20:39:12,474 [P1-19] DEBUG (RESTServer.java [doGet]:272) -
>>  query = null
>
> (many times)
>
>>  This file is very simple, basically:
>>  declare namespace xi="http://www.w3.org/2001/XInclude";
>>     <xi:include href="/db/frus/includes/header.xq" />
>>     <xi:include href="/db/frus/includes/footer.xq" />
>
> hmmmm maybe the xincludefilter has a problem here. Are these files
> actually there? do they have circular references?
>
> regards
>
> Dannes
>
> --
> # Dannes Wessels # The Netherlands #
>

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Exist-open mailing list
Exist-open@...
https://lists.sourceforge.net/lists/listinfo/exist-open

Re: Error 400 after update, solved by querying Function Library

by Dannes Wessels-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Joe,

On Thu, May 15, 2008 at 2:12 AM, Joe Wicentowski <joewiz@...> wrote:

> 2008-05-14 19:39:14,294 [P1-2] DEBUG (XQueryContext.java
> [checkOptions]:2439) - Setting serialization property from pragma: method = xhtml
> 2008-05-14 19:39:14,294 [P1-2] DEBUG (XQueryContext.java
> [checkOptions]:2439) - Setting serialization property from pragma: media-type = text/html
> 2008-05-14 19:39:14,305 [P1-2] DEBUG (XQuery.java [execute]:222) - Execution took 10 ms
> 2008-05-14 19:39:14,305 [P1-2] DEBUG (HTTPUtils.java [addLastModifiedHeader]:61) - mostRecentDocumentTime: 0
> 2008-05-14 19:39:14,306 [P1-2] DEBUG (XIncludeFilter.java [startElement]:212) - processing include ...
> 2008-05-14 19:39:14,306 [P1-2] DEBUG (XIncludeFilter.java [processXInclude]:268) - found href="/db/frus/includes/header.xq"
> 2008-05-14 19:39:14,307 [P1-2] WARN  (RESTServer.java [printResults]:1195) - java.lang.NullPointerException
>        at org.exist.storage.serializers.XIncludeFilter.processXInclude(XIncludeFilter.java:365)
>        at org.exist.storage.serializers.XIncludeFilter.startElement(XIncludeFilter.java:214)
>        at org.exist.memtree.DocumentImpl.startNode(DocumentImpl.java:933)
>        at org.exist.memtree.DocumentImpl.streamTo(DocumentImpl.java:875)
>        at org.exist.memtree.NodeImpl.streamTo(NodeImpl.java:635)
>        at org.exist.storage.serializers.Serializer.serializeToReceiver(Serializer.java:871)
>        at org.exist.storage.serializers.Serializer.serializeToReceiver(Serializer.java:864)
>        at org.exist.storage.serializers.Serializer.toSAX(Serializer.java:819)
>        at org.exist.http.RESTServer.printResults(RESTServer.java:1186)
>        at org.exist.http.RESTServer.executeXQuery(RESTServer.java:987)
>        at org.exist.http.RESTServer.doGet(RESTServer.java:309)
>        at org.exist.http.servlets.EXistServlet.doGet(EXistServlet.java:316)

Thnx for making some additional investigations. I think you have
isolated the issue in the code; a NPE should never occur.

regards

Dannes

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Exist-open mailing list
Exist-open@...
https://lists.sourceforge.net/lists/listinfo/exist-open

Re: Error 400 after update, solved by querying Function Library

by Dannes Wessels-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

These are the conflicting lines:

                //TODO: change these to putting the XmldbURI in, but
we need to warn users!
                context.declareVariable("xinclude:current-doc",
document.getFileURI().toString());
                context.declareVariable("xinclude:current-collection",
document.getCollection().getURI().toString());

so either document==null or getFileURI() returns null...... hmmmmmm let's debug.

cheers

D.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Exist-open mailing list
Exist-open@...
https://lists.sourceforge.net/lists/listinfo/exist-open

Parent Message unknown Re: Error 400 after update, solved by querying Function Library

by Dannes Wessels-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Joe,

On Wed, May 21, 2008 at 5:00 AM, Joe Wicentowski <joewiz@...> wrote:
> Thank you!  I just built revision 7782 from SVN, and I repeatedly
> deleted and reuploaded my collection.  No more nasty Error 400s or
> warnings in the log!

good to hear!

> Way to nip the bug in the bud.  Do you think this bug fix will make it
> into 1.2.2?

Absolutely, but first I'd like to consult Wolfgang for this patch,
because I don't understand the role of the null value here.....

regards

Dannes

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Exist-open mailing list
Exist-open@...
https://lists.sourceforge.net/lists/listinfo/exist-open