Re: Xindice 1.1: crash with NullPointerException
Natalia Shilenkova <[email protected]> Wed, 9 Jun 2010 21:15:17 -0400
| Newsgroups | gmane.text.xml.xindice.user |
|---|---|
| Message-ID | <[email protected]> |
Hi Olle, Looking at the exception stack trace, I would say that you've got = problem with collection symbol table. That would explain your problems = accessing all the documents.=20 I was able to reproduce exactly the same stack trace by intentionally = modifying symbol table.=20 When Xindice saves a document to the collection, the document is = compressed, which means that its element and attribute names are = replaced with generated identifiers. The information about these = identifiers saved in the collection symbol table. When retrieving the = document, Xindice looks up the identifiers and replaces them with actual = names. If it encounters identifier that cannot be found in the table... = well, that exception is what happens. I would suggest checking the symbol table first - it is just XML = document that is located in /db/system/SysSymbols collection and = document name is the same as collection path, but fragments of the path = are separated with '_' instead of '/'. So, for collection /db/a/b/c it = will be a_b_c. Check if anything looks out of place, maybe you can see = right away that some element or attribute names are missing... This is an example of symbol table for SysConfig collection: <?xml version=3D"1.0" encoding=3D"UTF-8"?> <?xindice-class org.apache.xindice.xml.SymbolTable?> <symbols> <symbol name=3D"filer" id=3D"6"/> <symbol name=3D"inline-metadata" id=3D"5"/> <symbol name=3D"compressed" id=3D"4"/> <symbol name=3D"name" id=3D"1"/> <symbol name=3D"indexes" id=3D"8"/> <symbol name=3D"class" id=3D"7"/> <symbol name=3D"collection" id=3D"2"/> <symbol name=3D"collections" id=3D"3"/> <symbol name=3D"database" id=3D"0"/> </symbols> Regards, Natalia =20 On Jun 9, 2010, at 6:43 AM, Olle Olsson wrote: > Suddenly this morning I could not access the data in Xindice ... = execution exception. >=20 > Running Xindice under Tomcat > - Apache Tomcat/5.5.27 > - Xindice 1.1 > on a Linux box >=20 > Symptoms: > - Xindice is running under Tomcat (status seen in Tomcat Web = Application Manager) > - I can open the "Xindice Ugly Debug Tool" > - I can navigate through the collection hierarchy > - I can see that all documents exist > - trying to inspect the contents of any document results in an = exception >=20 > That accessing *any* document generates that exception indicates to me = that no single content file has been corrupted. And that all document = files but no collection files have eroded, that is unlikely. >=20 > Has some core central system-oriented file been perverted? >=20 > Or is it a question of a bug in Xindice software? >=20 > As to OS access restrictions, they all look good: > -rw-rw-r--+ > except for SysAccess.tbl, SysGroups.tbl, SysObjects.tbl, and = SysUsers.tbl, that have > -rwxr--r--+ > And there is no lack of available space on the file system. >=20 >=20 > Extracts from logs reproduced below. >=20 > *Question*: > - Any hints/advise? > - are there any diagnostic tools? > - are there any repair tools? >=20 > /olle >=20 >=20 > ______________________ > localhost.2010-06-09.log >=20 > Jun 9, 2010 12:04:48 PM org.apache.catalina.core.StandardWrapperValve = invoke > SEVERE: Servlet.service() for servlet xindice threw exception > java.lang.NullPointerException > at = org.apache.xindice.xml.dom.ElementImpl.checkLoaded(ElementImpl.java:110) > at = org.apache.xindice.xml.dom.NodeImpl.getNodeName(NodeImpl.java:442) > at = org.apache.xindice.xml.dom.ElementImpl.getTagName(ElementImpl.java:244) > at org.apache.xml.serialize.XMLSerializer.serializeElement(Unknown = Source) > at = org.apache.xml.serialize.BaseMarkupSerializer.serializeNode(Unknown = Source) > at org.apache.xml.serialize.XMLSerializer.serializeElement(Unknown = Source) > at = org.apache.xml.serialize.BaseMarkupSerializer.serializeNode(Unknown = Source) > at org.apache.xml.serialize.XMLSerializer.serializeElement(Unknown = Source) > at = org.apache.xml.serialize.BaseMarkupSerializer.serializeNode(Unknown = Source) > at = org.apache.xml.serialize.BaseMarkupSerializer.serializeNode(Unknown = Source) > at org.apache.xml.serialize.BaseMarkupSerializer.serialize(Unknown = Source) > at = org.apache.xindice.server.UglyBrowser.prettyPrint(UglyBrowser.java:203) > at = org.apache.xindice.server.UglyBrowser.getDetailView(UglyBrowser.java:192) > at org.apache.xindice.server.UglyBrowser.doGet(UglyBrowser.java:82) > at = org.apache.xindice.server.XindiceServlet.doGet(XindiceServlet.java:84) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:627) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) > at = org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applicati= onFilterChain.java:269) > at = org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilter= Chain.java:188) > at = org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.= java:213) > at = org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.= java:172) > at = org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:1= 27) > at = org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:1= 17) > at = org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:548) > at = org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.ja= va:108) > at = org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174= ) > at = org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:875)= > at = org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.proces= sConnection(Http11BaseProtocol.java:665) > at = org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.j= ava:528) > at = org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollower= WorkerThread.java:81) > at = org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.j= ava:689) > at java.lang.Thread.run(Thread.java:619) >=20 > ______________________ > catalina.out (and catalina.2010-06-09.log) >=20 > Jun 9, 2010 12:04:48 PM org.apache.xindice.xml.dom.ElementImpl <init> > WARNING: ignored exception > java.lang.NullPointerException > at = org.apache.xindice.xml.dom.ElementImpl.loadAttributes(ElementImpl.java:189= ) > at = org.apache.xindice.xml.dom.ElementImpl.<init>(ElementImpl.java:66) > at = org.apache.xindice.xml.dom.ContainerNodeImpl.loadChildren(ContainerNodeImp= l.java:128) > at = org.apache.xindice.xml.dom.ElementImpl.checkLoaded(ElementImpl.java:113) > at = org.apache.xindice.xml.dom.NodeImpl.getNodeName(NodeImpl.java:442) > at = org.apache.xindice.xml.dom.ElementImpl.getTagName(ElementImpl.java:244) > at = org.apache.xml.serialize.XMLSerializer.serializeElement(Unknown Source) > at = org.apache.xml.serialize.BaseMarkupSerializer.serializeNode(Unknown = Source) > at = org.apache.xml.serialize.XMLSerializer.serializeElement(Unknown Source) > at = org.apache.xml.serialize.BaseMarkupSerializer.serializeNode(Unknown = Source) > at = org.apache.xml.serialize.BaseMarkupSerializer.serializeNode(Unknown = Source) > at = org.apache.xml.serialize.BaseMarkupSerializer.serialize(Unknown Source) > at = org.apache.xindice.server.UglyBrowser.prettyPrint(UglyBrowser.java:203) > at = org.apache.xindice.server.UglyBrowser.getDetailView(UglyBrowser.java:192) > at = org.apache.xindice.server.UglyBrowser.doGet(UglyBrowser.java:82) > at = org.apache.xindice.server.XindiceServlet.doGet(XindiceServlet.java:84) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:627) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) > at = org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applicati= onFilterChain.java:269) > at = org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilter= Chain.java:188) > at = org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.= java:213) > at = org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.= java:172) > at = org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:1= 27) > at = org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:1= 17) > at = org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:548) > at = org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.ja= va:108) > at = org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174= ) > at = org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:875)= > at = org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.proces= sConnection(Http11BaseProtocol.java:665) > at = org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.j= ava:528) > at = org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollower= WorkerThread.java:81) > at = org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.j= ava:689) > at java.lang.Thread.run(Thread.java:619) > Jun 9, 2010 12:05:34 PM = org.apache.xindice.core.DatabaseChangeObserver$FlushTask run > INFO: Successfully flushed 0 collections out of 0 > ..... >=20 >=20 >=20 >=20 > --=20 > ------------------------------------------------------------------ > Olle Olsson [email protected] Tel: +46 8 633 15 19 Fax: +46 8 751 72 = 30 > [Svenska W3C-kontoret: [email protected]] > SICS [Swedish Institute of Computer Science] > Box 1263 > SE - 164 29 Kista > Sweden > ------------------------------------------------------------------ >=20 >=20