DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22331>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22331 NullPointerException in ValueIndexer ------- Additional Comments From [EMAIL PROTECTED] 2003-12-12 22:23 ------- This happened while adding documents and querying collections on multiple threads (adding lots of small documents). We had to stop using Xindice for that part of our application, so I don't see it anymore (all accesses to Xindice -- much more infrequent -- are now serialized). In case it matters, the code that added documents looked like this, and was called without synchronization (under the assumption that Xindice is thread-safe): StringBuffer xml = new StringBuffer(); xml.append( "<entry timestamp='").append(timestamp).append("' " + "deviceURI='").append(deviceURI).append("' " + "deviceClass='").append(deviceClass).append("' " + "alarmURI='").append(alarmURI).append("' " + "alarmName='").append(friendlyName).append("' " + "eventTypeID='").append(eventTypeID); if (principal != null) { xml.append("' user='").append(principal); } xml.append("'><group path=\""); String path[] = desc.getPath(); for (int i=0; i<path.length; i++) { xml.append(path[i]); if (i < path.length-1) { xml.append('/'); } } xml.append("\" />" + "<extra>" + extraInfo + "</extra>" + "</entry>"); String entryName = col.createId(); Resource entry = col.createResource(entryName, "XMLResource"); entry.setContent("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" + xml.toString()); col.storeResource(entry); I couldn't isolate a pattern other than the fact that under heavy load, it was quite likely to happen. The exception is logged and ignored by ValueIndexer, but I couldn't determine why it is ignored and whether it would cause a problem. It certainly doesn't look harmless. I assume we should have a test case that tries to add (or at least index) LOTS of documents in parallel to the database and verify that no such exceptions are generated. Not quite obvious to generate a test case for a problem that doesn't always happen. I'm sorry I can't be much more specific at this point. If this doesn't help, I'll try and make the time to reproduce the problem in a simple test application.
