Note that there are some explanatory texts on larger screens.

plurals
  1. POHibernate Search creating index for big tables
    primarykey
    data
    text
    <p>I have a problem to recreate a full index with hibernate search for a big datatable with about 45000 entries.</p> <p>I what way do I have to modify the following code?</p> <pre><code>@Transactional public void rebuildIndex(){ logDebug("Start rebuilding full index"); FullTextEntityManager fullTextEntityManager = Search.getFullTextEntityManager(entityManager); try { fullTextEntityManager.createIndexer().startAndWait(); logDebug("Finished rebuilding full index"); } catch (InterruptedException e) { // TODO Auto-generated catch block e.printStackTrace(); } } </code></pre> <p>[Edit] Here are some more information.</p> <p>After about 5 Minutes I get an error, because no transaction is active.</p> <p>First everything is running:</p> <pre><code>INFO 2013-11-11 09:36:36,356 [SimpleIndexingProgressMonitor] HSEARCH000030: 132200 documents indexed in 298782 ms INFO 2013-11-11 09:36:36,356 [SimpleIndexingProgressMonitor] HSEARCH000031: Indexing speed: 442,463074 documents/second; progress: 30,66% </code></pre> <p>Then a warning appears</p> <pre><code>WARN 2013-11-11 09:36:36,399 [arjuna] ARJUNA012117: TransactionReaper::check timeout for TX 0:ffff91e40e22:-2eab8f02:5280958c:b1 in state RUN WARN 2013-11-11 09:36:36,400 [arjuna] ARJUNA012117: TransactionReaper::check timeout for TX 0:ffff91e40e22:-2eab8f02:5280958c:b2 in state RUN </code></pre> <p>And after the warning my indexing is aborted with an error:</p> <pre><code> WARN 2013-11-11 09:36:36,460 [arjuna] ARJUNA012117: TransactionReaper::check timeout for TX 0:ffff91e40e22:-2eab8f02:5280958c:e2 in state RUN WARN 2013-11-11 09:36:36,465 [SqlExceptionHelper] SQL Error: 0, SQLState: null ERROR 2013-11-11 09:36:36,465 [SqlExceptionHelper] javax.resource.ResourceException: IJ000460: Error checking for a transaction WARN 2013-11-11 09:36:36,468 [arjuna] ARJUNA012121: TransactionReaper::doCancellations worker Thread[Transaction Reaper Worker 0,5,main] successfully canceled TX 0:ffff91e40e22:-2eab8f02:5280958c:cc WARN 2013-11-11 09:36:36,468 [arjuna] ARJUNA012095: Abort of action id 0:ffff91e40e22:-2eab8f02:5280958c:ce invoked while multiple threads active within it. WARN 2013-11-11 09:36:36,469 [arjuna] ARJUNA012108: CheckedAction::check - atomic action 0:ffff91e40e22:-2eab8f02:5280958c:ce aborting with 1 threads active! ERROR 2013-11-11 09:36:36,467 [LogErrorHandler] HSEARCH000058: HSEARCH000116: Unexpected error during MassIndexer operation: org.hibernate.exception.GenericJDBCException: Could not open connection at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:54) at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:125) at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:110) at org.hibernate.engine.jdbc.internal.LogicalConnectionImpl.obtainConnection(LogicalConnectionImpl.java:304) at org.hibernate.engine.jdbc.internal.LogicalConnectionImpl.getConnection(LogicalConnectionImpl.java:169) at org.hibernate.engine.jdbc.internal.proxy.ConnectionProxyHandler.extractPhysicalConnection(ConnectionProxyHandler.java:82) at org.hibernate.engine.jdbc.internal.proxy.ConnectionProxyHandler.continueInvocation(ConnectionProxyHandler.java:138) at org.hibernate.engine.jdbc.internal.proxy.AbstractProxyHandler.invoke(AbstractProxyHandler.java:81) at com.sun.proxy.$Proxy168.prepareStatement(Unknown Source) at org.hibernate.engine.jdbc.internal.StatementPreparerImpl$5.doPrepare(StatementPreparerImpl.java:147) at org.hibernate.engine.jdbc.internal.StatementPreparerImpl$StatementPreparationTemplate.prepareStatement(StatementPreparerImpl.java:166) at org.hibernate.engine.jdbc.internal.StatementPreparerImpl.prepareQueryStatement(StatementPreparerImpl.java:145) at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1720) at org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1697) at org.hibernate.loader.Loader.doQuery(Loader.java:832) at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:293) at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:263) at org.hibernate.loader.Loader.loadEntity(Loader.java:1977) at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:82) at org.hibernate.loader.entity.EntityLoader.loadByUniqueKey(EntityLoader.java:161) .... .... </code></pre> <p>and</p> <pre><code>ERROR 2013-11-11 09:36:36,475 [LogErrorHandler] HSEARCH000058: HSEARCH000116: Unexpected error during MassIndexer operation: javax.transaction.RollbackException: ARJUNA016063: The transaction is not active! at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1155) at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:117) at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTransactionManagerDelegate.java:75) at org.hibernate.search.batchindexing.impl.OptionallyWrapInJTATransaction.run(OptionallyWrapInJTATransaction.java:95) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:722) </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload