From: Tobias W. <li...@o2...> - 2005-01-07 10:55:04
|
Hi all, I posted previously on this matter. I'm updating eXist using XUpdate queries. Whenever I send content containing xml entities (&aumml;, + etc.) I will sooner or later get exceptions when loading this content from the database again (without restarting it). The error is org.xmldb.api.base.XMLDBException at org.exist.xmldb.LocalXPathQueryService.execute(LocalXPathQueryService.java:3 46) at org.exist.xmldb.LocalXPathQueryService.execute(LocalXPathQueryService.java:1 31) etc. Caused by: java.lang.NullPointerException at org.exist.xquery.GeneralComparison.quickNodeSetCompare(GeneralComparison.jav a:305) at org.exist.xquery.GeneralComparison.eval(GeneralComparison.java:165) at org.exist.xquery.AbstractExpression.eval(AbstractExpression.java:43) at org.exist.xquery.PathExpr.eval(PathExpr.java:166) at org.exist.xquery.OpAnd.eval(OpAnd.java:57) at org.exist.xquery.AbstractExpression.eval(AbstractExpression.java:43) at org.exist.xquery.PathExpr.eval(PathExpr.java:166) at org.exist.xquery.Predicate.selectByNodeSet(Predicate.java:150) at org.exist.xquery.Predicate.evalPredicate(Predicate.java:111) at org.exist.xquery.LocationStep.applyPredicate(LocationStep.java:103) at org.exist.xquery.LocationStep.eval(LocationStep.java:186) at org.exist.xquery.AbstractExpression.eval(AbstractExpression.java:43) etc. I am trying very hard to provide a junit test for this, but I am unable to reproduce it on a regular basis although I am tracking this issue for weeks now. The things I observed so far are: [1] I send the content using <test><![CDATA[x&z]]></test> sections and end up with <test>x&y</test> in the database (observed with the graphical eXist client). [2] Whenever such pages are inserted into and then loaded from the database, the above exception occurs sooner or later. Sometimes I do some more updates before the exception occurs, sometimes the first reload operation already fails. [3] The error is *not* observed if I restart eXist and then load the page. So in my opinion, there must be an error somewhere in the virtual node representation only, potentially created by the xupdate query. I am completely clueless on how to proceed. I tried various ways to work around the xupdate wihtout success. However, I somehow must succeed in storing such entities. If anybody has *any* idea, please do not hesitate to advise me. Thank you very much, Tobias |