Hi,

Thanks for your anwser, it made me go ahead.
The name of the entity was not good, not consistent with schema
Now the first entity works fine: the query is done to the database and
returns the good result.
The problem is that the second entity, which is a XPathEntityProcessor
entity, doesn't read the file specified in url attribute, but tries to
execute it as an sql query on my database.

I tried to put a fake query (select 1 from dual) but it changes nothing.
It's like the XPathEntityProcessor entity behaved like an
SqlEntityProcessor, using url attribute instead of query attrbute.

I've forgotten to say which version I use: SOLR 4.2.1 (can be changed, it's
just the beginning of the developpement)
See next the config, and the return message:


The verbose output:

  "verbose-output":[
    "entity:noticebib",[
      "query","select DISTINCT   SUBSTR( to_char(noticebib.numnoticebib,
'999999999'), 3, 1) || '/' ||    SUBSTR( to_char(noticebib.numnoticebib,
'999999999'), 4, 1) || '/' ||    SUBSTR( to_char(noticebib.numnoticebib,
'999999999'), 5, 3) || '/' ||    to_char(noticebib.numnoticebib) || '.xml'
as CHEMINRELATIF   from bnf.noticebib    where numnoticebib = '30000001'",
      "time-taken","0:0:0.141",
      null,"----------- row #1-------------",
      "CHEMINRELATIF","3/0/000/30000001.xml",
      null,"---------------------------------------------",
      "entity:processorDocument",[
        "document#1",[
          "query","file:///D:/jed/noticesbib/3/0/000/30000001.xml",

"EXCEPTION","org.apache.solr.handler.dataimport.DataImportHandlerException:
Unable to execute query: file:///D:/jed/noticesbib/3/0/000/30000001.xml
Processing Document # 1\r\n\tat
org.apache.solr.handler.dataimport.DataImportHandlerException.wrapAndThrow
(DataImportHandlerException.java:71)\r\n\tat ...
oracle.jdbc.driver.OracleStatementWrapper.execute
(OracleStatementWrapper.java:1203)\r\n\tat
org.apache.solr.handler.dataimport.JdbcDataSource$ResultSetIterator.<init>
(JdbcDataSource.java:246)\r\n\t... 32 more\r\n",
          "time-taken","0:0:0.124"]]]],


This is the configuration


                <dataSource name="accesPCN"
                                        my oracle ds definition.../>

                <dataSource name="racineNoticeDatasource"
baseUrl="file:///D:/jed/noticesBib" type="URLDataSource" encoding="UTF-8"/>

        <document>


                                <entity name="noticebib"
                                        datasource="accesPCN"
                                        processor="SqlEntityProcessor"
                                        rootEntity="false"
                                        query="select DISTINCT
                SUBSTR( to_char(noticebib.numnoticebib, '999999999'), 3, 1) ||
'/' ||
                SUBSTR( to_char(noticebib.numnoticebib, '999999999'), 4, 1) ||
'/' ||
                SUBSTR( to_char(noticebib.numnoticebib, '999999999'), 5, 3) ||
'/' ||
                to_char(noticebib.numnoticebib) || '.xml' as CHEMINRELATIF
                from bnf.noticebib
                where numnoticebib = '30000001'"
                                        >
                                                <field column="CHEMINRELATIF"
name="CHEMINRELATIF" />

                                                <entity  
name="processorDocument"
                                                processor="XPathEntityProcessor"
                                                
datasource="racineNoticeDatasource"
                                                url="file:///D:/jed/noticesbib/$
{noticebib.CHEMINRELATIF}"
                                                query="SELECT 1 from dual"
                                                xsl="xslt/mnb/IXM_MNb.xsl"
                                                forEach="/record"

transformer="LogTransformer,fr.bnf.solr.BnfDateTransformer"
                                                logTemplate="Notice fichier: $
{noticebib.CHEMINRELATIF}" logLevel="debug"
                                                >



Cordialement,
-----------------------------------------------
Jérôme Dupont
Bibliothèque Nationale de France
Département des Systèmes d'Information
Tour T3 - Quai François Mauriac
75706 Paris Cedex 13
téléphone: 33 (0)1 53 79 45 40
e-mail: jerome.dup...@bnf.fr
-----------------------------------------------

Exposition  Guy Debord, un art de la guerre  - du 27 mars au 13 juillet 2013 - 
BnF - François-Mitterrand / Grande Galerie Avant d'imprimer, pensez à 
l'environnement. 

Reply via email to