playframework/play-slick — pull request #166 by richdougherty (2014-05-27 02:57:22+00:00)
Title: Force H2 driver registration to fix SQLException in tests

Running DBTest and SlickPlayIterateesFunctionalTest together reliably threw a "java.sql.SQLException: No suitable driver found". This fix forces registration of the H2 driver to make sure a driver is available.

It shouldn't be necessary to register the driver. Something is presumably deregistering a driver that it didn't register. Slick doesn't deregister drivers, so it's probably Play. There is a recent fix in Play's DB plugin that might resolve this issue: https://github.com/playframework/playframework/pull/2794. Once that issue's fixed we can try to remove this workaround from our tests.