You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xindice-users@xml.apache.org by Qunfang Zhang <qu...@student.adelaide.edu.au> on 2005/06/12 14:27:21 UTC

Re: add index to xindice1.1b4, need help

Hi all,

Can someone help me to solve the urgent problems?

I use xindice1.1b4 on Linux, everything fine for searching. When I try to set
checkpoints in my program to trace the time spent during querying collection, I
happen recorded in my log file the exceptions as follow:
java.lang.NullPointerException
        at
org.apache.xindice.core.indexer.IndexPattern.<init>(IndexPattern.java:57)
        at
org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.queryComparison(XPathQueryResolver.java\
:1090)
        at
org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.evalValComparison(XPathQueryResolver.ja\
va:521)
        at
org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.evaluate(XPathQueryResolver.java:296)
        at
org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.evaluate(XPathQueryResolver.java:284)
        at
org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.evalAxis(XPathQueryResolver.java:707)
        at
org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.evaluate(XPathQueryResolver.java:341)
        at
org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.evalLocationPath(XPathQueryResolver.jav\
a:376)
        at
org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.evaluate(XPathQueryResolver.java:279)
        at
org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.evalSetComparison(XPathQueryResolver.ja\
va:449)
        at
org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.evaluate(XPathQueryResolver.java:288)
        at
org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.evaluate(XPathQueryResolver.java:284)
        at
org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.evalAxis(XPathQueryResolver.java:707)
        at
org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.evaluate(XPathQueryResolver.java:341)
        at
org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.evalLocationPath(XPathQueryResolver.jav\
a:376)
        at
org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.evaluate(XPathQueryResolver.java:279)
        at
org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.evaluate(XPathQueryResolver.java:284)
        at
org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.evalAxis(XPathQueryResolver.java:707)
        at
org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.evaluate(XPathQueryResolver.java:341)
        at
org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.evalLocationPath(XPathQueryResolver.jav\
a:376)
        at
org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.evaluate(XPathQueryResolver.java:279)
        at
org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.evaluate(XPathQueryResolver.java:284)
        at
org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.execute(XPathQueryResolver.java:208)
        at
org.apache.xindice.core.query.XPathQueryResolver.query(XPathQueryResolver.java:131)
 at org.apache.xindice.core.query.QueryEngine.query(QueryEngine.java:122)
        at
org.apache.xindice.core.Collection.queryCollection(Collection.java:1217)
        at org.apache.xindice.server.rpc.messages.Query.execute(Query.java:60)
        at
org.apache.xindice.server.rpc.RPCMessageInterface.run(RPCMessageInterface.java:48)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.apache.xmlrpc.Invoker.execute(XmlRpcServer.java)
        at
org.apache.xmlrpc.XmlRpcServer$Worker.executeInternal(XmlRpcServer.java)
        at org.apache.xmlrpc.XmlRpcServer$Worker.execute(XmlRpcServer.java)
        at org.apache.xmlrpc.XmlRpcServer.execute(XmlRpcServer.java)
        at org.apache.xmlrpc.XmlRpcServer.execute(XmlRpcServer.java)
        at
org.apache.xindice.server.XindiceServlet.doPost(XindiceServlet.java:90)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.\
java:643)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.\
java:643)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
        at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2422)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.\
java:643)
        at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.\
java:641)
        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:163)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.\
java:641)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.\
java:643)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
        at
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:199)
        at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828)
        at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.ja\
va:700)
        at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:584)
        at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
        at java.lang.Thread.run(Thread.java:595)

this does not influence any normal queries. However, when I add index on the
query collection with pattern "beta", and query element "beta", it turns out no
speed gained at all.

- add index command:
xindice ai -c xmldb:xindice://localhost:8080/db/demo/ensembles -n beta -p beta
- My docment store in xindice collection with default namespace such as
xmlns="http://www.lqcd.org/ildg/QCDml/ensemble1.1"
- in my program I use to set the default namespace with following string:
service.setNamespace("","http://www.lqcd.org/ildg/QCDml/ensemble1.1");
- query string of "//:beta[text()='12.6']" then return what I expected.
- after I add index for "beta", the db/system/Sysconfig/database.xml has
correctly recorded it.

the only problem is index has no effect.

Any help will be very helpful!

Thanks,

qunfang zhang

Re: add index to xindice1.1b4, need help

Posted by Qunfang Zhang <qu...@student.adelaide.edu.au>.
Hi Todd,

Thank you very much.

Quoting Todd Byrne <by...@cns.montana.edu>:

