More than one DocumentId found while only one is declared
---------------------------------------------------------
Key: HSEARCH-1048
URL:
https://hibernate.onjira.com/browse/HSEARCH-1048
Project: Hibernate Search
Issue Type: Bug
Components: mapping
Affects Versions: 4.1.0.Beta1
Reporter: Sanne Grinovero
All tests using entity
org.hibernate.search.test.embedded.depth.PersonWithBrokenSocialSecurityNumber fail
occasionally on Windows with Java7
-
org.hibernate.search.test.embedded.depth.DocumentIdContainedInTest.testCorrectDepthIndexed
-
org.hibernate.search.test.engine.UsingIdentifierRollbackTest.testEntityDeletionWithoutIdentifier
-
org.hibernate.search.test.engine.UsingIdentifierRollbackTest.testRolledBackIdentifiersOnUnusualDocumentId
All show the same stacktrace:
{quote}
04:30:49,940 (main) DEBUG ConfigContext:307 - Setting Lucene compatibility to Version
LUCENE_CURRENT
04:30:49,940 (main) DEBUG ConfigContext:209 - Using default similarity implementation:
org.apache.lucene.search.DefaultSimilarity
04:30:49,940 (main) DEBUG LuceneIndexingParameters:94 - Set index writer parameter
max_buffered_docs to value : 1000
04:30:49,940 (main) DEBUG LuceneIndexingParameters:94 - Set index writer parameter
merge_factor to value : 100
04:30:49,940 (main) DEBUG WorkspaceFactory:43 - Starting workspace for index
org.hibernate.search.test.embedded.depth.PersonWithBrokenSocialSecurityNumber using an
exclusive index strategy
04:30:49,940 (main) INFO AvroSerializationProvider:73 - HSEARCH000079: Serialization
protocol version 1.0
04:30:49,940 (main) DEBUG DocumentBuilderIndexedEntity:334 - Found JPA id and using it as
document id
org.hibernate.search.SearchException: More than one @DocumentId specified on entity
org.hibernate.search.test.embedded.depth.PersonWithBrokenSocialSecurityNumber
at
org.hibernate.search.engine.spi.DocumentBuilderIndexedEntity.checkDocumentId(DocumentBuilderIndexedEntity.java:247)
at
org.hibernate.search.engine.spi.DocumentBuilderIndexedEntity.documentBuilderSpecificChecks(DocumentBuilderIndexedEntity.java:237)
at
org.hibernate.search.engine.spi.AbstractDocumentBuilder.initializeMemberLevelAnnotations(AbstractDocumentBuilder.java:462)
at
org.hibernate.search.engine.spi.AbstractDocumentBuilder.initializeClass(AbstractDocumentBuilder.java:367)
at
org.hibernate.search.engine.spi.AbstractDocumentBuilder.<init>(AbstractDocumentBuilder.java:151)
at
org.hibernate.search.engine.spi.DocumentBuilderIndexedEntity.<init>(DocumentBuilderIndexedEntity.java:178)
at
org.hibernate.search.spi.SearchFactoryBuilder.initDocumentBuilders(SearchFactoryBuilder.java:396)
at
org.hibernate.search.spi.SearchFactoryBuilder.buildNewSearchFactory(SearchFactoryBuilder.java:220)
at
org.hibernate.search.spi.SearchFactoryBuilder.buildSearchFactory(SearchFactoryBuilder.java:144)
at
org.hibernate.search.event.impl.FullTextIndexEventListener.initialize(FullTextIndexEventListener.java:129)
at
org.hibernate.search.hcore.impl.HibernateSearchIntegrator.integrate(HibernateSearchIntegrator.java:82)
at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:294)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1737)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1775)
at org.hibernate.search.test.SearchTestCase.buildConfiguration(SearchTestCase.java:230)
at org.hibernate.search.test.SearchTestCase.setUp(SearchTestCase.java:86)
at org.hibernate.search.test.SearchTestCase.runBare(SearchTestCase.java:394)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at junit.framework.TestResult.runProtected(TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
at junit.framework.TestCase.run(TestCase.java:124)
at junit.framework.TestSuite.runTest(TestSuite.java:243)
at junit.framework.TestSuite.run(TestSuite.java:238)
at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:53)
at
org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:119)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:101)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at
org.apache.maven.surefire.booter.ProviderFactory$ClassLoaderProxy.invoke(ProviderFactory.java:103)
at $Proxy0.invoke(Unknown Source)
at
org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:150)
at
org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcess(SurefireStarter.java:91)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:69)
{quote}
Especially this is an interesting output:
*DEBUG DocumentBuilderIndexedEntity:334 - Found JPA id and using it as document id*
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira