lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ken Lane (kenlane)" <>
Subject RE: Request Assistance with DIH
Date Mon, 14 Dec 2009 16:04:24 GMT
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:

  <dataSource type="JdbcDataSource" 
    <entity name="user" 
            query="SELECT id, username from foo">

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)
<your_server_name_here> = 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"
  <lst name="defaults">
    <str name="config">ora-data-config.xml</str>

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:

Good Luck!

-----Original Message-----
From: Turner, Robbin J [] 
Sent: Monday, December 14, 2009 10:27 AM
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.


-----Original Message-----
From: Joel Nylund [] 
Sent: Friday, December 11, 2009 8:26 PM
Subject: Re: Request Assistance with DIH

add ?command=full-import to your url



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

View raw message