Registering composite types which breaks with ExceptionInInitializerError