[Hibernate-JIRA] Created: (HSEARCH-669) String2FieldBridgeAdaptor does not implement StringBridge causing DocumentBuilderIndexedEntity to not recognize it as a StringBridge
by Brian Langel (JIRA)
String2FieldBridgeAdaptor does not implement StringBridge causing DocumentBuilderIndexedEntity to not recognize it as a StringBridge
------------------------------------------------------------------------------------------------------------------------------------
Key: HSEARCH-669
URL: http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-669
Project: Hibernate Search
Issue Type: Bug
Affects Versions: 3.3.0.Final
Environment: Tested against 3.3.0.Final, database agnostic.
Reporter: Brian Langel
Attachments: string2fieldbridgeadapterfailure.tar
See attached source code (maven project. 'mvn test' will run the test case).
String2FieldBridgeAdaptor does not implement StringBridge causing DocumentBuilderIndexedEntity to not recognize it as a StringBridge (line 598 in DocumentBuilderIndexedEntity checks if the found FieldBridge is assignable to StringBridge, which for any adapted StringBridge is false since the String2FieldBridgeAdaptor does not implement StringBridge).
>From attached test case:
org.hibernate.search.SearchException: FieldBridge class org.hibernate.search.bridge.String2FieldBridgeAdaptordoes not have a objectToString method: field value in DomainObject
at org.hibernate.search.engine.DocumentBuilderIndexedEntity.objectToString(DocumentBuilderIndexedEntity.java:601)
at org.hibernate.search.query.dsl.impl.ConnectedMultiFieldsTermQueryBuilder.buildSearchTerm(ConnectedMultiFieldsTermQueryBuilder.java:133)
--
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
15 years, 1 month
[Hibernate-JIRA] Created: (HSEARCH-650) Regression in 3.3.0: Using hibernate.use_identifier_rollback property causes exceptions on deletes
by Kyrill Alyoshin (JIRA)
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
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
15 years, 1 month
[Hibernate-JIRA] Created: (HV-421) Reconsider behavior of parameter validation for inheritance hierarchies
by Gunnar Morling (JIRA)
Reconsider behavior of parameter validation for inheritance hierarchies
-----------------------------------------------------------------------
Key: HV-421
URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-421
Project: Hibernate Validator
Issue Type: Bug
Components: engine
Reporter: Gunnar Morling
Fix For: 4.2.0.Beta2
Let A extend B and A#foo() override B#foo(). When validating an invocation of A#foo() the current implementation will evaluate all parameter constraints defined at A#foo() *and* B#foo(). That way the foo()'s preconditions defined in B are strengthened by A.
According to the ["Programming by contract"|http://en.wikipedia.org/wiki/Programming_by_contract] article on WP this is not allowed, subtypes may only weaken preconditions defined by supertypes. The common implementation pattern for this is to combine the preconditions within a hierarchy by a logical OR, meaning the weakest precondition in the hierarchy applies.
Note that postconditions (return value constraints) may be strengthened (but not weakened) by subtypes. Therefore the current implementation (AND combination) should be correct here.
--
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
15 years, 1 month