2013-07-31 32 views
0

在我的DB-數據-config.xml中我已經配置了兩個數據源,每個具有自己的參數名, 例如:從dataimportsolr的4.4多個數據源連接

<dataSource name="test1" 
    type="JdbcDataSource" 
    driver="com.mysql.jdbc.Driver" 
    url="jdbc:mysql://localhost/firstdb" 
    user="username1" 
    password="psw1"/> 

<dataSource name="test2" 
    type="JdbcDataSource" 
    driver="com.mysql.jdbc.Driver" 
    url="jdbc:mysql://localhost/seconddb" 
    user="username2" 
    password="psw2"/> 

<document name="content"> 
     <entity name="news" datasource="test1" query="select..."> 
     <field column="OTYPE_ID" name="otypeID" /> 
      <field column="NWS_ID" name="cntID" /> 
      .... 
     </entity> 

     <entity name="news_update" datasource="test2" query="select..."> 
     <field column="OTYPE_ID" name="otypeID" /> 
      <field column="NWS_ID" name="cntID" /> 
      .... 
     </entity> 
</document> 
</dataConfig> 

但是當在我的solr執行第二實體名稱查詢它推出一個例外:

表‘firstdb.secondTable’不存在\ n \達」 可能有人幫助我嗎?預先感謝您

回答

0

認爲您對news_update的查詢是錯誤的。您的表名必須有錯誤。

0

我很確定這個問題出現在solr用戶郵件列表中。給出的答案是,您在實體標記中使用數據源而不是數據源。區分大小寫。如果我正確地記住了這個線程,改變它可以解決你的問題。