>
>
>  From your xpath it looks like your searching for a cetain namespace.
> You can try this for a index pattern
> *@[http://www.lqcd.org/ildg/QCDml/ensemble1.1]beta
>
> http://xml.apache.org/xindice/guide-administrator.html#Managing+Indexes
> is a good resource for indexes.


Actually "beta" is a tag name in the xml document stored in the xindice.
I tried
 xindice ai -c xmldb:xindice://localhost:18080/db3/ildg/cssm/mdc/ensembles -n
beta -p [http://www.lqcd.org/ildg/QCDml/ensemble1.1]beta
xindice: No match.

and

xindice ai -c xmldb:xindice://localhost:18080/db3/ildg/cssm/mdc/ensembles -n
beta -p *@[http://www.lqcd.org/ildg/QCDml/ensemble1.1]beta
xindice: No match.

the above command was issured after I delete any beta index created before.

but this works:

 xindice ai -c xmldb:xindice://localhost:18080/db3/ildg/cssm/mdc/ensembles -n
beta -p beta
trying to register database
CREATED : beta

xindice li -c xmldb:xindice://localhost:18080/db3/ildg/cssm/mdc/ensembles
trying to register database
Indexes:

beta

The xml document I put in xindice is as:

Document 'su3b09000s16t32DBW2'

<?xml version="1.0"?> <markovChain
xmlns="http://www.lqcd.org/ildg/QCDml/ensemble1.1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.lqcd.org/ildg/QCDml/ensemble1.1
http://www.ph.ed.ac.uk/ukqcd/community/the_grid/QCDml1.1/QCDml1.1Ensemble.xsd">
<markovChainURI>www.sapac.edu.au/cssm/su3b09000s16t32DBW2</markovChainURI>
<management> <revisions>1</revisions> <collaboration>CSSM</collaboration>
<projectName>Wilson Quenched QCD Hadron Masses</projectName> <archiveHistory>
<elem> <revision>1</revision> <revisionAction>add</revisionAction>
<numberConfigs>51</numberConfigs> <participant> <name>Waseem Kamleh</name>
<institution>The University of Adelaide</institution> </participant>
<date>2005-05-03T16:18:43Z</date> </elem> </archiveHistory> </management>
<physics> <size> <elem> <name>X</name> <length>16</length> </elem> <elem>
<name>Y</name> <length>16</length> </elem> <elem> <name>Z</name>
<length>16</length> </elem> <elem> <name>T</name> <length>32</length> </elem>
</size> <action> <gluon> <DBW2GluonAction>
<glossary>www.lqcd.org/ildg/DBW2GluonAction.xml</glossary> <gluonField>
<gaugeGroup>SU(3)</gaugeGroup> <representation>fundamental</representation>
<boundaryCondition> <elem>periodic</elem> <elem>periodic</elem>
<elem>periodic</elem> <elem>periodic</elem> </boundaryCondition> </gluonField>
<couplings> <beta>9.0</beta> <c0>12.25520</c0> <c1>-1.4069</c1> <c2>0.0</c2>
</couplings> </DBW2GluonAction> </gluon> </action> </physics> <algorithm>
<name>GHMC</name> <glossary>www.ph.ed.ac.uk/ukqcd/community/GHMC.xml</glossary>
<reference>Phys.Rev.D65:054502,2002</reference> <exact>true</exact> <parameters>
<name>solverType</name> <value>BiCGStab</value> </parameters> </algorithm>
</markovChain>


In my program, I can query use:

//:beta[text()='12.5'] or something like that and get results as I expected,
because I set "service.setNamespace("",defaultnamespace)" when query collection.

but the above query string not worked for xindice command.
xindice command worked for:
xindice xpath -c xmldb:xindice://localhost:8080/db/demo -s
"br=http://www.lqcd.org/ildg/QCDml/ensemble1.1" -q "//br:beta[text='12.5']

The exception my log file caught was happened before I add any index.

> > java.lang.NullPointerException
> >         at
> > org.apache.xindice.core.indexer.IndexPattern.<init>(IndexPattern.java:57)
> >         at
> >
>
org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.queryComparison(XPathQueryResolver.java\
> > :1090)
> >         at
> >
>
org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.evalValComparison(XPathQueryResolver.ja\
> > va:521)
> >         at
> >
>
org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.evaluate(XPathQueryResolver.java:296)
> >         at
> >
>
org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.evaluate(XPathQueryResolver.java:284)
> >         at
> >
>
org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.evalAxis(XPathQueryResolver.java:707)
> >         at
> >
>
org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.evaluate(XPathQueryResolver.java:341)
> >         at
> >
>
org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.evalLocationPath(XPathQueryResolver.jav\
> > a:376)
> >         at
> >
>
org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.evaluate(XPathQueryResolver.java:279)
> >         at
> >
>
org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.evalSetComparison(XPathQueryResolver.ja\
> > va:449)
> >         at
> >
>
org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.evaluate(XPathQueryResolver.java:288)
> >         at
> >
>
org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.evaluate(XPathQueryResolver.java:284)
> >         at
> >
>
org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.evalAxis(XPathQueryResolver.java:707)
> >         at
> >
>
org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.evaluate(XPathQueryResolver.java:341)
> >         at
> >
>
org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.evalLocationPath(XPathQueryResolver.jav\
> > a:376)
> >         at
> >
>
org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.evaluate(XPathQueryResolver.java:279)
> >         at
> >
>
org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.evaluate(XPathQueryResolver.java:284)
> >         at
> >
>
org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.evalAxis(XPathQueryResolver.java:707)
> >         at
> >
>
org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.evaluate(XPathQueryResolver.java:341)
> >         at
> >
>
org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.evalLocationPath(XPathQueryResolver.jav\
> > a:376)
> >         at
> >
>
org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.evaluate(XPathQueryResolver.java:279)
> >         at
> >
>
org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.evaluate(XPathQueryResolver.java:284)
> >         at
> >
>
org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.execute(XPathQueryResolver.java:208)
> >         at
> >
>
org.apache.xindice.core.query.XPathQueryResolver.query(XPathQueryResolver.java:131)
> >  at org.apache.xindice.core.query.QueryEngine.query(QueryEngine.java:122)
> >         at
> > org.apache.xindice.core.Collection.queryCollection(Collection.java:1217)
> >         at
> org.apache.xindice.server.rpc.messages.Query.execute(Query.java:60)
> >         at
> >
>
org.apache.xindice.server.rpc.RPCMessageInterface.run(RPCMessageInterface.java:48)
> >         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >         at
> >
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> >         at
> >
>
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> >         at java.lang.reflect.Method.invoke(Method.java:585)
> >         at org.apache.xmlrpc.Invoker.execute(XmlRpcServer.java)
> >         at
> > org.apache.xmlrpc.XmlRpcServer$Worker.executeInternal(XmlRpcServer.java)
> >         at org.apache.xmlrpc.XmlRpcServer$Worker.execute(XmlRpcServer.java)
> >         at org.apache.xmlrpc.XmlRpcServer.execute(XmlRpcServer.java)
> >         at org.apache.xmlrpc.XmlRpcServer.execute(XmlRpcServer.java)
> >         at
> > org.apache.xindice.server.XindiceServlet.doPost(XindiceServlet.java:90)
> >         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
> >         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> >         at
> >
>
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
> >         at
> >
>
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
> > at
> >
>
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
> >         at
> >
>
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
> >         at
> >
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.\
> > java:643)
> >         at
> > org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
> >         at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> >         at
> >
>
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
> >         at
> >
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.\
> > java:643)
> >         at
> > org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
> >         at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> >         at
> > org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2422)
> >         at
> >
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
> >         at
> >
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.\
> > java:643)
> >         at
> >
>
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
> >         at
> >
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.\
> > java:641)
> >         at
> >
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:163)
> > at
> >
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.\
> > java:641)
> >         at
> > org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
> >         at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> >         at
> >
>
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
> >         at
> >
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.\
> > java:643)
> >         at
> > org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
> >         at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> >         at
> > org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:199)
> >         at
> > org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828)
> >         at
> >
>
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.ja\
> > va:700)
> >         at
> > org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:584)
> >         at
> >
>
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
> >         at java.lang.Thread.run(Thread.java:595)

