Please elaborate...
Here's a code snippet, as you can see I'm not trying to remove or
requesting to remove anything.
//Perform indexing
for (Class entityType : entityTypes){
//read the data from the database
//Scrollable results will avoid loading too many
objects in memory
ScrollableResults results =
fullTextSession.createCriteria( entityType )
.scroll( ScrollMode.FORWARD_ONLY );
while( results.next() ) {
index++;
percentage = (long)((index / total) *
100);
fullTextSession.index( results.get(0) );
if (index % BATCH_SIZE == 0) {
fullTextSession.clear();
}
}
}
From: [email protected] [mailto:[email protected]] On Behalf
Of Manish
Sent: 05 May 2009 10:39 AM
To: [email protected]
Subject: Re: Unable to remove from Lucene index
I guess you are trying to remove or requesting to remove null referenced
object.
Manish B. Joshi
(Adserving Team)
On Tue, May 5, 2009 at 1:58 PM, Enrico Goosen
<[email protected]> wrote:
Hi,
I'm new to Lucene, and I'm getting an exception while trying to do a
manual indexing operation on one of my entities.
It works fine for the Product entity, but fails for the ProductInfo
entity (see attached).
Versions:
hibernate-search 3.0.1.GA <http://3.0.1.ga/>
Lucene 2.3
10:26:57,167 ERROR [IndexerBean] Exception during indexing operation.
org.hibernate.search.SearchException: Unable to remove from Lucene
index: class za.co.mymed.model.Product#null
at
org.hibernate.search.backend.impl.lucene.LuceneWorker.remove(LuceneWorke
r.java:109)
at
org.hibernate.search.backend.impl.lucene.LuceneWorker.performWork(Lucene
Worker.java:80)
at
org.hibernate.search.backend.impl.lucene.LuceneWorker.performWork(Lucene
Worker.java:46)
at
org.hibernate.search.backend.impl.lucene.LuceneBackendQueueProcessor.run
(LuceneBackendQueueProcessor.java:98)
at
org.hibernate.search.backend.impl.BatchedQueueingProcessor.performWorks(
BatchedQueueingProcessor.java:149)
at
org.hibernate.search.backend.impl.TransactionalWorker.performWork(Transa
ctionalWorker.java:45)
at
org.hibernate.search.impl.FullTextSessionImpl.index(FullTextSessionImpl.
java:140)
at
za.co.mymed.action.IndexerBean.indexAllClasses(IndexerBean.java:93)
at za.co.mymed.action.IndexerBean.index(IndexerBean.java:63)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.seam.util.Reflections.invoke(Reflections.java:22)
at
org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationCon
text.java:31)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationCon
text.java:56)
at
org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInte
rceptor.java:28)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationCon
text.java:68)
at
org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionIntercept
or.java:77)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationCon
text.java:68)
at
org.jboss.seam.bpm.BusinessProcessInterceptor.aroundInvoke(BusinessProce
ssInterceptor.java:51)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationCon
text.java:68)
at
org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextI
nterceptor.java:44)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationCon
text.java:68)
at
org.jboss.seam.async.AsynchronousInterceptor.aroundInvoke(AsynchronousIn
terceptor.java:52)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationCon
text.java:68)
at
org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107
)
at
org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBea
nInterceptor.java:166)
at
org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.
java:102)
at
za.co.mymed.action.IndexerBean_$$_javassist_5.index(IndexerBean_$$_javas
sist_5.java)
at
za.co.mymed.action.IndexerBean.startProcess(IndexerBean.java:48)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.seam.util.Reflections.invoke(Reflections.java:22)
at
org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationCon
text.java:31)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationCon
text.java:56)
at
org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInte
rceptor.java:28)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationCon
text.java:68)
at
org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionIntercept
or.java:77)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationCon
text.java:68)
at
org.jboss.seam.bpm.BusinessProcessInterceptor.aroundInvoke(BusinessProce
ssInterceptor.java:51)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationCon
text.java:68)
at
org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextI
nterceptor.java:44)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationCon
text.java:68)
at
org.jboss.seam.async.AsynchronousInterceptor.aroundInvoke(AsynchronousIn
terceptor.java:52)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationCon
text.java:68)
at
org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107
)
at
org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBea
nInterceptor.java:166)
at
org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.
java:102)
at
za.co.mymed.action.IndexerBean_$$_javassist_5.startProcess(IndexerBean_$
$_javassist_5.java)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.seam.util.Reflections.invoke(Reflections.java:22)
at
org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:126)
at
org.jboss.seam.async.AsynchronousInvocation$1.process(AsynchronousInvoca
tion.java:62)
at
org.jboss.seam.async.Asynchronous$ContextualAsynchronousRequest.run(Asyn
chronous.java:80)
at
org.jboss.seam.async.AsynchronousInvocation.execute(AsynchronousInvocati
on.java:44)
at
org.jboss.seam.async.QuartzDispatcher$QuartzJob.execute(QuartzDispatcher
.java:243)
at org.quartz.core.JobRunShell.run(JobRunShell.java:203)
at
org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java
:520)
Caused by: java.lang.NullPointerException
at org.apache.lucene.index.Term.compareTo(Term.java:92)
at
org.apache.lucene.index.TermInfosReader.getIndexOffset(TermInfosReader.j
ava:181)
at
org.apache.lucene.index.TermInfosReader.get(TermInfosReader.java:216)
at
org.apache.lucene.index.SegmentTermDocs.seek(SegmentTermDocs.java:54)
at
org.apache.lucene.index.MultiSegmentReader$MultiTermDocs.termDocs(MultiS
egmentReader.java:604)
at
org.apache.lucene.index.MultiSegmentReader$MultiTermDocs.next(MultiSegme
ntReader.java:555)
at
org.hibernate.search.backend.impl.lucene.LuceneWorker.remove(LuceneWorke
r.java:99)
... 63 more
Please help...
cid:[email protected]
Enrico Goosen
Software Developer
Employee Benefits Information Systems (EBIS)
Tel: 0219406231
Physical Address: Parc Du Cap, Building 6, Mispel Street, Bellville 7530
Postal Address: P O Box 2212 Bellville, 7535
Understanding Business, Serving Metropolitan
This message is subject to Metropolitans disclaimer pertaining to
electronic communications. To view the disclaimer please visit
http://www.metropolitan.co.za/disclaimer.asp
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
This message is subject to Metropolitans disclaimer pertaining to electronic
communications. To view the disclaimer please visit
http://www.metropolitan.co.za/disclaimer.asp