Xindice1.1b5-dev ( built from sources) is throwing nullpointer exception while loading document, sometimes documents are loaded and sometimes I see this exception. I am using xindice in embeed mode and this happens mostly after restart. I am closing all collections and database properly before shutting down but it seems some data is still not flushed properly. there is no other exception. ElementImpl - ignored exception <java.lang.NullPointerException>java.lang.NullPointerException at org.apache.xindice.xml.dom.ElementImpl.checkLoaded(ElementImpl.java:105) at org.apache.xindice.xml.dom.NodeImpl.getPrefix(NodeImpl.java:701) at org.apache.xindice.xml.dom.NodeImpl.getNamespaceURI(NodeImpl.java:664) ...
I figure the error is because document key is present in the database but the contents are gone somehow, so while loading the document it gives a NullPointerException. Still no work around. I cant provide a test case since it seems to work sometimes and then occassionally it fails ..
I am able to create a repeatable test case now, and found a temporary work around for this as well. If I create my collections with attribute 'compresed' set to 'false' this error doesnt come. In short the test case opens the database, reads documents and adds more documents and closes DB in a loop. After 4 iterations it fails reading with a NullPointerException. There is some problem with the way namespace prefixes are handled for docs that contain namespace. My test case is built on other util classes in my project and I need to seperate that out before I can submit. Will do that soon.
Waiting for test case from Sanjay.