When using hibernate with a Container Managed EntityManagerFactory
some classes are loaded outside application classloader.
Every time that a application starts hibernate register JavaTypeDescriptos on JavaTypeDescriptorRegistry.INSTANCE.
The problem is that anybody clean it on application stop, and it is a static instance inside hibernate module classloader.
Possible solution: work with a weak reference of class.
Hibernate 4.3.6 (wildfly)