From: Roland C. <rol...@de...> - 2007-02-24 23:44:48
|
Hi All, When executing an XQUERY via REST service, I recently have been receiving this stack below, resulting in an Internal Server Error 500 to the REST client. I've also attached the query. It behaves normally 60% of the time. The application is moderately transactional, and it appears to only act up during peak usage where there are many updates to collections. We're using eXist-1.0.1.jar. Possilby a known issue with that version? Any thoughts or suggestions are welcomed. RC The XQUERY performs a join : xquery version "1.0"; declare namespace request="http://exist-db.org/xquery/request"; declare option exist:serialize "indent=yes"; let $date := request:request-parameter("date", "") let $query := concat("for $entries in doc('/db/ACME/SCHEDULE/", $date ,"')/acme-content/acme-event order by $entries/acme-metadata/ @acme-status-id ascending return $entries") let $hits := util:eval($query) let $s := util:eval( concat( "doc('/db/ACME/SCHEDULE/", $date, "')/ acme-content/acme-event/item" ) ) let $o := util:eval( concat( "doc('/db/ACME/RENTALS/", $date, "')/ acme-content/acme-event/item" ) ) let $intersect := ( let $common := ( for $u in ($s/item-metadata/universal-key, $o/item-metadata/ universal-key) where( ($u = $s/item-metadata/universal-key ) and ( $u = $o/item-metadata/universal-key ) ) return $u ) return ( for $key in distinct-values( $common ) return $common[. = $key][1] ) ) return <acme-content> {$hits} { for $w in ( $o ) where ( ( $intersect = $w/item-metadata/universal-key ) ) return <action-odd> {$w/item-metadata/universal-key} {$w/wagering-stats} </action-odd> }</acme-content> The stack trace : java.lang.NullPointerException at org.exist.storage.dom.DOMFile.findNode(DOMFile.java:1083) at org.exist.storage.dom.DOMFile.findNode(DOMFile.java:1084) at org.exist.storage.dom.DOMFile.findNode(DOMFile.java:1084) at org.exist.storage.dom.DOMFile.findNode(DOMFile.java:1084) at org.exist.storage.dom.DOMFile.findValue(DOMFile.java:1132) at org.exist.storage.dom.DOMFile.getNodeValue(DOMFile.java:1762) at org.exist.storage.NativeBroker$20.start(NativeBroker.java:2826) at org.exist.storage.dom.DOMTransaction.run(DOMTransaction.java:55) at org.exist.storage.NativeBroker.getNodeValue(NativeBroker.java:2824) at org.exist.dom.NodeProxy.getNodeValue(NodeProxy.java:595) at org.exist.dom.NodeProxy.atomize(NodeProxy.java:621) at org.exist.xquery.GeneralComparison.nodeSetCompare (GeneralComparison.java:333) at org.exist.xquery.GeneralComparison.quickNodeSetCompare (GeneralComparison.java:526) at org.exist.xquery.GeneralComparison.eval(GeneralComparison.java:228) at org.exist.xquery.AbstractExpression.eval(AbstractExpression.java:56) at org.exist.xquery.PathExpr.eval(PathExpr.java:216) at org.exist.xquery.AbstractExpression.eval(AbstractExpression.java:56) at org.exist.xquery.PathExpr.eval(PathExpr.java:216) at org.exist.xquery.AbstractExpression.eval(AbstractExpression.java:56) at org.exist.xquery.OpAnd.eval(OpAnd.java:72) at org.exist.xquery.AbstractExpression.eval(AbstractExpression.java:56) at org.exist.xquery.PathExpr.eval(PathExpr.java:216) at org.exist.xquery.AbstractExpression.eval(AbstractExpression.java:56) at org.exist.xquery.PathExpr.eval(PathExpr.java:216) at org.exist.xquery.AbstractExpression.eval(AbstractExpression.java:56) at org.exist.xquery.BindingExpression.applyWhereExpression (BindingExpression.java:158) at org.exist.xquery.ForExpr.eval(ForExpr.java:233) at org.exist.xquery.BindingExpression.eval(BindingExpression.java:109) at org.exist.xquery.AbstractExpression.eval(AbstractExpression.java:56) at org.exist.xquery.PathExpr.eval(PathExpr.java:216) at org.exist.xquery.AbstractExpression.eval(AbstractExpression.java:56) at org.exist.xquery.PathExpr.eval(PathExpr.java:216) at org.exist.xquery.LetExpr.eval(LetExpr.java:106) at org.exist.xquery.BindingExpression.eval(BindingExpression.java:109) at org.exist.xquery.AbstractExpression.eval(AbstractExpression.java:56) at org.exist.xquery.PathExpr.eval(PathExpr.java:216) at org.exist.xquery.AbstractExpression.eval(AbstractExpression.java:56) at org.exist.xquery.PathExpr.eval(PathExpr.java:216) at org.exist.xquery.LetExpr.eval(LetExpr.java:106) at org.exist.xquery.LetExpr.eval(LetExpr.java:152) at org.exist.xquery.LetExpr.eval(LetExpr.java:152) at org.exist.xquery.LetExpr.eval(LetExpr.java:152) at org.exist.xquery.LetExpr.eval(LetExpr.java:152) at org.exist.xquery.LetExpr.eval(LetExpr.java:152) at org.exist.xquery.BindingExpression.eval(BindingExpression.java:109) at org.exist.xquery.AbstractExpression.eval(AbstractExpression.java:56) at org.exist.xquery.PathExpr.eval(PathExpr.java:216) at org.exist.xquery.AbstractExpression.eval(AbstractExpression.java:56) at org.exist.xquery.XQuery.execute(XQuery.java:201) at org.exist.xquery.XQuery.execute(XQuery.java:171) at org.exist.http.RESTServer.executeXQuery(RESTServer.java:969) at org.exist.http.RESTServer.doGet(RESTServer.java:306) at org.exist.http.servlets.EXistServlet.doGet(EXistServlet.java:315) 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: 405) at org.mortbay.jetty.servlet.ServletHandler.dispatch (ServletHandler.java:622) at org.mortbay.jetty.servlet.ServletHandler.handle (ServletHandler.java:525) at org.mortbay.http.HttpContext.handle(HttpContext.java:1457) at org.mortbay.http.HttpContext.handle(HttpContext.java:1409) at org.mortbay.http.HttpServer.service(HttpServer.java:889) at org.mortbay.http.HttpConnection.service(HttpConnection.java:829) at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:998) at org.mortbay.http.HttpConnection.handle(HttpConnection.java:846) at org.mortbay.http.SocketListener.handleConnection (SocketListener.java:244) at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:345) at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:530) |