Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7505515
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T21:56:22+00:00 2026-05-29T21:56:22+00:00

I am working on getting lucene indexing working on Google App Engine. I am

  • 0

I am working on getting lucene indexing working on Google App Engine.
I am using a ramdirectory to make the index and then serializing it (the ramdirectory object) to memcache and blobstore for persistent storage.
http://code.google.com/appengine/docs/java/blobstore/overview.html#Writing_Files_to_the_Blobstore
For search I just deserialize it and use in my searches.

I am facing a null pointer exception when I close the indexwriter.

I think that might have something to do with the fact that only the following libraries are supported in google app engine.
http://code.google.com/appengine/docs/java/jrewhitelist.html

I am using lucene 3.5.0 and app engine java version 1.6.1

The following is the stack trace which i get

java.lang.NullPointerException
at org.apache.lucene.store.DataOutput.writeString(DataOutput.java:103)
at org.apache.lucene.store.DataOutput.writeStringStringMap(DataOutput.java:189)
at org.apache.lucene.index.SegmentInfo.write(SegmentInfo.java:623)
at org.apache.lucene.index.SegmentInfos.write(SegmentInfos.java:394)
at org.apache.lucene.index.SegmentInfos.prepareCommit(SegmentInfos.java:872)
at org.apache.lucene.index.IndexWriter.startCommit(IndexWriter.java:4601)
at org.apache.lucene.index.IndexWriter.prepareCommit(IndexWriter.java:3453)
at org.apache.lucene.index.IndexWriter.commitInternal(IndexWriter.java:3524)
at org.apache.lucene.index.IndexWriter.closeInternal(IndexWriter.java:1879)
at org.apache.lucene.index.IndexWriter.close(IndexWriter.java:1822)
at org.apache.lucene.index.IndexWriter.close(IndexWriter.java:1786)

The code works properly on my local machine (I haven’t added much of a code , just added some sample documents and did a indexwriter.close())

Has someone faced this problem before ?? and if so is there a workaround for it ??

The code where I am finding the problem is simple

RAMDirectory dir = new RAMDirectory();
IndexWriterConfig config = new IndexWriterConfig(Version.LUCENE_35, new StandardAnalyzer(Version.LUCENE_35));
IndexWriter writer = new IndexWriter(dir,config); 
Document doc;
doc = new Document();
doc.add(new Field("text","mary had a little lamb", Store.YES, Index.ANALYZED));
writer.addDocument(doc)
writer.close();

the exception is thrown when i am trying to close the writer in the last line

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T21:56:23+00:00Added an answer on May 29, 2026 at 9:56 pm

    the problem is that for some reason Lucene tries to store os.version and os.arch in index.

    I don’t know why, however the solution is adding the properties to your appengine-web.xml:

    <system-properties>
        <property name="os.version" value="1.0.GAE whatever" />
        <property name="os.arch" value="GAE whatever" />
    </system-properties>
    

    and it will work for you. Hope that helps 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on getting calendar data from google using OmniAuth and the google-oauth-2 strategy.
I am working on getting a Bullet engine integrated with the rest of a
I've been working on getting our Rails 2.3.8 app running correctly under JRuby. Everything
I've been working on getting an image to upload from my iOS app to
Working on getting a legacy app up and running again for work. I'm getting
I have been working on getting $.ajax data compiled by using an php class
Following on from my previous question I have been working on getting my object
I'm working on getting some legacy code under test, and we're using Moq 4
I'm working on getting capistrano to publish my PlayFramework app, but I'm having some
In my just-completed project, I was working getting distributed transactions working. We implemented this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.