OPENJPA-2332. Updated the "no-driver" message and added a couple of additional Trace statements to help with debugging Datasource configuration issues.

git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@1445220 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Kevin W. Sutter 2013-02-12 16:02:12 +00:00
parent 862b0f5229
commit aad999df89
2 changed files with 11 additions and 4 deletions

View File

@ -838,10 +838,16 @@ public class JDBCConfigurationImpl
return setupConnectionFactory(ds, false);
}
if (log.isTraceEnabled())
log.trace("createConnectionFactory: connectionFactory not created yet, attempt JNDI lookup...");
ds = (DataSource) super.getConnectionFactory(); // JNDI lookup
if (ds == null)
if (ds == null) {
if (log.isTraceEnabled())
log.trace("createConnectionFactory: JNDI lookup failed, attempt DataSource properties...");
ds = DataSourceFactory.newDataSource(this, false);
}
if (log.isTraceEnabled())
log.trace("createConnectionFactory: DataSource="+ds);

View File

@ -17,9 +17,10 @@
bad-join: The following error was detected when creating a foreign key: \
"{0}". The foreign key is being ignored.
no-driver: A JDBC Driver or DataSource class name must be specified in the \
ConnectionDriverName property. Available properties in configuration \
are "{0}".
no-driver: Attempting to use persistence.xml properties to resolve the datasource. \
A JDBC Driver or DataSource class name must be specified in the \
openjpa.ConnectionDriverName or javax.persistence.jdbc.driver property. \
Available properties in the configuration are "{0}".
bad-driver: The specified driver "{0}" is neither a java.sql.Driver \
nor a javax.sql.DataSource class name.
bad-sch-ref: The schema information table could not be created: {0}