BAD MSG: to modify, and breaks trying to retrieve them to carry out the odifications, owing to some failure to retrieve from the collection's document cache.
Just looking at the stack trace and a little source code, I would guess there is a bug in Xindice, probably in the DocumentCache implementation, but possibly higher up in the XPathQueryResolver. My guess is that the org.apache.xindice.core.DocumentCache.CacheKey.equals needs to test for null before trying to extract parts of the two objects being compared, especially since the DocumentCache uses a WeakHashMap from which the garbage collector may delete keys at arbitrary times. This may explain the intermittency of the appearance of the bug. I don't know enough about WeakHashMaps to be authoritative, but the class documentation describes them as best suited for keys that are immutable and can be compared using ==. This is not the way that class is being used in DocumentCache, but that in itself doesn't mean that it is being misused, just that the usage should be checked. Hope this proves helpful and not misleading. Jeff ----- Original Message ----- From: "Mark J. Stang" <[EMAIL PROTECTED]> To: <[email protected]> Sent: Thursday, June 20, 2002 6:28 AM Subject: Re: sudden errors while xupdate > Is it the same query always? When it fails is the query different. > Sounds like the XPath part of your XUpdate is failing... > > Does the query work sometimes? > > Can you provide the query and the document so the list can look at it? > > thanks, > > Mark > > Jens Kumpfmueller wrote: > > > Hi *, > > > > finally i managed it to start the xindice-server. When i'm trying to do > > some xupdates (mentioned on > > http://www.xmldatabases.org/projects/XUpdate-UseCases/ ), sometimes > > everything is ok, all xupdates are done. but sometimes i got this error: > > > > java.lang.NullPointerException > > at > > org.apache.xindice.core.DocumentCache$CacheKey.equals(DocumentCache.java:171 ) > > at java.util.WeakHashMap.eq(WeakHashMap.java:256) > > at java.util.WeakHashMap.get(WeakHashMap.java:348) > > at > > org.apache.xindice.core.DocumentCache.getDocument(DocumentCache.java:79) > > at > > org.apache.xindice.core.Collection.getDocument(Collection.java:711) > > at > > org.apache.xindice.core.query.XPathQueryResolver$ResultSet.prepareNextNode(X PathQueryResolver.java:1003) > > at > > org.apache.xindice.core.query.XPathQueryResolver$ResultSet.<init>(XPathQuery Resolver.java:995) > > at > > org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.execute(XPathQue ryResolver.java:247) > > at > > org.apache.xindice.core.query.XPathQueryResolver.query(XPathQueryResolver.ja va:151) > > at > > org.apache.xindice.core.query.QueryEngine.query(QueryEngine.java:147) > > at > > org.apache.xindice.core.Collection.queryCollection(Collection.java:847) > > at > > org.apache.xindice.core.xupdate.XUpdateImpl.execute(XUpdateImpl.java:185) > > at > > org.apache.xindice.core.xupdate.XUpdateQueryResolver$XUpdateQuery.execute(XU pdateQueryResolver.java:172) > > at > > org.apache.xindice.core.xupdate.XUpdateQueryResolver.query(XUpdateQueryResol ver.java:106) > > at > > org.apache.xindice.core.query.QueryEngine.query(QueryEngine.java:147) > > at > > org.apache.xindice.core.Collection.queryCollection(Collection.java:847) > > at > > org.apache.xindice.client.corba.CollectionServant.queryCollection(Collection Servant.java:424) > > at > > org.apache.xindice.client.corba.db.CollectionPOA._invoke(CollectionPOA.java: 332) > > at org.openorb.adapter.poa.POA.dispatch(POA.java:975) > > at > > org.openorb.net.AbstractServerRequest.dispatch(AbstractServerRequest.java:75 0) > > at > > org.openorb.net.ServerManagerImpl.serve_request(ServerManagerImpl.java:1467) > > at > > org.openorb.net.ServerManagerImpl.thread_pool_main(ServerManagerImpl.java:14 10) > > at > > org.openorb.net.ServerManagerImpl.access$200(ServerManagerImpl.java:77) > > at > > org.openorb.net.ServerManagerImpl$PoolThread.run(ServerManagerImpl.java:1557 ) > > > > i'm using jdk1.4, linux suse 8.0 xindice birdday 1.0 (precompiled) > > > > thx in advance > > > > jens > > -- > Mark J Stang > Software Architect > Cybershop Systems > >
