mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-22 15:10:02 +00:00
Improve error message when no platform providers are in the classpath
This commit is contained in:
1 parent
195cb9c86c
commit
b7d6374370
1 file changed
+5
@@ -93,6 +93,11 @@ public class DatabasePlatformFactory {
|
|||||||
return provider.create(majorVersion, minorVersion, metaData, connection);
|
return provider.create(majorVersion, minorVersion, metaData, connection);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (providers.isEmpty()) {
|
||||||
|
throw new IllegalStateException("There are no ebean platform providers in the classpath. " +
|
||||||
|
"Add a missing dependency like ebean-h2, ebean-postgres, ebean-mysql etc to support the database [" + dbProductName
|
||||||
|
+ "]. Adding a dependency on io.ebean:ebean will add support for all platforms.");
|
||||||
|
}
|
||||||
throw new IllegalStateException("Unable to determine the appropriate ebean platform given database product name [" + dbProductName
|
throw new IllegalStateException("Unable to determine the appropriate ebean platform given database product name [" + dbProductName
|
||||||
+ "] and ebean platform providers " + providers + ". With ebean 13+ we now have separate platforms (ebean-postgres, ebean-mysql etc)"
|
+ "] and ebean platform providers " + providers + ". With ebean 13+ we now have separate platforms (ebean-postgres, ebean-mysql etc)"
|
||||||
+ " and should use database specific platform dependency like ebean-postgres. Note that we can use ebean-platform-all to include"
|
+ " and should use database specific platform dependency like ebean-postgres. Note that we can use ebean-platform-all to include"
|
||||||
|
|||||||
Reference in new issue
Block a user