-->
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.  [ 6 posts ] 
Author Message
 Post subject: Search Exception
PostPosted: Sun Apr 04, 2010 5:12 pm 
Beginner
Beginner

Joined: Wed Nov 10, 2004 5:48 pm
Posts: 32
Location: Portland
My app was working perfectly until I upgraded to 3.2.0.Beta1, now I'm seeing the exception below. What's odd is that the process I'm running is inserting (not deleting) records, and from this stack trace it appears that Search is trying to remove entities from the index:

Code:
Exception in thread "pool-2-thread-11" org.hibernate.search.SearchException: Unable to remove class com.attensa.core.entity.Article#null from index.
   at org.hibernate.search.backend.impl.lucene.works.DeleteWorkDelegate.performWork(DeleteWorkDelegate.java:83)
   at org.hibernate.search.backend.impl.lucene.PerDPQueueProcessor.run(PerDPQueueProcessor.java:93)
   at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
   at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.NullPointerException
   at org.apache.lucene.index.Term.hashCode(Term.java:89)
   at org.apache.lucene.search.TermQuery.hashCode(TermQuery.java:176)
   at org.apache.lucene.search.BooleanClause.hashCode(BooleanClause.java:108)
   at java.util.AbstractList.hashCode(AbstractList.java:527)
   at org.apache.lucene.search.BooleanQuery.hashCode(BooleanQuery.java:466)
   at java.util.HashMap.put(HashMap.java:372)
   at org.apache.lucene.index.DocumentsWriter.addDeleteQuery(DocumentsWriter.java:1021)
   at org.apache.lucene.index.DocumentsWriter.bufferDeleteQuery(DocumentsWriter.java:874)
   at org.apache.lucene.index.IndexWriter.deleteDocuments(IndexWriter.java:1990)
   at org.hibernate.search.backend.impl.lucene.works.DeleteWorkDelegate.performWork(DeleteWorkDelegate.java:79)
   ... 4 more


Top
 Profile  
 
 Post subject: Re: Search Exception
PostPosted: Mon Apr 05, 2010 3:17 am 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
thanks for reporting, I think this might be already fixed in trunk relating to HSEARCH-480
could you verify?

Quote:
What's odd is that the process I'm running is inserting (not deleting) records, and from this stack trace it appears that Search is trying to remove entities from the index

I guess the entities you're inserting are having @IndexedEmbedded or @ContainedIn, which as of latest hibernate versions does generate "update collections" events even before the entity is persist, so in that case the identifier is still null and the update operation is mapped to "delete and insert".

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


Top
 Profile  
 
 Post subject: Re: Search Exception
PostPosted: Mon Apr 05, 2010 7:56 pm 
Beginner
Beginner

Joined: Wed Nov 10, 2004 5:48 pm
Posts: 32
Location: Portland
Great, glad it might already be fixed!

I don't see any snapshot builds for search, is there somewhere else I should look or should I just build from source?

Here's where I expected to find them: http://snapshots.jboss.org/maven2/org/h ... te-search/


Top
 Profile  
 
 Post subject: Re: Search Exception
PostPosted: Tue Apr 06, 2010 2:38 am 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
no nightly builds are published, you'll have to checkout the sources and build.

this might be useful as it contains the instructions about Maven: http://community.jboss.org/wiki/ContributingtoHibernateSearch

Actually I'm going to ask if we couldn't have the CI publish nightly builds, but that will take some time.

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


Top
 Profile  
 
 Post subject: Re: Search Exception
PostPosted: Tue Apr 06, 2010 5:07 am 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
there's a snapshot at http://snapshots.jboss.org/maven2/org/hibernate/hibernate-search/3.2.0-SNAPSHOT/

this was just manually uploaded, it's not getting updated each night automatically for now.

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


Top
 Profile  
 
 Post subject: Re: Search Exception
PostPosted: Tue Apr 06, 2010 4:04 pm 
Beginner
Beginner

Joined: Wed Nov 10, 2004 5:48 pm
Posts: 32
Location: Portland
This does indeed resolve the problem. And you're right , we are using @IndexedEmbedded (two levels, A embeds B embeds C).

Thanks for your assistance. Hibernate Search is an outstanding product.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 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.