Details

    • Type: Bug
    • Status: Deployed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.0.0.195
    • Fix Version/s: 5.0.0.197
    • Labels:
      None
    • Environment:

      Folowing lucene libraries were added to tomcat common.loader:
      lucene-analyzers-common-5.2.1.jar
      lucene-core-5.2.1.jar
      lucene-facet-5.2.1.jar
      lucene-queryparser-5.2.1.jar

      Description

      Getting error when trying to create Lucene 5 java class. Same code works fine in 4.5.2.

      Error after first execution:
      Message: An SPI class of type org.apache.lucene.codecs.Codec with name 'Lucene50' does not exist. You need to add the corresponding JAR file supporting this SPI to your classpath. The current classpath supports the following names: []
      StackTrace: lucee.runtime.exp.NativeException: An SPI class of type org.apache.lucene.codecs.Codec with name 'Lucene50' does not exist. You need to add the corresponding JAR file supporting this SPI to your classpath. The current classpath supports the following names: [] at org.apache.lucene.util.NamedSPILoader.lookup(NamedSPILoader.java:109) at org.apache.lucene.codecs.Codec$Holder.<clinit>(Codec.java:60) at org.apache.lucene.codecs.Codec.getDefault(Codec.java:140) ...

      Error after second execution:
      Message: Could not initialize class org.apache.lucene.codecs.Codec$Holder
      StackTrace: lucee.runtime.exp.NativeException: Could not initialize class org.apache.lucene.codecs.Codec$Holder at org.apache.lucene.codecs.Codec.getDefault(Codec.java:140) at org.apache.lucene.index.LiveIndexWriterConfig.<init>(LiveIndexWriterConfig.java:115) at org.apache.lucene.index.IndexWriterConfig.<init>(IndexWriterConfig.java:163) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ...

      Code to reproduce:

      <cftry>
      	<cfset charArraySet = createObject("java", "org.apache.lucene.analysis.util.CharArraySet")>
      	<cfset analyzer = createObject("java","org.apache.lucene.analysis.standard.StandardAnalyzer").init(charArraySet.EMPTY_SET)>
      	<cfset config = createObject("java", "org.apache.lucene.index.IndexWriterConfig").init(analyzer)>
      	<cfcatch>
      		<cfdump var="#cfcatch#">
      	</cfcatch>
      </cftry>
      

        Attachments

        1. lucene-analyzers-common-5.2.1.jar
          1.48 MB
        2. lucene-core-5.2.1.jar
          2.24 MB
        3. lucene-facet-5.2.1.jar
          173 kB
        4. lucene-queryparser-5.2.1.jar
          391 kB
        5. screenshot-1.png
          1 kB
        6. screenshot-2.png
          33 kB
        7. Screen Shot 2016-02-25 at 17.07.17.png
          41 kB

          Activity

            People

            • Assignee:
              michaeloffner Michael Offner
              Reporter:
              trototo Andrii Salamatin
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: