From: Andrzej J. T. <an...@ch...> - 2010-06-30 21:18:11
|
We had an XQuery running as a scheduled task and got this NPE: java.lang.NullPointerException at org.exist.stax.EmbeddedXMLStreamReader.verifyOriginNodeId(EmbeddedXMLStreamReader.java:250) at org.exist.stax.EmbeddedXMLStreamReader.next(EmbeddedXMLStreamReader.java:240) at org.exist.dom.VirtualNodeSet.addChildren(VirtualNodeSet.java:503) at org.exist.dom.VirtualNodeSet.getNodes(VirtualNodeSet.java:449) at org.exist.dom.VirtualNodeSet.realize(VirtualNodeSet.java:567) at org.exist.dom.VirtualNodeSet.getLength(VirtualNodeSet.java:736) at org.exist.dom.VirtualNodeSet.isEmpty(VirtualNodeSet.java:646) at org.exist.xquery.Atomize.atomize(Atomize.java:75) at org.exist.xquery.Atomize.eval(Atomize.java:66) at org.exist.xquery.CastExpression.eval(CastExpression.java:95) at org.exist.xquery.AbstractExpression.eval(AbstractExpression.java:61) at org.exist.xquery.PathExpr.eval(PathExpr.java:241) at org.exist.xquery.UserDefinedFunction.eval(UserDefinedFunction.java:137) at org.exist.xquery.DynamicCardinalityCheck.eval(DynamicCardinalityCheck.java:71) at org.exist.xquery.UntypedValueCheck.eval(UntypedValueCheck.java:82) at org.exist.xquery.FunctionCall.evalFunction(FunctionCall.java:274) at org.exist.xquery.FunctionCall.eval(FunctionCall.java:201) at org.exist.xquery.GeneralComparison.genericCompare(GeneralComparison.java:501) at org.exist.xquery.GeneralComparison.genericCompare(GeneralComparison.java:494) at org.exist.xquery.GeneralComparison.eval(GeneralComparison.java:449) at org.exist.xquery.AbstractExpression.eval(AbstractExpression.java:61) Any ideas what might be causing this offhand? I'll dig into the code shortly to see what it might have been doing... Thanks! -- Andrzej Taramina Chaeron Corporation: Enterprise System Solutions http://www.chaeron.com |
From: Wolfgang M. <wol...@ex...> - 2010-06-30 21:17:20
|
> java.lang.NullPointerException > at org.exist.stax.EmbeddedXMLStreamReader.verifyOriginNodeId(EmbeddedXMLStreamReader.java:250) It looks like some inconsistency in the persistent DOM of the document. I would suggest to run the consistency checker to see if it reports any issues. Wolfgang |
From: Andrzej J. T. <an...@ch...> - 2010-06-30 21:56:33
|
Wolfgang: > It looks like some inconsistency in the persistent DOM of the > document. I would suggest to run the consistency checker to see if it > reports any issues. OK....can you remind me where the info is on how to run the consistency checker? Thanks! -- Andrzej Taramina Chaeron Corporation: Enterprise System Solutions http://www.chaeron.com |
From: Wolfgang M. <wol...@ex...> - 2010-06-30 21:27:54
|
> OK....can you remind me where the info is on how to run the consistency checker? The consistency checker is part of the emergency export toolbox: http://exist-db.org/backup.html#N10317 Wolfgang |
From: Andrzej J. T. <an...@ch...> - 2010-07-01 18:16:31
|
Wolfgang: >> java.lang.NullPointerException >> at org.exist.stax.EmbeddedXMLStreamReader.verifyOriginNodeId(EmbeddedXMLStreamReader.java:250) > > It looks like some inconsistency in the persistent DOM of the > document. I would suggest to run the consistency checker to see if it > reports any issues. I reran the batch job (XQuery fired by scheduler), which is a big reporting job that takes quite a while to run, and this time it ran without throwing the exception. Makes me wonder if it might have been a transient, concurrency related thing? It's a production system, so I don't really want to shut it down and run the consistency checker. I'll run a backup and see if that works OK first...since that will tell me if the whole db is OK or not. Weird! -- Andrzej Taramina Chaeron Corporation: Enterprise System Solutions http://www.chaeron.com |
From: Andrzej J. T. <an...@ch...> - 2010-07-19 18:27:36
|
Wolfgang: > java.lang.NullPointerException > at org.exist.stax.EmbeddedXMLStreamReader.verifyOriginNodeId(EmbeddedXMLStreamReader.java:250) > at org.exist.stax.EmbeddedXMLStreamReader.next(EmbeddedXMLStreamReader.java:240) > at org.exist.dom.VirtualNodeSet.addChildren(VirtualNodeSet.java:503) > at org.exist.dom.VirtualNodeSet.getNodes(VirtualNodeSet.java:449) > at org.exist.dom.VirtualNodeSet.realize(VirtualNodeSet.java:567) > at org.exist.dom.VirtualNodeSet.getLength(VirtualNodeSet.java:736) > at org.exist.dom.VirtualNodeSet.isEmpty(VirtualNodeSet.java:646) > at org.exist.xquery.Atomize.atomize(Atomize.java:75) > at org.exist.xquery.Atomize.eval(Atomize.java:66) > at org.exist.xquery.CastExpression.eval(CastExpression.java:95) > at org.exist.xquery.AbstractExpression.eval(AbstractExpression.java:61) > at org.exist.xquery.PathExpr.eval(PathExpr.java:241) > at org.exist.xquery.UserDefinedFunction.eval(UserDefinedFunction.java:137) > at org.exist.xquery.DynamicCardinalityCheck.eval(DynamicCardinalityCheck.java:71) > at org.exist.xquery.UntypedValueCheck.eval(UntypedValueCheck.java:82) > at org.exist.xquery.FunctionCall.evalFunction(FunctionCall.java:274) > at org.exist.xquery.FunctionCall.eval(FunctionCall.java:201) > at org.exist.xquery.GeneralComparison.genericCompare(GeneralComparison.java:501) > at org.exist.xquery.GeneralComparison.genericCompare(GeneralComparison.java:494) > at org.exist.xquery.GeneralComparison.eval(GeneralComparison.java:449) > at org.exist.xquery.AbstractExpression.eval(AbstractExpression.java:61) > > It looks like some inconsistency in the persistent DOM of the > document. I would suggest to run the consistency checker to see if it > reports any issues. I don't think it's a persistent DOM problem...for a couple of reasons: 1) Rerunning the exact same job, that traverses the identical data, does not consistently throw this exception. If there was a DOM issue, I think it would die consistently, non? 2) Looking at the code where it died, the line in EmbeddedXMLStreamReader.verifyOriginNodeId() that NPE'ed is: origin.setInternalAddress(StoredNode.UNKNOWN_NODE_IMPL_ADDRESS); but the two lines before that are: if (!nodeId.equals(origin.getNodeId())) { LOG.warn("expected node id " + origin.getNodeId() + ", got " + nodeId + "; resyncing address"); the only way for line 250 to NPE would be if origin was null. But if origin was null, then it should have NPE'ed in the if or LOG statements first! The conclusion is that there is a concurrency issue somewhere....and orgin was changed from a valid value to null by another thread sometime between the LOG statement and before line 250. Any thoughts or ideas? Thanks! -- Andrzej Taramina Chaeron Corporation: Enterprise System Solutions http://www.chaeron.com |