lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gunnlaugur Thor Briem (JIRA)" <j...@apache.org>
Subject [jira] [Created] (SOLR-5916) DIH datasource init borks if url attribute contains two property references
Date Wed, 26 Mar 2014 16:42:14 GMT
Gunnlaugur Thor Briem created SOLR-5916:
-------------------------------------------

             Summary: DIH datasource init borks if url attribute contains two property references
                 Key: SOLR-5916
                 URL: https://issues.apache.org/jira/browse/SOLR-5916
             Project: Solr
          Issue Type: Bug
          Components: contrib - DataImportHandler
    Affects Versions: 4.7
            Reporter: Gunnlaugur Thor Briem
            Priority: Minor


With a datasource set up like this:

{code:xml}
<dataSource driver="org.postgresql.Driver"
name="meta" url="jdbc:postgresql://${dbhost:foo}.datamarket.net/${solr.core.name}"
user="solr"
password="${dbpassword}"
readOnly="true"
autoCommit="false"
transactionIsolation="TRANSACTION_READ_COMMITTED" holdability="CLOSE_CURSORS_AT_COMMIT"
/>
{code}

(where dbhost and dbpassword are set in solrcore.properties)

... the datasource initialization (and thus any import) fails with:

{code}
1478540 [Thread-6] ERROR org.apache.solr.handler.dataimport.DataImporter  – Full Import
failed:java.lang.RuntimeException: java.lang.RuntimeException: org.apache.solr.handler.dataimport.DataImportHandlerException:
Failed to initialize DataSource: meta Processing Document # 1
        at org.apache.solr.handler.dataimport.DocBuilder.execute(DocBuilder.java:276)
        at org.apache.solr.handler.dataimport.DataImporter.doFullImport(DataImporter.java:411)
        at org.apache.solr.handler.dataimport.DataImporter.runCmd(DataImporter.java:483)
        at org.apache.solr.handler.dataimport.DataImporter$1.run(DataImporter.java:464)
Caused by: java.lang.RuntimeException: org.apache.solr.handler.dataimport.DataImportHandlerException:
Failed to initialize DataSource: meta Processing Document # 1
        at org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilder.java:416)
        at org.apache.solr.handler.dataimport.DocBuilder.doFullDump(DocBuilder.java:329)
        at org.apache.solr.handler.dataimport.DocBuilder.execute(DocBuilder.java:237)
        ... 3 more
Caused by: org.apache.solr.handler.dataimport.DataImportHandlerException: Failed to initialize
DataSource: meta Processing Document # 1
        at org.apache.solr.handler.dataimport.DataImportHandlerException.wrapAndThrow(DataImportHandlerException.java:71)
        at org.apache.solr.handler.dataimport.DataImporter.getDataSourceInstance(DataImporter.java:385)
        at org.apache.solr.handler.dataimport.ContextImpl.getDataSource(ContextImpl.java:99)
        at org.apache.solr.handler.dataimport.SqlEntityProcessor.init(SqlEntityProcessor.java:53)
        at org.apache.solr.handler.dataimport.EntityProcessorWrapper.init(EntityProcessorWrapper.java:74)
        at org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilder.java:433)
        at org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilder.java:414)
        ... 5 more
Caused by: java.lang.ArrayIndexOutOfBoundsException: -1
        at org.apache.solr.handler.dataimport.VariableResolver.resolve(VariableResolver.java:112)
        at org.apache.solr.handler.dataimport.VariableResolver.replaceTokens(VariableResolver.java:155)
        at org.apache.solr.handler.dataimport.ContextImpl.replaceTokens(ContextImpl.java:254)
        at org.apache.solr.handler.dataimport.JdbcDataSource.resolveVariables(JdbcDataSource.java:229)
        at org.apache.solr.handler.dataimport.JdbcDataSource.createConnectionFactory(JdbcDataSource.java:103)
        at org.apache.solr.handler.dataimport.JdbcDataSource.init(JdbcDataSource.java:64)
        at org.apache.solr.handler.dataimport.DataImporter.getDataSourceInstance(DataImporter.java:383)
        ... 10 more
{code}

I changed that url attribute to:

{code}
url="jdbc:postgresql://${dbhost:hulk.datamarket.net}/${solr.core.name}"
{code}

and now it runs without problems.

So presumably there's a bug in parsing property references.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message