I have just started playing around with Solr and I have it deployed and running on Tomcat. I have the schema and data import handler set up and it indexes the files just fine. Now I want to schedule this dataImportHandler to run every hour or so.
There is a wiki page detailing the files here.
But there are not instructions on where to create the files and how to deploy them
A similar question has been asked on Stack Overflow before here.
The answer was to "Create classes ApplicationListener, HTTPPostScheduler and SolrDataImportProperties". I don't know where I should be creating the classes. But I took a guess and I downloaded the latest nightly build and created the classes in the org.apache.solr.handler.dataimport.scheduler package (copy pasting the classes from the wiki page). I compiled and ran the ant dist command to create the deployable jar files.
I configured the dataimport.properties as per the instructions in the wiki and then added the listener in the web.xml file as instructed in the answer above. But when I started Tomcat solr was not deployed.
I see this error message in the log file:
INFO: Starting Servlet Engine: Apache Tomcat/7.0.14
Jun 21, 2011 5:20:47 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor solr.xml from /home/sabman/programs/apache-tomcat-7.0.14/conf/Catalina/localhost
Jun 21, 2011 5:20:47 PM org.apache.catalina.startup.HostConfig deployDescriptor
WARNING: A docBase /home/sabman/programs/apache-tomcat-7.0.14/webapps/solr.war inside the host appBase has been specified, and will be ignored
Jun 21, 2011 5:20:47 PM org.apache.catalina.startup.SetContextPropertiesRule begin
WARNING: [SetContextPropertiesRule]{Context} Setting property 'debug' to '0' did not find a matching property.
Jun 21, 2011 5:20:48 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error listenerStart
I had to remove listener code from the web.xml for it work as it was before.
Any idea about what I could be doing wrong?