Delay loading due to ASTQueryTranslatorFactory

I run a spring boot application with Hibernate. What I have noticed during application deployment is that server do not load after this last line ASTQueryTranslatorFactory. I see no errors in logs. I did try to change log level to TRACE to figure out if any error, but no luck, no errors. Let me know why this delay of 15-20 occurs and what is happening in this line. How to resolve this. Any changes to be spring boot setup?


Nov 18, 2016 8:45:53 PM org.hibernate.jpa.internal.util.LogHelper logPersistenceUnitInformation
INFO: HHH000204: Processing PersistenceUnitInfo [
        name: default
        ...]
Nov 18, 2016 8:45:54 PM org.hibernate.Version logVersion
INFO: HHH000412: Hibernate Core {5.0.9.Final}
Nov 18, 2016 8:45:54 PM org.hibernate.cfg.Environment <clinit>
INFO: HHH000206: hibernate.properties not found
Nov 18, 2016 8:45:54 PM org.hibernate.cfg.Environment buildBytecodeProvider
INFO: HHH000021: Bytecode provider name : javassist
Nov 18, 2016 8:45:54 PM org.hibernate.annotations.common.reflection.java.JavaReflectionManager <clinit>
INFO: HCANN000001: Hibernate Commons Annotations {5.0.1.Final}
Nov 18, 2016 8:45:56 PM org.hibernate.dialect.Dialect <init>
INFO: HHH000400: Using dialect: org.hibernate.dialect.Oracle10gDialect
Nov 18, 2016 8:45:58 PM org.hibernate.id.SequenceGenerator configure
WARN: HHH90000014: Found use of deprecated [org.hibernate.id.SequenceHiLoGenerator] sequence-based id generator;
Nov 18, 2016 8:46:00 PM org.hibernate.tool.hbm2ddl.SchemaValidator validate
INFO: HHH000229: Running schema validator
Nov 18, 2016 8:46:13 PM org.hibernate.hql.internal.QueryTranslatorFactoryInitiator initiateService
INFO: HHH000397: Using ASTQueryTranslatorFactory

It might be because the database schema is validated. Try to change the hibernate.hbm2ddl.auto property to none and see if there’s any change.

If you have hundreds of entities and named queries, the bootstrap will take some time. Also, if the database metadata is huge, like when you have thousands of tables, the bootstrap will also take more time to process.

1 Like

… and anything that takes time scanning meta data may raise rare conditions server side, especially you are using Oracle… if the “none” solution doesn’t work (the problem may be in the named queries validation phase: is it also skipped with “none” ?, … not sure…), also check with your DBA if you don’t have locks on meta data during this validation phase and what is the default ddl_lock_timeout.

Hello @shiva, May i know, how you solved this issue. Please let me know.

Hello @shiva, I have the same situation. How did you solve your problem ?