[
http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-650?pag...
]
Emmanuel Bernard resolved HSEARCH-650.
--------------------------------------
Resolution: Fixed
Fix Version/s: 3.4.0
Applied. That fixes it. A better fix is expected for 3.4 once we rework how Work.id is
populated.
Regression in 3.3.0: Using hibernate.use_identifier_rollback property
causes exceptions on deletes
--------------------------------------------------------------------------------------------------
Key: HSEARCH-650
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-650
Project: Hibernate Search
Issue Type: Bug
Components: engine
Affects Versions: 3.3.0.Final
Environment: Hibernate 3.6.0, Hibernate Search 3.3.0
Reporter: Kyrill Alyoshin
Assignee: Sanne Grinovero
Fix For: 3.3.1, 3.4.0
Basically, when Hibernate is configured with 'hibernate.use_identifier_rollback'
(that is to set primary keys of the deleted entities to null), here is what happens:
{code}
2010-12-17 18:52:51,187 TRACE [Hibernate Search: Directory writer-1|]
org.hibernate.search.backend.impl.lucene.works.DeleteExtWorkDelegate
=> Removing class xxx.Vendor#null by id using an IndexWriter.
2010-12-17 18:52:51,187 ERROR [Hibernate Search: Directory writer-1|]
org.hibernate.search.backend.impl.lucene.PerDPQueueProcessor
=> Unexpected error in Lucene Backend:
java.lang.NullPointerException
at org.apache.lucene.index.TermBuffer.set(TermBuffer.java:95)
at org.apache.lucene.index.SegmentTermEnum.scanTo(SegmentTermEnum.java:160)
at org.apache.lucene.index.TermInfosReader.get(TermInfosReader.java:232)
at org.apache.lucene.index.TermInfosReader.get(TermInfosReader.java:179)
at org.apache.lucene.index.SegmentTermDocs.seek(SegmentTermDocs.java:57)
at org.apache.lucene.index.DocumentsWriter.applyDeletes(DocumentsWriter.java:1046)
at org.apache.lucene.index.DocumentsWriter.applyDeletes(DocumentsWriter.java:1004)
at org.apache.lucene.index.IndexWriter.applyDeletes(IndexWriter.java:4566)
at org.apache.lucene.index.IndexWriter.doFlushInternal(IndexWriter.java:3756)
at org.apache.lucene.index.IndexWriter.doFlush(IndexWriter.java:3595)
at org.apache.lucene.index.IndexWriter.flush(IndexWriter.java:3585)
at org.apache.lucene.index.IndexWriter.closeInternal(IndexWriter.java:1717)
at org.apache.lucene.index.IndexWriter.close(IndexWriter.java:1680)
at org.apache.lucene.index.IndexWriter.close(IndexWriter.java:1644)
at org.hibernate.search.backend.Workspace.closeIndexWriter(Workspace.java:211)
at
org.hibernate.search.backend.impl.lucene.PerDPQueueProcessor.run(PerDPQueueProcessor.java:113)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
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:662)
2010-12-17 18:52:51,187 ERROR [Hibernate Search: Directory writer-1|]
org.hibernate.search.exception.impl.LogErrorHandler
=> Exception occurred java.lang.NullPointerException
Primary Failure:
Entity xxx.Vendor Id null Work Type org.hibernate.search.backend.DeleteLuceneWork
java.lang.NullPointerException
at org.apache.lucene.index.TermBuffer.set(TermBuffer.java:95)
at org.apache.lucene.index.SegmentTermEnum.scanTo(SegmentTermEnum.java:160)
at org.apache.lucene.index.TermInfosReader.get(TermInfosReader.java:232)
at org.apache.lucene.index.TermInfosReader.get(TermInfosReader.java:179)
at org.apache.lucene.index.SegmentTermDocs.seek(SegmentTermDocs.java:57)
at org.apache.lucene.index.DocumentsWriter.applyDeletes(DocumentsWriter.java:1046)
at org.apache.lucene.index.DocumentsWriter.applyDeletes(DocumentsWriter.java:1004)
at org.apache.lucene.index.IndexWriter.applyDeletes(IndexWriter.java:4566)
at org.apache.lucene.index.IndexWriter.doFlushInternal(IndexWriter.java:3756)
at org.apache.lucene.index.IndexWriter.doFlush(IndexWriter.java:3595)
at org.apache.lucene.index.IndexWriter.flush(IndexWriter.java:3585)
at org.apache.lucene.index.IndexWriter.closeInternal(IndexWriter.java:1717)
at org.apache.lucene.index.IndexWriter.close(IndexWriter.java:1680)
at org.apache.lucene.index.IndexWriter.close(IndexWriter.java:1644)
at org.hibernate.search.backend.Workspace.closeIndexWriter(Workspace.java:211)
at
org.hibernate.search.backend.impl.lucene.PerDPQueueProcessor.run(PerDPQueueProcessor.java:113)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
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:662)
2010-12-17 18:52:51,187 WARN [Hibernate Search: Directory writer-1|]
org.hibernate.search.backend.Workspace
=> going to force release of the IndexWriter lock
{code}
This has not happened in 3.2.1 and Hibernate 3.5.4. I believe this is a serious
regression issue.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira