James Deegan wrote:
I downloaded the binary of Xindice-1.1b3 (.WAR file and docs only). I'm running Tomcat 4.0.4 / J2SE 1.4.2 on Windows 98 Second Edition. (Have run earlier versions of Xindice on Win98)
The installation file (tomcat.html) states that: "Need section on inserting XINDICE_HOME/dist/xindice-1.1b.xml entry into the CATALINA_HOME/conf/server.xml file here."
You were reading outdated document. Check online, http://xml.apache.org/xindice , for the latest version.
I inserted the following section into CATALINA_HOME/conf/server.xml (just before Tomcat root):
<!-- Xindice Database Context -->
<Context path="/xindice" docBase="xindice-1.1b3" debug="0" reloadable="true">
<Logger className="org.apache.catalina.logger.FileLogger" debug="0" verbosity="1" prefix="xindice_log." directory="logs" timestamp="true" suffix=".txt"/>
</Context>
You don't have to do it if you deploy WAR under proper context. See latest doc for it. Basically, it comes down to copying xindice-1.1b3.war file into the webapps/ folder with the name "xindice.war", no version number in WAR file name.
"java.lang.NoSuchMethodError: org.apache.xerces.util.XMLChar.isXML11Space(I)Z
at org.apache.xerces.impl.XML11DocumentScannerImpl.normalizeWhitespace(XML11DocumentScannerImpl.java:675)
at org.apache.xerces.impl.XML11DocumentScannerImpl.scanAttributeValue(XML11DocumentScannerImpl.java:409)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanAttribute(XMLDocumentFragmentScannerImpl.java:812)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:741)"
It's famous "Endorsed Lib Problem". Your Tomcat and/or Java use old version of Xerces. Replace xercesImpl and xml-apis in the TOMCAT_HOME/common/endorsed folder with the xindice versions of the files (version 2.6.0 comes with xindice).
If your Tomcat does not have common/endorsed, then you have to put those into <JAVA_HOME>/jre/lib/ext, or you can simply upgrade tomcat to 4.2.24 (or 25? what is the latest one?) version.
I subsequently downloaded the Xindice 1.1b3 source distribution, and in my autoexec.bat added / edited the following lines:
SET XINDICE_HOME=c:\xindice-1.1b3
SET CLASSPATH=c:\jakart~1.4\webapps\xindice-1.1b3\Web-inf\lib\xerces-2.6.0.jar;c:\jakart~1.4\webapps\xindice-1.1b3\Web-inf\lib\xalan.jar;c:\jakart~1.4\webapps\xindice-1.1b3\Web-inf\lib\xml-apis.jar;c:\jakart~1.4\webapps\xindice-1.1b3\Web-inf\lib\xmldb-common.jar;c:\jakart~1.4\webapps\xindice-1.1b3\Web-inf\lib\xmldb-xupdate.jar;c:\jakart~1.4\webapps\xindice-1.1b3\Web-inf\lib\xmldb-api-20021118.jar;c:\jakart~1.4\webapps\xindice-1.1b3\Web-inf\lib\xmldb-api-sdk-20021118.jar;c:\jakart~1.4\webapps\xindice-1.1b3\Web-inf\lib\xmlrpc-1.1.jar;c:\jakart~1.4\webapps\xindice-1.1b3\Web-inf\lib\commons-logging-1.0.3.jar
Note: I also tried setting CLASSPATH to JARs in %XINDICE_HOME%\java\lib, but did not solve problem. There are JARs as well in %XINDICE_HOME%\tools\lib (including xerces-2.6.0).
System CLASSPATH variable is ignored by Tomcat.
Noticed at Tomcat startup that Xindice classes did nt load and that Coyote HTTP/1.1 was not initialized. Should the section in server.xml relating to Coyote be uncommented? Lastly, noticed at Tomcat startup that "server.properties not found ... using default properties ...
Opening database: C:\jakarta-tomcat-4.0.4\webapps\cocoon\WEB-INF\db\cocoondb ... HSQLDB server 1.7.1 is running ..." [but don't have Context for Cocoon in server.xml]
Then, it means, that you have Cocoon in the webapps folder.
Vadim
