Google Groups

Re: [Neo4j] Issue with Custom full text lucene index

Peter Neubauer May 9, 2012 12:20 PM
Posted in group: Neo4j

Got the project somewhere? Sounds like something around maybe underlying OSGi separating your code and the loading index?

Send from mobile.

On May 9, 2012 8:49 PM, "Daniel" <> wrote:
Hey Guys,

I implemented a custom analyzer(CustomAnalyzer)  for lucene overriding
the ReusableAnalyzerBase class. Created an full text index during a
batch import operation

fulltextIndex = indexProvider.nodeIndex("mainTextParagraphs",
MapUtil.stringMap("type", "fulltext", "analyzer",

everything works the db imports.

I then tested the db in a standalone project with the following code,
again everything works.
(PASTIE here)

When I try running it on an MVC that we are building I get a class not
found exception.

Caused by: java.lang.ClassNotFoundException:
       at Method)
       at java.lang.ClassLoader.loadClass(
       at sun.misc.Launcher$AppClassLoader.loadClass(
       at java.lang.ClassLoader.loadClass(
       at java.lang.Class.forName0(Native Method)
       at java.lang.Class.forName(

I checked the classLoader and the class is present there with a single
instance & proper name.

I thought this may be a security permissions issue and surrounded the
index assignment with

AccessController.doPrivileged(new PrivilegedAction() {
                               public Object run(){
                                       fulltextIndex =
MapUtil.stringMap("type", "fulltext",
fulltextIndex ).setCacheCapacity( "mainTextParagraphs", cacheSize );
                               return null;

still same error, I also tried forcibly loading the classloader, same

I am stumped do you guys have any idea what this is?

Thanks for the help