JRuby + Neo4J Problems

I have JRuby on Rails app, which is using an ueber JAR to access Neo4J. The Neo4J database is in the rails root directory unter “data/”. By starting the HTTP Server I got today this Exception:

IllegalArgumentException: No index provider 'lucene' found. Maybe the intended provider (or one more of its dependencies) aren't on the classpath or it failed to load.

The problem was in the “data/”. In some way it was corrupt. I am not sure. After I exchanged the “data/” directory with an older version, the HTTP Server started without any problems.

6 thoughts on “JRuby + Neo4J Problems

    1. Hi Andreas.

      I am not using the Neo4j::Model. I have in my JRuby App just one single ueber JAR. 21 MB. This ueber JAR contains my backend logic written in Java with all dependencies. This ueber JAR contains also all necessary neo4j JARs. I am building the ueber JAR with Maven3. It works pretty good.

      I don’t think that there is a problem with the ueber JAR. It had something to do with “/data” directory, which contains the Neo4J database. I think it was corrupt. Maybe because I didn’t shutdown Neo4J correctly. I just killed the process. But from a sophisticated database engine I expect that it can effort a “kill” command and continue after a restart.

      That do you think?

  1. Should not be a problem doing shutdown with kill. I do kill -9 all the time.
    It will just start up and recover the database.
    Can you start up a rails console, or just an IRB console and check if you can read any of the data, something like this:

    irb > require ‘rubygems’
    irb > require ‘neo4j’
    irb > Neo4j::Config[:storage_pah] = ‘/x/y/db’
    irb > Neo4j.start # it will printout if it recovers
    irb > Neo4j.ref_node.outgoing ….

    Maybe could be problem with using a different version of neo4j and an upgrade is needed:
    http://neo4j.rubyforge.org/guides/configuration.html#upgrade-to-a-new-neo4j-version

  2. Same happened to me.Thanks to your post i could fix it. Data corruption with the index. Once i replace the database with the old one everything worked.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s