mirror of
https://github.com/apache/openjpa.git
synced 2025-02-08 02:59:42 +00:00
useful error message for connection establishment problem
git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@1178635 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
4ef9c9f6f1
commit
accc2e01fb
@ -60,10 +60,8 @@ import org.apache.openjpa.util.UserException;
|
|||||||
*/
|
*/
|
||||||
public class DataSourceFactory {
|
public class DataSourceFactory {
|
||||||
|
|
||||||
private static final Localizer _loc = Localizer.forPackage
|
private static final Localizer _loc = Localizer.forPackage(DataSourceFactory.class);
|
||||||
(DataSourceFactory.class);
|
protected static Localizer _eloc = Localizer.forPackage(DelegatingDataSource.class);
|
||||||
protected static Localizer _eloc =
|
|
||||||
Localizer.forPackage(DelegatingDataSource.class);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a datasource using the given configuration.
|
* Create a datasource using the given configuration.
|
||||||
@ -73,7 +71,7 @@ public class DataSourceFactory {
|
|||||||
String driver = (factory2) ? conf.getConnection2DriverName()
|
String driver = (factory2) ? conf.getConnection2DriverName()
|
||||||
: conf.getConnectionDriverName();
|
: conf.getConnectionDriverName();
|
||||||
if (StringUtils.isEmpty(driver))
|
if (StringUtils.isEmpty(driver))
|
||||||
throw new UserException(_loc.get("no-driver", driver)).
|
throw new UserException(_loc.get("no-driver", conf)).
|
||||||
setFatal(true);
|
setFatal(true);
|
||||||
|
|
||||||
ClassLoader loader = conf.getClassResolverInstance().
|
ClassLoader loader = conf.getClassResolverInstance().
|
||||||
|
Loading…
x
Reference in New Issue
Block a user