-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: Unable to remove from Lucene index
PostPosted: Tue May 05, 2009 5:36 am 
Newbie

Joined: Sat May 02, 2009 4:36 am
Posts: 3
Hi,

I’m new to Lucene and Hibernate Search, 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.

I actually posted this topic in the wrong forum a few days ago. So please go there to see code samples.

Versions:
hibernate-search 3.0.1.GA
Lucene 2.3

Exception:
Code:
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(LuceneWorker.java:109)
      at org.hibernate.search.backend.impl.lucene.LuceneWorker.performWork(LuceneWorker.java:80)
      at org.hibernate.search.backend.impl.lucene.LuceneWorker.performWork(LuceneWorker.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(TransactionalWorker.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.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.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(RootInvocationContext.java:31)
      at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
      at org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:28)
      at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
      at org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:77)
      at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
      at org.jboss.seam.bpm.BusinessProcessInterceptor.aroundInvoke(BusinessProcessInterceptor.java:51)
      at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
      at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:44)
      at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
      at org.jboss.seam.async.AsynchronousInterceptor.aroundInvoke(AsynchronousInterceptor.java:52)
      at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
      at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
      at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:166)
      at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:102)
      at za.co.mymed.action.IndexerBean_$$_javassist_5.index(IndexerBean_$$_javassist_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.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.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(RootInvocationContext.java:31)
      at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
      at org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:28)
      at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
      at org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:77)
      at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
      at org.jboss.seam.bpm.BusinessProcessInterceptor.aroundInvoke(BusinessProcessInterceptor.java:51)
      at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
      at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:44)
      at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
      at org.jboss.seam.async.AsynchronousInterceptor.aroundInvoke(AsynchronousInterceptor.java:52)
      at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
      at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
      at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.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.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.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(AsynchronousInvocation.java:62)
      at org.jboss.seam.async.Asynchronous$ContextualAsynchronousRequest.run(Asynchronous.java:80)
      at org.jboss.seam.async.AsynchronousInvocation.execute(AsynchronousInvocation.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.java: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(MultiSegmentReader.java:604)
      at org.apache.lucene.index.MultiSegmentReader$MultiTermDocs.next(MultiSegmentReader.java:555)
      at org.hibernate.search.backend.impl.lucene.LuceneWorker.remove(LuceneWorker.java:99)
      ... 63 more


Any ideas what I'm doing wrong?


Top
 Profile  
 
 Post subject: Re: Unable to remove from Lucene index
PostPosted: Tue May 05, 2009 2:55 pm 
Newbie

Joined: Sat May 02, 2009 4:36 am
Posts: 3
Wasn't loading a referenced entity.
This fixed it:
Code:
ScrollableResults results = ftSession.createCriteria( ProductInfo.class )
            .setFetchMode("product", FetchMode.JOIN)
            .scroll( ScrollMode.FORWARD_ONLY );


Top
 Profile  
 
 Post subject: Re: Unable to remove from Lucene index
PostPosted: Wed May 06, 2009 5:15 pm 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
nice that you found a workaround, but it shouldn't happen.
could you please verify this is not an issue any more in Hibernate Search 3.1.0GA?

_________________
Sanne
http://in.relation.to/


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.