# Hibernate 5.3 TypeResolver Constructor

**URL:** https://discourse.hibernate.org/t/hibernate-5-3-typeresolver-constructor/795
**Category:** Hibernate ORM
**Created:** [May 18, 2018, 8:21pm UTC](https://discourse.hibernate.org/t/hibernate-5-3-typeresolver-constructor/795 "2018-05-18T20:21:11Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![John\_Casebolt](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.hibernate.org/john_casebolt/32/194_2.png) [@John\_Casebolt](https://discourse.hibernate.org/u/John_Casebolt)
#### Post date: [May 18, 2018, 8:21pm UTC](https://discourse.hibernate.org/t/hibernate-5-3-typeresolver-constructor/795/1 "2018-05-18T20:21:11Z")

</div>

Hi All -

Migrating from 5.2 to 5.3 today, and I encountered a missing no-arg constructor for TypeResolver().  
I tried:

final TypeResolver tr = new TypeResolver(new TypeConfiguration(), new TypeFactory(new TypeConfiguration()));

and

final TypeConfiguration tc = new TypeConfiguration();  
final TypeResolver tr = new TypeResolver(tc, new TypeFactory(tc));

which both seem to work, but are giving me:

2018-05-18 16:18:06.743 EDT defaultContext [Thread-1] WARN o.h.t.s.TypeConfiguration$Scope - HHH000233: Scoping types to session factory org.hibernate.internal.SessionFactoryImpl@5adf39e9 after already scoped org.hibernate.internal.SessionFactoryImpl@5adf39e9

That looks to not be a problem, but I would like to eliminate the WARN and do things The Right Way.

Any insight you could provide would be helpful.

Thanks,  
John

P.S. - This is in the definition of a UserType in a JPA context; I also tried grabbing the TypeHelper from the SessionFactory by unwrapping the EntityManagerFactory, but am getting an NPE since it seems like the EMF is not yet initialized.

---

<div class="post-metadata">

### Author: ![dreab8](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.hibernate.org/dreab8/32/25_2.png) [@dreab8](https://discourse.hibernate.org/u/dreab8)
#### Post date: [May 18, 2018, 11:14pm UTC](https://discourse.hibernate.org/t/hibernate-5-3-typeresolver-constructor/795/2 "2018-05-18T23:14:28Z")

</div>

[https://github.com/hibernate/hibernate-orm/commit/99d630bcc2c20f5f7cc582b2da985712fd41c830](https://github.com/hibernate/hibernate-orm/commit/99d630bcc2c20f5f7cc582b2da985712fd41c830) should solve the warn issue.
