lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dominik Siebel (JIRA)" <>
Subject [jira] [Commented] (SOLR-2141) NullPointerException when using escapeSql function
Date Mon, 26 Nov 2012 12:48:59 GMT


Dominik Siebel commented on SOLR-2141:

After I finally had some time to check whether the indexed results (after the update) are
as I expect them to be I had to find out that the importer did not throw any NPE's now, instead
the fields are just missing.
I have 7 fields defined in my nested entity that use escapeSql. Those are the exact fields
that don't get indexed now :-/
Any other suggestions? ;)

I will have a look at the changed DIH code, maybe i can figure out where this is coming from.
> NullPointerException when using escapeSql function
> --------------------------------------------------
>                 Key: SOLR-2141
>                 URL:
>             Project: Solr
>          Issue Type: Bug
>          Components: contrib - DataImportHandler
>    Affects Versions: 1.4.1
>         Environment: openjdk 1.6.0 b12
>            Reporter: Edward Rudd
>            Assignee: Koji Sekiguchi
>         Attachments: dih-config.xml, dih-file.xml, SOLR-2141.b341f5b.patch, SOLR-2141.patch,
SOLR-2141.patch, SOLR-2141-sample.patch, SOLR-2141-test.patch
> I have two entities defined, nested in each other..
> <entity name="article" query="select category, subcategory from articles">
>    <entity name="other" query="select other from othertable where category='${dataimporter.functions.escapeSql(article.category)}'
>               AND subcategory='${dataimporter.functions.escapeSql(article.subcategory)}'">
>    </entity>
> </entity>
> Now, when I run that it bombs on any article where subcategory = '' (it's a NOT NULL
column so empty string is there)  If i do where subcategory!='' in the article query it works
fine (aside from not pulling in all of the articles).
> org.apache.solr.handler.dataimport.DataImportHandlerException: java.lang.NullPointerException
>         at org.apache.solr.handler.dataimport.DocBuilder.buildDocument(
>         at org.apache.solr.handler.dataimport.DocBuilder.buildDocument(
>         at org.apache.solr.handler.dataimport.DocBuilder.doFullDump(
>         at org.apache.solr.handler.dataimport.DocBuilder.execute(
>         at org.apache.solr.handler.dataimport.DataImporter.doFullImport(
>         at org.apache.solr.handler.dataimport.DataImporter.runCmd(
>         at org.apache.solr.handler.dataimport.DataImporter$
> Caused by: java.lang.NullPointerException
>         at org.apache.solr.handler.dataimport.EvaluatorBag$1.evaluate(
>         at org.apache.solr.handler.dataimport.EvaluatorBag$5.get(
>         at org.apache.solr.handler.dataimport.EvaluatorBag$5.get(
>         at org.apache.solr.handler.dataimport.VariableResolverImpl.resolve(
>         at org.apache.solr.handler.dataimport.TemplateString.fillTokens(
>         at org.apache.solr.handler.dataimport.TemplateString.replaceTokens(
>         at org.apache.solr.handler.dataimport.VariableResolverImpl.replaceTokens(
>         at org.apache.solr.handler.dataimport.SqlEntityProcessor.nextRow(
>         at org.apache.solr.handler.dataimport.EntityProcessorWrapper.nextRow(
>         at org.apache.solr.handler.dataimport.DocBuilder.buildDocument(
>         ... 6 more

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message