Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.


Problems with Tutorial 1

  • dayrinni

    I am trying to do tutorial 1 but having major problems. I am using 1.0-rc2.

    This is my test class:

    public static void main ( String[] args )

            String indexDir = "C:\\James' Stuff\\Programs\\eclipse\\workspace\\Searching\\Sources";

            String toIndex = "openoffice.ods";

            String liusConfig = "liusConfig.xml";

            File file = new File(toIndex);

            System.out.println("File name: " + file.getAbsolutePath());

            LiusConfig lc = LiusConfigBuilder.getSingletonInstance().getLiusConfig(

            Indexer indexer = IndexerFactory.getIndexer(file, lc);




    The openoffice.ods and LiusConfig.xml is in the project directory. I know it is able to get to these files as I have tested it.

    When I run the above code, I get this:

    File name: C:\James' Stuff\Programs\eclipse\workspace\Searching\openoffice.ods
    1173489702984 INFO [class] Read serialized mimetype definitions: 405 known mimetypes, 2140 bytes to read for the longest match, 9 literal globs, 428 end globs, 2 start globs, 4 shell globs.
    Exception in thread "main" java.lang.NullPointerException
        at lius.index.IndexerFactory.getIndexer(
        at drivers.LIUSDriver.main(

    After doing some debugging, it is finding some problems with the mimetype stuff.

    What am I doing wrong?

    Thank you.