Solr
  1. Solr
  2. SOLR-2504

Combined usage of Synonyms/SpellChecker causes java.lang.NullPointerException, when searching for a word out of synonyms.txt

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.1
    • Fix Version/s: None
    • Labels:
      None

      Description

      After migrating from 1.4 to 3.1 we experience the following behaviour:

      When SpellChecking is turned off, everything works fine.
      When Synonyms are not being used, everything works fine.

      When both, SpellChecking and Synonyms, are being used and a search is triggered, that contains at least one of the words out of synonyms.txt the following error is thrown:

      java.lang.NullPointerException
      at org.apache.lucene.util.AttributeSource.cloneAttributes(AttributeSource.java:542)
      at org.apache.solr.analysis.SynonymFilter.incrementToken(SynonymFilter.java:132)
      at org.apache.lucene.analysis.FilteringTokenFilter.incrementToken(FilteringTokenFilter.java:58)
      at org.apache.solr.handler.component.SpellCheckComponent.getTokens(SpellCheckComponent.java:485)
      at org.apache.solr.handler.component.SpellCheckComponent.process(SpellCheckComponent.java:131)
      at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:194)
      at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:129)
      at org.apache.solr.core.SolrCore.execute(SolrCore.java:1360)
      at org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:356)
      at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:252)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)
      at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
      at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
      at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
      at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
      at java.lang.Thread.run(Thread.java:619)

      The problem has been described already here:
      http://osdir.com/ml/solr-user.lucene.apache.org/2010-09/msg00945.html

      I have a report of a third person, experiencing the same problem.

        Activity

        Jens Bertheau made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Uwe Schindler made changes -
        Assignee Uwe Schindler [ thetaphi ]
        Jens Bertheau made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 1.4 [ 12313351 ]
        Resolution Fixed [ 1 ]
        Uwe Schindler made changes -
        Comment [ AttributeSource.java:542 does not even exit (neither 3.1, 3.x or trunk) ]
        Uwe Schindler made changes -
        Comment [ AttributeSource.java:542 does not even exist (neither 3.1, 3.x or trunk) ]
        Jens Bertheau made changes -
        Field Original Value New Value
        Description After migrating from 1.4 to 3.1 we experience the following behaviour:

        When SpellChecking is turned off, everything works fine.
        When Synonyms are *not* being used, everything works fine.

        When both, SpellChecking and Synonyms, are being used and a search is triggered, that contains at least one of the words out of synonyms.txt the following error is thrown:

        java.lang.NullPointerException at org.apache.lucene.util.AttributeSource.cloneAttributes(AttributeSource.java:470)
        at org.apache.lucene.analysis.synonym.SynonymFilter.incrementToken(SynonymFilter.java:128)
        at org.apache.lucene.analysis.core.StopFilter.incrementToken(StopFilter.java:260)
        at org.apache.lucene.analysis.miscellaneous.WordDelimiterFilter.incrementToken(WordDelimiterFilter.java:336)
        at org.apache.lucene.analysis.core.LowerCaseFilter.incrementToken(LowerCaseFilter.java:62)
        at org.apache.solr.handler.component.SpellCheckComponent.getTokens(SpellCheckComponent.java:380)
        at org.apache.solr.handler.component.SpellCheckComponent.process(SpellCheckComponent.java:127)
        at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:203)
        at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:131)
        at org.apache.solr.core.SolrCore.execute(SolrCore.java:1323)
        at org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:337)
        at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:240)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:465)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:555)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
        at java.lang.Thread.run(Thread.java:619)

        The problem has been described already here:
        http://osdir.com/ml/solr-user.lucene.apache.org/2010-09/msg00945.html

        I have a report of a third person, experiencing the same problem.
        After migrating from 1.4 to 3.1 we experience the following behaviour:

        When SpellChecking is turned off, everything works fine.
        When Synonyms are *not* being used, everything works fine.

        When both, SpellChecking and Synonyms, are being used and a search is triggered, that contains at least one of the words out of synonyms.txt the following error is thrown:

        java.lang.NullPointerException
                at org.apache.lucene.util.AttributeSource.cloneAttributes(AttributeSource.java:542)
                at org.apache.solr.analysis.SynonymFilter.incrementToken(SynonymFilter.java:132)
                at org.apache.lucene.analysis.FilteringTokenFilter.incrementToken(FilteringTokenFilter.java:58)
                at org.apache.solr.handler.component.SpellCheckComponent.getTokens(SpellCheckComponent.java:485)
                at org.apache.solr.handler.component.SpellCheckComponent.process(SpellCheckComponent.java:131)
                at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:194)
                at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:129)
                at org.apache.solr.core.SolrCore.execute(SolrCore.java:1360)
                at org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:356)
                at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:252)
                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
                at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
                at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
                at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
                at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
                at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
                at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
                at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)
                at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
                at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
                at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
                at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
                at java.lang.Thread.run(Thread.java:619)

        The problem has been described already here:
        http://osdir.com/ml/solr-user.lucene.apache.org/2010-09/msg00945.html

        I have a report of a third person, experiencing the same problem.
        Jens Bertheau created issue -

          People

          • Assignee:
            Uwe Schindler
            Reporter:
            Jens Bertheau
          • Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development