Regarding getting the working directory set, I got the cwd set to mysolr home by using a tomcat startup system property. In windows, there is a UI for Tomcat where you can set these java options:
-Dsolr.solr.home=C:\Appsolar -Dsolr.data.dir=C:\Appsolar\data In that UI, there is also a "Working Path" you can set up under the "Startup" tab, which I set to C:\Appsolar When I start Tomcat, in my Catalina log, I get this: INFO: No /solr/home in JNDI Dec 16, 2009 7:34:22 AM org.apache.solr.core.SolrResourceLoader locateSolrHome INFO: using system property solr.solr.home: C:\Appsolar Dec 16, 2009 7:34:22 AM org.apache.solr.core.SolrResourceLoader <init> INFO: Solr home set to 'C:\Appsolar\' Dec 16, 2009 7:34:22 AM org.apache.solr.core.SolrResourceLoader replaceClassLoader INFO: Adding 'file:/C:/Appsolar/lib/jetty-6.1.3.jar' to classloader Dec 16, 2009 7:34:22 AM org.apache.solr.core.SolrResourceLoader replaceClassLoader INFO: Adding 'file:/C:/Appsolar/lib/jetty-util-6.1.3.jar' to classloader Dec 16, 2009 7:34:22 AM org.apache.solr.core.SolrResourceLoader replaceClassLoader INFO: Adding 'file:/C:/Appsolar/lib/jsp-2.1/' to classloader Dec 16, 2009 7:34:22 AM org.apache.solr.core.SolrResourceLoader replaceClassLoader INFO: Adding 'file:/C:/Appsolar/lib/ojdbc14.jar' to classloader Dec 16, 2009 7:34:22 AM org.apache.solr.core.SolrResourceLoader replaceClassLoader INFO: Adding 'file:/C:/Appsolar/lib/servlet-api-2.5-6.1.3.jar' to classloader Dec 16, 2009 7:34:22 AM org.apache.solr.servlet.SolrDispatchFilter init INFO: SolrDispatchFilter.init() Dec 16, 2009 7:34:22 AM org.apache.solr.core.SolrResourceLoader locateSolrHome INFO: No /solr/home in JNDI Dec 16, 2009 7:34:22 AM org.apache.solr.core.SolrResourceLoader locateSolrHome INFO: using system property solr.solr.home: C:\Appsolar Dec 16, 2009 7:34:22 AM org.apache.solr.core.CoreContainer$Initializer initialize INFO: looking for solr.xml: C:\Appsolar\solr.xml Dec 16, 2009 7:34:22 AM org.apache.solr.core.SolrResourceLoader <init> INFO: Solr home set to 'C:\Appsolar\' Dec 16, 2009 7:34:22 AM org.apache.solr.core.SolrResourceLoader replaceClassLoader INFO: Adding 'file:/C:/Appsolar/lib/jetty-6.1.3.jar' to classloader Dec 16, 2009 7:34:22 AM org.apache.solr.core.SolrResourceLoader replaceClassLoader INFO: Adding 'file:/C:/Appsolar/lib/jetty-util-6.1.3.jar' to classloader Dec 16, 2009 7:34:22 AM org.apache.solr.core.SolrResourceLoader replaceClassLoader INFO: Adding 'file:/C:/Appsolar/lib/jsp-2.1/' to classloader Dec 16, 2009 7:34:22 AM org.apache.solr.core.SolrResourceLoader replaceClassLoader INFO: Adding 'file:/C:/Appsolar/lib/ojdbc14.jar' to classloader Dec 16, 2009 7:34:22 AM org.apache.solr.core.SolrResourceLoader replaceClassLoader INFO: Adding 'file:/C:/Appsolar/lib/servlet-api-2.5-6.1.3.jar' to classloader Dec 16, 2009 7:34:22 AM org.apache.solr.core.SolrConfig initLibs INFO: Adding specified lib dirs to ClassLoader Dec 16, 2009 7:34:23 AM org.apache.solr.core.SolrConfig <init> INFO: Loaded SolrConfig: solrconfig.xml Dec 16, 2009 7:34:23 AM org.apache.solr.core.SolrCore <init> INFO: Opening new SolrCore at C:\Appsolar\, dataDir=C:\Appsolar\data\ -----Original Message----- From: Turner, Robbin J [mailto:robbin.j.tur...@boeing.com] Sent: Tuesday, December 15, 2009 4:29 PM To: solr-user@lucene.apache.org Subject: RE: Request Assistance with DIH Thanks for the reply, just what I was looking for in answer. I am running under Tomcat 6 on Solaris 10, the person that replied before you looks like they running under jetty. I have configured jndi context. I stop and start tomcat using the Solaris SMF, equivalent to services in linux. But my cwd is point to root, I have solr home specified in Catalina/localhost/solr.xml. Is there anything else that I can do to force cwd to point to solr/home? Thanks again Robbin -----Original Message----- From: Ken Lane (kenlane) [mailto:kenl...@cisco.com] Sent: Monday, December 14, 2009 11:04 AM To: solr-user@lucene.apache.org Subject: RE: Request Assistance with DIH Hi Robbin, I just went through this myself (I am a newbie). The key things to look at are: 1. Your data_config.xml. I created a table called 'foo' and an ora_data_config.xml file with a simple example to get it working that looks like this: <dataConfig> <dataSource type="JdbcDataSource" driver="oracle.jdbc.driver.OracleDriver" url="jdbc:oracle:thin:@servername.cisco.com:1521:sidname" user="scott" password="tiger"/> <document> <entity name="user" query="SELECT id, username from foo"> </entity> </document> </dataConfig> Some gotcha's: If your Oracle DB is configured with Service_name rather than SID (ie. You may be running failover, RAC, etc), the url parameter of jdbc connection can read like this: url="jdbc:oracle:thin:@(DESCRIPTION = (LOAD_BALANCE = on) (FAILOVER = on) (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = <your_server_name_here>.cisco.com)(PORT = 1528))) (CONNECT_DATA = (SERVICE_NAME = <your_service_name>.<your domain>.COM)))" 2. In your solr_config.xml file, add something like this to reference the above listed file: <requestHandler name="/dataimport" class="org.apache.solr.handler.dataimport.DataImportHandler"> <lst name="defaults"> <str name="config">ora-data-config.xml</str> </lst> </requestHandler> 3. I have Solr1.4 running under Tomcat 6. It looks like you are trying the jetty example, but pay mind to getting the "cwd" pointing to your solr home by setting your JNDI path as described in the dataimporthandler wiki. 4. When it blows up, as it did numerous times for me until I got it right, check the logs. As I am running under Tomcat, I was able to check <tomcat_home>\logs\catalina.2009-12-14.log to view DIH errors both upon restart of Tomcat and after running the DIH. 5. There are some tools to check your JDBC connection you might try before pulling too much of your hair out. Try here: http://otn.oracle.com/sample_code/tech/java/sqlj_jdbc/content.html Good Luck! Ken -----Original Message----- From: Turner, Robbin J [mailto:robbin.j.tur...@boeing.com] Sent: Monday, December 14, 2009 10:27 AM To: solr-user@lucene.apache.org Subject: RE: Request Assistance with DIH How does this help answer my question? I am trying to use the DATAImportHandler Development console. The url you suggest assumes I had it working already. Looking at my logs and the response to the Development console, it does not appear that the connection to Oracle is being made. So if someone could offer some configuration/connection setup directions I would very much appreciate it. Thanks Robbin -----Original Message----- From: Joel Nylund [mailto:jnyl...@yahoo.com] Sent: Friday, December 11, 2009 8:26 PM To: solr-user@lucene.apache.org Subject: Re: Request Assistance with DIH add ?command=full-import to your url http://localhost:8983/solr/dataimport?command=full-import thanks Joel On Dec 11, 2009, at 7:45 PM, Robbin wrote: > I've been trying to use the DIH with oracle and would love it if > someone could give me some pointers. I put the ojdbc14.jar in both > the Tomcat lib and <solr home>/lib. I created a dataimport.xml and > enabled it in the solrconfig.xml. I go to the http://<solr server>/ > solr/admin/dataimport.jsp. This all seems to be fine, but I get the > default page response and doesn't look like the connection to the > oracle server is even attempted. > > I'm using the Solr 1.4 release on Nov 10. > Do I need an oracle client on the server? I thought having the ojdbc > jar should be sufficient. Any help or configuration examples for > setting this up would be much appreciated. > > Thanks > Robbin