FAQ

Search Discussions

  • Ian Lea at Jul 30, 2010 at 1:40 pm
    Your linux set up is evidently missing a jar file - the one that contains
    org/apache/lucene/index/memory/MemoryIndex. Or it is there but not in the
    CLASSPATH, or something else along those lines.


    --
    Ian.

    On Fri, Jul 30, 2010 at 2:30 PM, Markus Roth wrote:



    Hello everyone,

    I'm using lucene for obvious purposes and I'm trying to highlight
    search-term results.

    libraries I use:
    lucene-core version: 3.0.2
    lucene-highlighter version: 3.0.2

    Dev-System:
    WinXP Pro 32Bit, jdk1.6.0_20,
    java version "1.6.0_20"
    Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
    Java HotSpot(TM) Client VM (build 16.3-b01, mixed mode, sharing)

    Server-System:
    Centos 5.4 Final x64 (in a VM),
    java version "1.6.0"
    OpenJDK Runtime Environment (build 1.6.0-b09)
    OpenJDK 64-Bit Server VM (build 1.6.0-b09, mixed mode)

    I created a small Httpserver(in Java) that responds to POST/GET. A small
    form will POST search terms which are then passed
    to the IndexSearcher. After that the highlighter is supposed to highlight
    search-term hits. (everything is set to use UTF-8)

    When I use * as a wildcard in a search-term while the application is
    running in Windows, everything is fine and the results are
    returned as expected. However, same is not true for CentOS. The following
    Exception is thrown for the same build with the same
    query:

    Exception in thread "pool-4-thread-4" java.lang.NoClassDefFoundError:
    org/apache/lucene/index/memory/MemoryIndex
    at
    org.apache.lucene.search.highlight.WeightedSpanTermExtractor$FakeReader.<clinit>(WeightedSpanTermExtractor.java:560)
    at
    org.apache.lucene.search.highlight.WeightedSpanTermExtractor.extract(WeightedSpanTermExtractor.java:153)
    at
    org.apache.lucene.search.highlight.WeightedSpanTermExtractor.extract(WeightedSpanTermExtractor.java:97)
    at
    org.apache.lucene.search.highlight.WeightedSpanTermExtractor.getWeightedSpanTerms(WeightedSpanTermExtractor.java:383)
    at
    org.apache.lucene.search.highlight.QueryScorer.initExtractor(QueryScorer.java:216)
    at
    org.apache.lucene.search.highlight.QueryScorer.init(QueryScorer.java:184)
    at
    org.apache.lucene.search.highlight.Highlighter.getBestTextFragments(Highlighter.java:200)
    at com.stoeu.parsing.stoQueryParser.query(stoQueryParser.java:129)
    at com.stoeu.parsing.stoQueryParser.query(stoQueryParser.java:336)
    at com.stoeu.query.MyHttpHandler.handle(MyHttpHandler.java:127)
    at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:83)
    at sun.net.httpserver.AuthFilter.doFilter(AuthFilter.java:83)
    at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:86)
    at
    sun.net.httpserver.ServerImpl$Exchange$LinkHandler.handle(ServerImpl.java:589)
    at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:83)
    at sun.net.httpserver.ServerImpl$Exchange.run(ServerImpl.java:561)
    at
    java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
    at
    java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
    at java.lang.Thread.run(Thread.java:636)
    Caused by: java.lang.ClassNotFoundException:
    org.apache.lucene.index.memory.MemoryIndex
    at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:323)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:268)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:336)
    ... 19 more


    Anyone got an idea what's wrong?

    Greetings,
    Markus
    +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    Sto AG, Ehrenbachstr.1, D-79780 Stuehlingen

    Vorstand/Board: Jochen Stotmeister (Vorsitzender/Chairman),
    Gerd Stotmeister, Hans-Dieter Schumacher
    Aufsichtsratsvorsitzender/Chairman Supervisory Board:
    Dr. Max-Burkhard Zwosta

    Sitz der Gesellschaft/Head Office: D-79780 Stuehlingen
    Handelsregister/Registration: Amtsgericht Freiburg HRB 620675
    USt-ID/Tax ID: DE142834082
    =============================================================
  • Markus Roth at Jul 30, 2010 at 1:46 pm
  • Ian Lea at Jul 30, 2010 at 1:52 pm
    Because the highlighter only uses MemoryIndex if wildcards are involved? I
    don't use the highlighter package so have no idea if that is correct or not,
    but the message

    java.lang.NoClassDefFoundError: org/apache/lucene/index/memory/MemoryIndex

    is clear. The jvm can't find that class.


    --
    Ian.

    On Fri, Jul 30, 2010 at 2:46 PM, Markus Roth wrote:




    First of all, thanks for your response.
    But how can that be true if a search-term without a wildcard (and the
    highlighting of the results) works fine?

    Greetings,
    Markus


    [image: Inactive hide details for Ian Lea ---30.07.2010 15:42:05---Your
    linux set up is evidently missing a jar file - the one that con]Ian Lea
    ---30.07.2010 15:42:05---Your linux set up is evidently missing a jar file -
    the one that contains


    *Ian Lea <ian.lea@gmail.com>*

    30.07.2010 15:39
    Bitte antworten an
    java-user@lucene.apache.org


    An

    java-user@lucene.apache.org
    Kopie


    Thema

    Re: Highlighter wildcard problems: NoClassDefFoundError in Linux/CentOS
    5.4, works in Windows XP

    Your linux set up is evidently missing a jar file - the one that contains
    org/apache/lucene/index/memory/MemoryIndex. Or it is there but not in the
    CLASSPATH, or something else along those lines.


    --
    Ian.

    +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    Sto AG, Ehrenbachstr.1, D-79780 Stuehlingen

    Vorstand/Board: Jochen Stotmeister (Vorsitzender/Chairman),
    Gerd Stotmeister, Hans-Dieter Schumacher
    Aufsichtsratsvorsitzender/Chairman Supervisory Board:
    Dr. Max-Burkhard Zwosta

    Sitz der Gesellschaft/Head Office: D-79780 Stuehlingen
    Handelsregister/Registration: Amtsgericht Freiburg HRB 620675
    USt-ID/Tax ID: DE142834082
    =============================================================
  • Markus Roth at Jul 30, 2010 at 2:02 pm

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupjava-user @
categorieslucene
postedJul 30, '10 at 1:30p
activeJul 30, '10 at 2:02p
posts5
users2
websitelucene.apache.org

2 users in discussion

Markus Roth: 3 posts Ian Lea: 2 posts

People

Translate

site design / logo © 2022 Grokbase