Sleep alert on lock using Oracle 10g

I am using Hibernate 4.3.0.Final/JPA 2.1, Hibernate Search 4.5.0.Final runs on WildFly 8.0.0.Final. My application is working absolutely fine , but I get a warning about sleep mode when creating indexes.

WARN org.hibernate.loader.Loader - HHH000444: a detected lock request, however, dialect reports that the database prefers to block are executed in a separate select (subsequent block); results will be blocked after the first request

This is the method that creates the index:

public void createIndex() throws DAOException { FullTextEntityManager fullTextEntityManager = Search.getFullTextEntityManager(this.entityManager); try { fullTextEntityManager.createIndexer(Colaborador.class) .purgeAllOnStart(Boolean.TRUE) .optimizeOnFinish(Boolean.TRUE) .startAndWait(); } catch (InterruptedException e) { logger.error("Error creating index", e); throw new DAOException(e); } } 

I did some searching and I found a “solution” or, better said, a way to suppress the warning . However, I do not know if this is the best solution. The solution suggests extending org.hibernate.dialect.Oracle10gDialect and overriding the public boolean useFollowOnLocking() method to return false .

Another important: this only happens after Hibernate version 4.2.0.Final. There is no useFollowOnLocking() method before this version.

New dialect:

 import org.hibernate.dialect.Oracle10gDialect; public class MyOracle10gDialect extends Oracle10gDialect { @Override public boolean useFollowOnLocking() { return false; } } 

I found this solution here and here . There is also a report who rejected this warning. I did not find another solution for this warning.

+8
java oracle warnings hibernate hibernate-search
source share
1 answer

There is no reason to worry about this warning by logging its error: you must ignore it or reconfigure the registrar to ignore it.

I discovered HHH-9097 .

+11
source share

All Articles