slight improvements to error messages when driver class missing
This commit is contained in:
parent
a9fb252e1d
commit
044d91411f
|
@ -34,7 +34,7 @@ public class DriverManagerConnectionCreator extends BasicConnectionCreator {
|
|||
return DriverManager.getConnection( url, connectionProps );
|
||||
}
|
||||
catch (SQLException e) {
|
||||
throw convertSqlException( "Error calling DriverManager.getConnection()", e );
|
||||
throw convertSqlException( "Error calling JDBC 'DriverManager.getConnection()'", e );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -517,7 +517,7 @@ public interface CoreMessageLogger extends BasicLogger {
|
|||
void unableToObtainConnectionMetadata(SQLException error);
|
||||
|
||||
@LogMessage(level = WARN)
|
||||
@Message(value = "Could not obtain connection to query metadata", id = 342)
|
||||
@Message(value = "Could not obtain connection to query JDBC database metadata", id = 342)
|
||||
void unableToObtainConnectionToQueryMetadata(@Cause Exception e);
|
||||
|
||||
@LogMessage(level = ERROR)
|
||||
|
|
|
@ -7,6 +7,7 @@ package org.hibernate.internal.log;
|
|||
import java.lang.invoke.MethodHandles;
|
||||
import java.sql.SQLException;
|
||||
|
||||
import org.hibernate.cfg.JdbcSettings;
|
||||
import org.jboss.logging.BasicLogger;
|
||||
import org.jboss.logging.Logger;
|
||||
import org.jboss.logging.annotations.Cause;
|
||||
|
@ -45,7 +46,11 @@ public interface ConnectionInfoLogger extends BasicLogger {
|
|||
void logConnectionInfoDetails(String databaseConnectionInfo);
|
||||
|
||||
@LogMessage(level = WARN)
|
||||
@Message(id = 10001006, value = "No JDBC Driver class was specified by property `jakarta.persistence.jdbc.driver`, `hibernate.driver` or `javax.persistence.jdbc.driver`")
|
||||
@Message(id = 10001006,
|
||||
value = "No JDBC Driver class was specified by property '"
|
||||
+ JdbcSettings.JAKARTA_JDBC_DRIVER + "', '"
|
||||
+ JdbcSettings.JPA_JDBC_DRIVER + "', or '"
|
||||
+ JdbcSettings.DRIVER + "'")
|
||||
void jdbcDriverNotSpecified();
|
||||
|
||||
@LogMessage(level = DEBUG)
|
||||
|
|
|
@ -13,12 +13,12 @@ import org.hibernate.resource.beans.spi.BeanInstanceProducer;
|
|||
/**
|
||||
* @author Yanming Zhou
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public class SimpleBeanContainer implements BeanContainer {
|
||||
|
||||
public static final long INITIAL_VALUE = 23L;
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public <B> ContainedBean<B> getBean(
|
||||
Class<B> beanType,
|
||||
LifecycleOptions lifecycleOptions,
|
||||
|
|
Loading…
Reference in New Issue