jroper/play-mongojack — pull request #2 by svenwiegand (2013-04-08 19:16:37+00:00)
Title: Fix ClassNotFoundException for ObjectMapperConfigurer

At first many thanks for your great work regarding mongojack and this Play plugin. It is a real time saver.

Unfortunately the current mechanism for providing an ``ObjectMapperConfigurer`` doesn's seem to work properly. I added one to enable (de)serialization of joda-time objects and it worked well when using a ``FakeApplication`` in my integration tests. But as soon as I ran the application using ``play run`` it crashed with a ClassNotFoundException when ``MongoDB`` tried to instantiate my ``ObjectMapperConfigurer``.

After trying around a bit, I've got the feeling, that the class loader of the play-mongojack plugin isn't able to access classes from the application. Unfortunately I haven't found a proof for this assumption.

This pull request replaces the class loading with a plugin based approach (my ``ObjectMapperConfigurer`` needs to implement play's ``Plugin`` trait and needs to be added to the project's ``play.plugins`` file). It is only a one liner and for me it works like a charme. Also see the updated ``README.markdown`` in the pull request.