mirror of
https://github.com/google/nomulus.git
synced 2025-08-03 08:22:13 +02:00
Fix missing-driver in HibernateSchemaExporterTest (#777)
* Fix missing-driver in HibernateSchemaExporterTest HibernateSchemaExporterTest is failing with "Driver not found" error after Java 11 upgrade. Reason is that ServiceLoader now only checks modules for services. Proper fix is to define modules. This short term fix is to declare the driver class explicitly.
This commit is contained in:
parent
2418876c15
commit
f36b05462f
1 changed files with 3 additions and 0 deletions
|
@ -59,6 +59,9 @@ public class HibernateSchemaExporter {
|
|||
settings.put(Environment.USER, username);
|
||||
settings.put(Environment.PASS, password);
|
||||
settings.put(Environment.HBM2DDL_AUTO, "none");
|
||||
// Register driver explicitly to work around ServiceLoader change after Java 8.
|
||||
// Driver self-registration only works if driver is declared in a module.
|
||||
settings.put(Environment.DRIVER, "org.postgresql.Driver");
|
||||
settings.put(Environment.SHOW_SQL, "true");
|
||||
settings.put(
|
||||
Environment.PHYSICAL_NAMING_STRATEGY, NomulusNamingStrategy.class.getCanonicalName());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue