Google Groups

Issue with Custom full text lucene index

Daniel May 9, 2012 11:46 AM
Posted in group: Neo4j
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