You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by bbarani <bb...@gmail.com> on 2010/03/30 22:02:54 UTC

DIH - Unable to connect to a DB using JDBC:ODBC bridge

Hi,

I am trying to index a DB (using SOLR) with JDBC:ODBC bridge driver but
getting the below mentioned error

org.apache.solr.handler.dataimport.DataImportHandlerException: Could not
load driver: {MetaMatrix ODBC} Processing Document # 1

Caused by: java.lang.ClassNotFoundException: Unable to load {MetaMatrix
ODBC} or
 org.apache.solr.handler.dataimport.{MetaMatrix ODBC}
        at
org.apache.solr.handler.dataimport.DocBuilder.loadClass(DocBuilder.java:964)
        at
org.apache.solr.handler.dataimport.JdbcDataSource.createConnectionFactory(JdbcDataSource.java:112)
        ... 12 more
Caused by: org.apache.solr.common.SolrException: Error loading class
'{MetaMatrix ODBC}'

The datasource configuration used by me in DIH

 <dataSource driver="{MetaMatrix ODBC}" url="jdbc:odbc:Driver={MetaMatrix
ODBC};Database=MMOdbcServer;PROTOCOL=mm;ADDRESS=;MMPRT=;VDB=AIT;VDBVERSION=1;PORT=1706"/>

Please find below the JDBC:ODBC URL provided by DB vendor

jdbc:odbc:Driver={MetaMatrix
ODBC};Database=MMOdbcServer;PROTOCOL=mm;ADDRESS=sluxtech08;MMPRT=32000;VDB=DesignTimeCatalog;VDBVERSION=1;PORT=1706

Can someone help me out in forming the proper datasource URL / configuring
driver files for using JDBC:ODBC driver with DIH?

Thanks,
Barani

-- 
View this message in context: http://n3.nabble.com/DIH-Unable-to-connect-to-a-DB-using-JDBC-ODBC-bridge-tp686781p686781.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: DIH - Unable to connect to a DB using JDBC:ODBC bridge

Posted by MitchK <mi...@web.de>.
I can only speculate, since I am not sure, why you are using "{" and "}" in
your declarations. I don't really know what you are expecting "{MetaMatrix
ODBC}" should do.

The mysql-connector can be loaded, because I have set a classpath to it (it
is stored in my JRE's root-directory).

Hope this helps?

Mitch
-- 
View this message in context: http://n3.nabble.com/DIH-Unable-to-connect-to-a-DB-using-JDBC-ODBC-bridge-tp686781p689549.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: DIH - Unable to connect to a DB using JDBC:ODBC bridge

Posted by Silent Surfer <si...@yahoo.com>.
Hi Mitch,

The configuration that you have seems to be perfectly fine .
Could you please let us know what error you are seeing in the logs ?

Also, could you please confirm whether you have the mysql-connector-java-5.1.12-bin.jar under the lib folder ? 

Following is my configuration that I used and works perfectly fine
    <dataSource driver="com.mysql.jdbc.Driver" autoCommit="true" url="jdbc:mysql://localhost:3306/mysql" user="username" password="password" />


Thanks,
sS


----- Original Message ----
From: MitchK <mi...@web.de>
To: solr-user@lucene.apache.org
Sent: Wed, March 31, 2010 12:57:04 AM
Subject: Re: DIH - Unable to connect to a DB using JDBC:ODBC bridge


Hi,

sorry, I have not much experiences in doing this with Solr, but my
data-config.xml looks like:

<dataConfig>
    <dataSource driver="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost:3306/db" user="user" password="..."
batchSize="-1"/>
    <document>
            ....
    </document>
</dataConfig>

The "db" at the end of the url stands for the db you want to use. 

Perhaps this helps a little bit.

Kind regards
- Mitch
-- 
View this message in context: http://n3.nabble.com/DIH-Unable-to-connect-to-a-DB-using-JDBC-ODBC-bridge-tp686781p687887.html
Sent from the Solr - User mailing list archive at Nabble.com.



      


Re: DIH - Unable to connect to a DB using JDBC:ODBC bridge

Posted by MitchK <mi...@web.de>.
Hi,

sorry, I have not much experiences in doing this with Solr, but my
data-config.xml looks like:

<dataConfig>
    <dataSource driver="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost:3306/db" user="user" password="..."
batchSize="-1"/>
    <document>
            ....
    </document>
</dataConfig>

The "db" at the end of the url stands for the db you want to use. 

Perhaps this helps a little bit.

Kind regards
- Mitch
-- 
View this message in context: http://n3.nabble.com/DIH-Unable-to-connect-to-a-DB-using-JDBC-ODBC-bridge-tp686781p687887.html
Sent from the Solr - User mailing list archive at Nabble.com.