This seems has some relation with index.

All query are successed even there are exceptions as above. The only problem is
no gained on query speed after index or the problem to create index with
namespace.

I wonder if it caused the index not worked?


Thanks,

qunfang zhang








Re: build xindice1.1b5

Posted by Qunfang Zhang <qu...@student.adelaide.edu.au>.

Quoting Qunfang Zhang <qu...@student.adelaide.edu.au>:

> Hi All,
>
> Can someone help me out this:
> I check out the latest version of xindice using following command:
> cvs -d :pserver:anoncvs@cvs.apache.org:/home/cvspublic co xml-xindice
> and successful get the whole directory of xml-xindice, then I use command
> "ant"
> but the results are:

I can now ant it successed using j2sdk1.4.2_06.



>  ant
> Buildfile: build.xml
>
> init:
>
> clover:
>
> clover.init:
>
> clover.on:
>
> src-build:
> [javac] Compiling 29 source files to
> /home/qfzhang/download_qf/xml-xindice/build/classes
>     [javac]
>
/home/qfzhang/download_qf/xml-xindice/java/src/org/apache/xindice/xml/dom/AttrImpl.java:31:
> org.apache.xindice.xml.dom.AttrImpl is not abstract and does not override
> abstract method
> setUserData(java.lang.String,java.lang.Object,org.w3c.dom.UserDataHandler) in
> org.w3c.dom.Node
>     [javac] public final class AttrImpl extends ContainerNodeImpl implements
> Attr {
>     [javac]              ^
>     [javac]
>
/home/qfzhang/download_qf/xml-xindice/java/src/org/apache/xindice/xml/dom/TextImpl.java:30:
> org.apache.xindice.xml.dom.TextImpl is not abstract and does not override
> abstract method
> setUserData(java.lang.String,java.lang.Object,org.w3c.dom.UserDataHandler) in
> org.w3c.dom.Node
>     [javac] public class TextImpl extends CharacterDataImpl implements Text {
>     [javac]        ^
>     [javac]
>
/home/qfzhang/download_qf/xml-xindice/java/src/org/apache/xindice/xml/dom/CDATASectionImpl.java:29:
> org.apache.xindice.xml.dom.CDATASectionImpl is not abstract and does not
> override abstract method replaceWholeText(java.lang.String) in
> org.w3c.dom.Text
>     [javac] public final class CDATASectionImpl extends TextImpl implements
> CDATASection {
>     [javac]              ^
>     [javac]
>
/home/qfzhang/download_qf/xml-xindice/java/src/org/apache/xindice/xml/dom/CommentImpl.java:29:
> org.apache.xindice.xml.dom.CommentImpl is not abstract and does not override
> abstract method
> setUserData(java.lang.String,java.lang.Object,org.w3c.dom.UserDataHandler) in
> org.w3c.dom.Node
>     [javac] public final class CommentImpl extends CharacterDataImpl
> implements
> Comment {
>     [javac]
> [javac]
>
/home/qfzhang/download_qf/xml-xindice/java/src/org/apache/xindice/xml/dom/DOMImplementationImpl.java:32:
> org.apache.xindice.xml.dom.DOMImplementationImpl is not abstract and does not
> override abstract method getFeature(java.lang.String,java.lang.String) in
> org.w3c.dom.DOMImplementation
>     [javac] public final class DOMImplementationImpl implements
> DOMImplementation {
>     [javac]              ^
>     [javac]
>
/home/qfzhang/download_qf/xml-xindice/java/src/org/apache/xindice/xml/dom/DocumentFragmentImpl.java:29:
> org.apache.xindice.xml.dom.DocumentFragmentImpl is not abstract and does not
> override abstract method
> setUserData(java.lang.String,java.lang.Object,org.w3c.dom.UserDataHandler) in
> org.w3c.dom.Node
>     [javac] public final class DocumentFragmentImpl extends ContainerNodeImpl
> implements DocumentFragment {
>     [javac]              ^
>     [javac]
>
/home/qfzhang/download_qf/xml-xindice/java/src/org/apache/xindice/xml/dom/DocumentImpl.java:57:
> org.apache.xindice.xml.dom.DocumentImpl is not abstract and does not override
> abstract method
> setUserData(java.lang.String,java.lang.Object,org.w3c.dom.UserDataHandler) in
> org.w3c.dom.Node
>     [javac] public final class DocumentImpl extends ContainerNodeImpl
>     [javac]              ^
>     [javac]
>
/home/qfzhang/download_qf/xml-xindice/java/src/org/apache/xindice/xml/dom/DocumentTypeImpl.java:30:
> org.apache.xindice.xml.dom.DocumentTypeImpl is not abstract and does not
> override abstract method
> setUserData(java.lang.String,java.lang.Object,org.w3c.dom.UserDataHandler) in
> org.w3c.dom.Node
>     [javac] public final class DocumentTypeImpl extends NodeImpl implements
> DocumentType {
>     [javac]
> [javac]
>
/home/qfzhang/download_qf/xml-xindice/java/src/org/apache/xindice/xml/dom/ElementImpl.java:43:
> org.apache.xindice.xml.dom.ElementImpl is not abstract and does not override
> abstract method
> setUserData(java.lang.String,java.lang.Object,org.w3c.dom.UserDataHandler) in
> org.w3c.dom.Node
>     [javac] public final class ElementImpl extends ContainerNodeImpl
> implements
> Element {
>     [javac]              ^
>     [javac]
>
/home/qfzhang/download_qf/xml-xindice/java/src/org/apache/xindice/xml/dom/EntityImpl.java:29:
> org.apache.xindice.xml.dom.EntityImpl is not abstract and does not override
> abstract method
> setUserData(java.lang.String,java.lang.Object,org.w3c.dom.UserDataHandler) in
> org.w3c.dom.Node
>     [javac] public final class EntityImpl extends NodeImpl implements Entity
> {
>     [javac]              ^
>     [javac]
>
/home/qfzhang/download_qf/xml-xindice/java/src/org/apache/xindice/xml/dom/EntityReferenceImpl.java:36:
> org.apache.xindice.xml.dom.EntityReferenceImpl is not abstract and does not
> override abstract method
> setUserData(java.lang.String,java.lang.Object,org.w3c.dom.UserDataHandler) in
> org.w3c.dom.Node
>     [javac] public final class EntityReferenceImpl extends NodeImpl
> implements
> EntityReference {
>     [javac]              ^
>     [javac]
>
/home/qfzhang/download_qf/xml-xindice/java/src/org/apache/xindice/xml/dom/NotationImpl.java:29:
> org.apache.xindice.xml.dom.NotationImpl is not abstract and does not override
> abstract method
> setUserData(java.lang.String,java.lang.Object,org.w3c.dom.UserDataHandler) in
> org.w3c.dom.Node
>     [javac] public final class NotationImpl extends NodeImpl implements
> Notation
> {
>     [javac]              ^
>     [javac]
>
/home/qfzhang/download_qf/xml-xindice/java/src/org/apache/xindice/xml/dom/ProcessingInstructionImpl.java:36:
> org.apache.xindice.xml.dom.ProcessingInstructionImpl is not abstract and does
> not override abstract method
> setUserData(java.lang.String,java.lang.Object,org.w3c.dom.UserDataHandler) in
> org.w3c.dom.Node
>     [javac] public final class ProcessingInstructionImpl extends NodeImpl
> implements ProcessingInstruction {
>     [javac]              ^
>     [javac]
>
/home/qfzhang/download_qf/xml-xindice/java/src/org/apache/xindice/xml/jaxp/DocumentBuilderFactoryImpl.java:32:
> org.apache.xindice.xml.jaxp.DocumentBuilderFactoryImpl is not abstract and
> does
> not override abstract method getFeature(java.lang.String) in
> javax.xml.parsers.DocumentBuilderFactory
>     [javac] public class DocumentBuilderFactoryImpl extends
> DocumentBuilderFactory {
>     [javac]        ^
>     [javac] Note: Some input files use unchecked or unsafe operations.
>     [javac] Note: Recompile with -Xlint:unchecked for details.
>     [javac] 14 errors
>
>
> BUILD FAILED
> home/qfzhang/download_qf/xml-xindice/build.xml:102: Compile failed; see the
> compiler error output for details.
>
>
> Thanks,
>
> qunfang zhang
>

the above happened when i used jdk1.5.0.

qunfang zhang

Re: build xindice1.1b5

Posted by Qunfang Zhang <qu...@student.adelaide.edu.au>.
Hi All,

Can someone help me out this:
I check out the latest version of xindice using following command:
cvs -d :pserver:anoncvs@cvs.apache.org:/home/cvspublic co xml-xindice
and successful get the whole directory of xml-xindice, then I use command "ant"
but the results are:
 ant
Buildfile: build.xml

init:

clover:

clover.init:

clover.on:

src-build:
[javac] Compiling 29 source files to
/home/qfzhang/download_qf/xml-xindice/build/classes
    [javac]
/home/qfzhang/download_qf/xml-xindice/java/src/org/apache/xindice/xml/dom/AttrImpl.java:31:
org.apache.xindice.xml.dom.AttrImpl is not abstract and does not override
abstract method
setUserData(java.lang.String,java.lang.Object,org.w3c.dom.UserDataHandler) in
org.w3c.dom.Node
    [javac] public final class AttrImpl extends ContainerNodeImpl implements
Attr {
    [javac]              ^
    [javac]
/home/qfzhang/download_qf/xml-xindice/java/src/org/apache/xindice/xml/dom/TextImpl.java:30:
org.apache.xindice.xml.dom.TextImpl is not abstract and does not override
abstract method
setUserData(java.lang.String,java.lang.Object,org.w3c.dom.UserDataHandler) in
org.w3c.dom.Node
    [javac] public class TextImpl extends CharacterDataImpl implements Text {
    [javac]        ^
    [javac]
/home/qfzhang/download_qf/xml-xindice/java/src/org/apache/xindice/xml/dom/CDATASectionImpl.java:29:
org.apache.xindice.xml.dom.CDATASectionImpl is not abstract and does not
override abstract method replaceWholeText(java.lang.String) in org.w3c.dom.Text
    [javac] public final class CDATASectionImpl extends TextImpl implements
CDATASection {
    [javac]              ^
    [javac]
/home/qfzhang/download_qf/xml-xindice/java/src/org/apache/xindice/xml/dom/CommentImpl.java:29:
org.apache.xindice.xml.dom.CommentImpl is not abstract and does not override
abstract method
setUserData(java.lang.String,java.lang.Object,org.w3c.dom.UserDataHandler) in
org.w3c.dom.Node
    [javac] public final class CommentImpl extends CharacterDataImpl implements
Comment {
    [javac]
[javac]
/home/qfzhang/download_qf/xml-xindice/java/src/org/apache/xindice/xml/dom/DOMImplementationImpl.java:32:
org.apache.xindice.xml.dom.DOMImplementationImpl is not abstract and does not
override abstract method getFeature(java.lang.String,java.lang.String) in
org.w3c.dom.DOMImplementation
    [javac] public final class DOMImplementationImpl implements
DOMImplementation {
    [javac]              ^
    [javac]
/home/qfzhang/download_qf/xml-xindice/java/src/org/apache/xindice/xml/dom/DocumentFragmentImpl.java:29:
org.apache.xindice.xml.dom.DocumentFragmentImpl is not abstract and does not
override abstract method
setUserData(java.lang.String,java.lang.Object,org.w3c.dom.UserDataHandler) in
org.w3c.dom.Node
    [javac] public final class DocumentFragmentImpl extends ContainerNodeImpl
implements DocumentFragment {
    [javac]              ^
    [javac]
/home/qfzhang/download_qf/xml-xindice/java/src/org/apache/xindice/xml/dom/DocumentImpl.java:57:
org.apache.xindice.xml.dom.DocumentImpl is not abstract and does not override
abstract method
setUserData(java.lang.String,java.lang.Object,org.w3c.dom.UserDataHandler) in
org.w3c.dom.Node
    [javac] public final class DocumentImpl extends ContainerNodeImpl
    [javac]              ^
    [javac]
/home/qfzhang/download_qf/xml-xindice/java/src/org/apache/xindice/xml/dom/DocumentTypeImpl.java:30:
org.apache.xindice.xml.dom.DocumentTypeImpl is not abstract and does not
override abstract method
setUserData(java.lang.String,java.lang.Object,org.w3c.dom.UserDataHandler) in
org.w3c.dom.Node
    [javac] public final class DocumentTypeImpl extends NodeImpl implements
DocumentType {
    [javac]
[javac]
/home/qfzhang/download_qf/xml-xindice/java/src/org/apache/xindice/xml/dom/ElementImpl.java:43:
org.apache.xindice.xml.dom.ElementImpl is not abstract and does not override
abstract method
setUserData(java.lang.String,java.lang.Object,org.w3c.dom.UserDataHandler) in
org.w3c.dom.Node
    [javac] public final class ElementImpl extends ContainerNodeImpl implements
Element {
    [javac]              ^
    [javac]
/home/qfzhang/download_qf/xml-xindice/java/src/org/apache/xindice/xml/dom/EntityImpl.java:29:
org.apache.xindice.xml.dom.EntityImpl is not abstract and does not override
abstract method
setUserData(java.lang.String,java.lang.Object,org.w3c.dom.UserDataHandler) in
org.w3c.dom.Node
    [javac] public final class EntityImpl extends NodeImpl implements Entity {
    [javac]              ^
    [javac]
/home/qfzhang/download_qf/xml-xindice/java/src/org/apache/xindice/xml/dom/EntityReferenceImpl.java:36:
org.apache.xindice.xml.dom.EntityReferenceImpl is not abstract and does not
override abstract method
setUserData(java.lang.String,java.lang.Object,org.w3c.dom.UserDataHandler) in
org.w3c.dom.Node
    [javac] public final class EntityReferenceImpl extends NodeImpl implements
EntityReference {
    [javac]              ^
    [javac]
/home/qfzhang/download_qf/xml-xindice/java/src/org/apache/xindice/xml/dom/NotationImpl.java:29:
org.apache.xindice.xml.dom.NotationImpl is not abstract and does not override
abstract method
setUserData(java.lang.String,java.lang.Object,org.w3c.dom.UserDataHandler) in
org.w3c.dom.Node
    [javac] public final class NotationImpl extends NodeImpl implements Notation
{
    [javac]              ^
    [javac]
/home/qfzhang/download_qf/xml-xindice/java/src/org/apache/xindice/xml/dom/ProcessingInstructionImpl.java:36:
org.apache.xindice.xml.dom.ProcessingInstructionImpl is not abstract and does
not override abstract method
setUserData(java.lang.String,java.lang.Object,org.w3c.dom.UserDataHandler) in
org.w3c.dom.Node
    [javac] public final class ProcessingInstructionImpl extends NodeImpl
implements ProcessingInstruction {
    [javac]              ^
    [javac]
/home/qfzhang/download_qf/xml-xindice/java/src/org/apache/xindice/xml/jaxp/DocumentBuilderFactoryImpl.java:32:
org.apache.xindice.xml.jaxp.DocumentBuilderFactoryImpl is not abstract and does
not override abstract method getFeature(java.lang.String) in
javax.xml.parsers.DocumentBuilderFactory
    [javac] public class DocumentBuilderFactoryImpl extends
DocumentBuilderFactory {
    [javac]        ^
    [javac] Note: Some input files use unchecked or unsafe operations.
    [javac] Note: Recompile with -Xlint:unchecked for details.
    [javac] 14 errors


BUILD FAILED
home/qfzhang/download_qf/xml-xindice/build.xml:102: Compile failed; see the
compiler error output for details.


Thanks,

qunfang zhang

Re: add index to xindice1.1b4, need help

Posted by Qunfang Zhang <qu...@student.adelaide.edu.au>.
Hi Todd,

I load 10000 small xml documents(without defaultnamespace) in my xindice1.1b4
the smaple doc is as:

<?xml version="1.0"?> <entry id="10000">  <name>Charaka Laws</name>
<address>694 Westhead Lane, San Jose</address>  <phone>05896697157</phone>
</entry>

and added index by xindice command line tool such as:
xindice ai -c xmldb:xindice://localhost:18080/db/littleblackbook -n address -p
address

I did the query as:
xindice xpath -c xmldb:xindice://localhost:8080/db/littleblackbook -q
"/entry/address[text()='595 Anjomshoaa Avenue, San Jose']"

the speed gained with index than without index(that means my previous exception
caugth in my log file can be ignored?).

with my xml doc contains defaultnamespace i can not issue the command as:
xindice ai -c xmldb:xindice://localhost:18080/db3/ildg/cssm/mdc/configurations
-n crcCheckSum -p [http://www.lqcd.org/ildg/QCDml/ensemble1.1]crcCheckSum
xindice: No match.

if I used command like:
xindice ai -c xmldb:xindice://localhost:8080/db/demo/ensembles -n crcCheckSum -p
crcCheckSum
it will create index, but querying seems no gain on speed such as:
 xindice xapth -c
xmldb:xindice://localhost:18080/db3/ildg/cssm/mdc/configurations -s
"br=http://www.lqcd.org/ildg/QCDml/config1.1" -q
"/br:gaugeConfiguration/br:management/br:crcCheckSum[text()='82f0c85d3a9d922cd95e634f1c9539cc']"


So, what might be the problems?

Thanks,

qunfang zhang

Quoting Todd Byrne <by...@cns.montana.edu>:

>
>
>  From your xpath it looks like your searching for a cetain namespace.
> You can try this for a index pattern
> *@[http://www.lqcd.org/ildg/QCDml/ensemble1.1]beta
>
> http://xml.apache.org/xindice/guide-administrator.html#Managing+Indexes
> is a good resource for indexes.
>
> Todd
>
> Qunfang Zhang wrote:
> > Hi all,
> >
> > Can someone help me to solve the urgent problems?
> >
> > I use xindice1.1b4 on Linux, everything fine for searching. When I try to
> set
> > checkpoints in my program to trace the time spent during querying
> collection, I
> > happen recorded in my log file the exceptions as follow:
> > java.lang.NullPointerException
> >         at
> > org.apache.xindice.core.indexer.IndexPattern.<init>(IndexPattern.java:57)
> >         at
> >
>
org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.queryComparison(XPathQueryResolver.java\
> > :1090)
> >         at
> >
>
org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.evalValComparison(XPathQueryResolver.ja\
> > va:521)
> >         at
> >
>
org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.evaluate(XPathQueryResolver.java:296)
> >         at
> >
>
org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.evaluate(XPathQueryResolver.java:284)
> >         at
> >
>
org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.evalAxis(XPathQueryResolver.java:707)
> >         at
> >
>
org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.evaluate(XPathQueryResolver.java:341)
> >         at
> >
>
org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.evalLocationPath(XPathQueryResolver.jav\
> > a:376)
> >         at
> >
>
org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.evaluate(XPathQueryResolver.java:279)
> >         at
> >
>
org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.evalSetComparison(XPathQueryResolver.ja\
> > va:449)
> >         at
> >
>
org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.evaluate(XPathQueryResolver.java:288)
> >         at
> >
>
org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.evaluate(XPathQueryResolver.java:284)
> >         at
> >
>
org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.evalAxis(XPathQueryResolver.java:707)
> >         at
> >
>
org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.evaluate(XPathQueryResolver.java:341)
> >         at
> >
>
org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.evalLocationPath(XPathQueryResolver.jav\
> > a:376)
> >         at
> >
>
org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.evaluate(XPathQueryResolver.java:279)
> >         at
> >
>
org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.evaluate(XPathQueryResolver.java:284)
> >         at
> >
>
org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.evalAxis(XPathQueryResolver.java:707)
> >         at
> >
>
org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.evaluate(XPathQueryResolver.java:341)
> >         at
> >
>
org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.evalLocationPath(XPathQueryResolver.jav\
> > a:376)
> >         at
> >
>
org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.evaluate(XPathQueryResolver.java:279)
> >         at
> >
>
org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.evaluate(XPathQueryResolver.java:284)
> >         at
> >
>
org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.execute(XPathQueryResolver.java:208)
> >         at
> >
>
org.apache.xindice.core.query.XPathQueryResolver.query(XPathQueryResolver.java:131)
> >  at org.apache.xindice.core.query.QueryEngine.query(QueryEngine.java:122)
> >         at
> > org.apache.xindice.core.Collection.queryCollection(Collection.java:1217)
> >         at
> org.apache.xindice.server.rpc.messages.Query.execute(Query.java:60)
> >         at
> >
>
org.apache.xindice.server.rpc.RPCMessageInterface.run(RPCMessageInterface.java:48)
> >         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >         at
> >
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> >         at
> >
>
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> >         at java.lang.reflect.Method.invoke(Method.java:585)
> >         at org.apache.xmlrpc.Invoker.execute(XmlRpcServer.java)
> >         at
> > org.apache.xmlrpc.XmlRpcServer$Worker.executeInternal(XmlRpcServer.java)
> >         at org.apache.xmlrpc.XmlRpcServer$Worker.execute(XmlRpcServer.java)
> >         at org.apache.xmlrpc.XmlRpcServer.execute(XmlRpcServer.java)
> >         at org.apache.xmlrpc.XmlRpcServer.execute(XmlRpcServer.java)
> >         at
> > org.apache.xindice.server.XindiceServlet.doPost(XindiceServlet.java:90)
> >         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
> >         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> >         at
> >
>
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
> >         at
> >
>
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
> > at
> >
>
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
> >         at
> >
>
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
> >         at
> >
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.\
> > java:643)
> >         at
> > org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
> >         at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> >         at
> >
>
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
> >         at
> >
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.\
> > java:643)
> >         at
> > org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
> >         at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> >         at
> > org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2422)
> >         at
> >
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
> >         at
> >
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.\
> > java:643)
> >         at
> >
>
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
> >         at
> >
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.\
> > java:641)
> >         at
> >
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:163)
> > at
> >
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.\
> > java:641)
> >         at
> > org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
> >         at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> >         at
> >
>
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
> >         at
> >
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.\
> > java:643)
> >         at
> > org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
> >         at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> >         at
> > org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:199)
> >         at
> > org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828)
> >         at
> >
>
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.ja\
> > va:700)
> >         at
> > org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:584)
> >         at
> >
>
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
> >         at java.lang.Thread.run(Thread.java:595)
> >
> > this does not influence any normal queries. However, when I add index on
> the
> > query collection with pattern "beta", and query element "beta", it turns
> out no
> > speed gained at all.
> >
> > - add index command:
> > xindice ai -c xmldb:xindice://localhost:8080/db/demo/ensembles -n beta -p
> beta
> > - My docment store in xindice collection with default namespace such as
> > xmlns="http://www.lqcd.org/ildg/QCDml/ensemble1.1"
> > - in my program I use to set the default namespace with following string:
> > service.setNamespace("","http://www.lqcd.org/ildg/QCDml/ensemble1.1");
> > - query string of "//:beta[text()='12.6']" then return what I expected.
> > - after I add index for "beta", the db/system/Sysconfig/database.xml has
> > correctly recorded it.
> >
> > the only problem is index has no effect.
> >
> > Any help will be very helpful!
> >
> > Thanks,
> >
> > qunfang zhang
>



Re: add index to xindice1.1b4, need help

Posted by Todd Byrne <by...@cns.montana.edu>.

 From your xpath it looks like your searching for a cetain namespace. 
You can try this for a index pattern
*@[http://www.lqcd.org/ildg/QCDml/ensemble1.1]beta

http://xml.apache.org/xindice/guide-administrator.html#Managing+Indexes 
is a good resource for indexes.

Todd

Qunfang Zhang wrote:
> Hi all,
> 
> Can someone help me to solve the urgent problems?
> 
> I use xindice1.1b4 on Linux, everything fine for searching. When I try to set
> checkpoints in my program to trace the time spent during querying collection, I
> happen recorded in my log file the exceptions as follow:
> java.lang.NullPointerException
>         at
> org.apache.xindice.core.indexer.IndexPattern.<init>(IndexPattern.java:57)
>         at
> org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.queryComparison(XPathQueryResolver.java\
> :1090)
>         at
> org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.evalValComparison(XPathQueryResolver.ja\
> va:521)
>         at
> org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.evaluate(XPathQueryResolver.java:296)
>         at
> org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.evaluate(XPathQueryResolver.java:284)
>         at
> org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.evalAxis(XPathQueryResolver.java:707)
>         at
> org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.evaluate(XPathQueryResolver.java:341)
>         at
> org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.evalLocationPath(XPathQueryResolver.jav\
> a:376)
>         at
> org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.evaluate(XPathQueryResolver.java:279)
>         at
> org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.evalSetComparison(XPathQueryResolver.ja\
> va:449)
>         at
> org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.evaluate(XPathQueryResolver.java:288)
>         at
> org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.evaluate(XPathQueryResolver.java:284)
>         at
> org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.evalAxis(XPathQueryResolver.java:707)
>         at
> org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.evaluate(XPathQueryResolver.java:341)
>         at
> org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.evalLocationPath(XPathQueryResolver.jav\
> a:376)
>         at
> org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.evaluate(XPathQueryResolver.java:279)
>         at
> org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.evaluate(XPathQueryResolver.java:284)
>         at
> org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.evalAxis(XPathQueryResolver.java:707)
>         at
> org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.evaluate(XPathQueryResolver.java:341)
>         at
> org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.evalLocationPath(XPathQueryResolver.jav\
> a:376)
>         at
> org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.evaluate(XPathQueryResolver.java:279)
>         at
> org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.evaluate(XPathQueryResolver.java:284)
>         at
> org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.execute(XPathQueryResolver.java:208)
>         at
> org.apache.xindice.core.query.XPathQueryResolver.query(XPathQueryResolver.java:131)
>  at org.apache.xindice.core.query.QueryEngine.query(QueryEngine.java:122)
>         at
> org.apache.xindice.core.Collection.queryCollection(Collection.java:1217)
>         at org.apache.xindice.server.rpc.messages.Query.execute(Query.java:60)
>         at
> org.apache.xindice.server.rpc.RPCMessageInterface.run(RPCMessageInterface.java:48)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at org.apache.xmlrpc.Invoker.execute(XmlRpcServer.java)
>         at
> org.apache.xmlrpc.XmlRpcServer$Worker.executeInternal(XmlRpcServer.java)
>         at org.apache.xmlrpc.XmlRpcServer$Worker.execute(XmlRpcServer.java)
>         at org.apache.xmlrpc.XmlRpcServer.execute(XmlRpcServer.java)
>         at org.apache.xmlrpc.XmlRpcServer.execute(XmlRpcServer.java)
>         at
> org.apache.xindice.server.XindiceServlet.doPost(XindiceServlet.java:90)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>         at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
>         at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
>         at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
>         at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.\
> java:643)
>         at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
>         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>         at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
>         at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.\
> java:643)
>         at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
>         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>         at
> org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2422)
>         at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
>         at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.\
> java:643)
>         at
> org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
>         at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.\
> java:641)
>         at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:163)
> at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.\
> java:641)
>         at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
>         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>         at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
>         at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.\
> java:643)
>         at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
>         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>         at
> org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:199)
>         at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828)
>         at
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.ja\
> va:700)
>         at
> org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:584)
>         at
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
>         at java.lang.Thread.run(Thread.java:595)
> 
> this does not influence any normal queries. However, when I add index on the
> query collection with pattern "beta", and query element "beta", it turns out no
> speed gained at all.
> 
> - add index command:
> xindice ai -c xmldb:xindice://localhost:8080/db/demo/ensembles -n beta -p beta
> - My docment store in xindice collection with default namespace such as
> xmlns="http://www.lqcd.org/ildg/QCDml/ensemble1.1"
> - in my program I use to set the default namespace with following string:
> service.setNamespace("","http://www.lqcd.org/ildg/QCDml/ensemble1.1");
> - query string of "//:beta[text()='12.6']" then return what I expected.
> - after I add index for "beta", the db/system/Sysconfig/database.xml has
> correctly recorded it.
> 
> the only problem is index has no effect.
> 
> Any help will be very helpful!
> 
> Thanks,
> 
> qunfang zhang