From 0cbdc44fbc4a596da430fb02862ab8729e340e9b Mon Sep 17 00:00:00 2001 From: Gavin King Date: Mon, 3 Jun 2024 14:04:34 +0200 Subject: [PATCH] clean up some logging - reduce some INFO messages to DEBUG - delete unused messages - some minor formatting changes Signed-off-by: Gavin King --- .../community/dialect/RDMSOS2200Dialect.java | 2 - .../boot/model/relational/Namespace.java | 2 - .../hibernate/internal/CoreMessageLogger.java | 773 +----------------- .../internal/EntityManagerMessageLogger.java | 59 +- .../internal/log/ConnectionPoolingLogger.java | 0 .../org/hibernate/query/QueryLogging.java | 2 +- .../internal/ProxoolMessageLogger.java | 8 +- .../hibernate/spatial/HSMessageLogger.java | 15 +- .../hibernate/tool/hbm2ddl/TableMetadata.java | 12 - 9 files changed, 26 insertions(+), 847 deletions(-) create mode 100644 hibernate-core/src/main/java/org/hibernate/internal/log/ConnectionPoolingLogger.java diff --git a/hibernate-community-dialects/src/main/java/org/hibernate/community/dialect/RDMSOS2200Dialect.java b/hibernate-community-dialects/src/main/java/org/hibernate/community/dialect/RDMSOS2200Dialect.java index 1564712e3d..c29ad8702b 100644 --- a/hibernate-community-dialects/src/main/java/org/hibernate/community/dialect/RDMSOS2200Dialect.java +++ b/hibernate-community-dialects/src/main/java/org/hibernate/community/dialect/RDMSOS2200Dialect.java @@ -90,8 +90,6 @@ public class RDMSOS2200Dialect extends Dialect { */ public RDMSOS2200Dialect() { super( SimpleDatabaseVersion.ZERO_VERSION ); - // Display the dialect version. - LOG.rdmsOs2200Dialect(); } public RDMSOS2200Dialect(DialectResolutionInfo info) { diff --git a/hibernate-core/src/main/java/org/hibernate/boot/model/relational/Namespace.java b/hibernate-core/src/main/java/org/hibernate/boot/model/relational/Namespace.java index 84b8fd0b4b..596058f1ce 100644 --- a/hibernate-core/src/main/java/org/hibernate/boot/model/relational/Namespace.java +++ b/hibernate-core/src/main/java/org/hibernate/boot/model/relational/Namespace.java @@ -6,7 +6,6 @@ */ package org.hibernate.boot.model.relational; -import java.sql.Types; import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; @@ -26,7 +25,6 @@ import org.hibernate.boot.model.naming.PhysicalNamingStrategy; import org.hibernate.engine.jdbc.env.spi.JdbcEnvironment; import org.hibernate.internal.CoreLogging; import org.hibernate.internal.CoreMessageLogger; -import org.hibernate.mapping.AggregateColumn; import org.hibernate.mapping.Column; import org.hibernate.mapping.DenormalizedTable; import org.hibernate.mapping.Table; diff --git a/hibernate-core/src/main/java/org/hibernate/internal/CoreMessageLogger.java b/hibernate-core/src/main/java/org/hibernate/internal/CoreMessageLogger.java index 86e41ec815..7e1d2c65eb 100644 --- a/hibernate-core/src/main/java/org/hibernate/internal/CoreMessageLogger.java +++ b/hibernate-core/src/main/java/org/hibernate/internal/CoreMessageLogger.java @@ -9,31 +9,24 @@ package org.hibernate.internal; import java.io.File; import java.io.FileNotFoundException; import java.io.IOException; -import java.lang.reflect.Method; -import java.net.URL; import java.sql.SQLException; import java.sql.SQLWarning; -import java.util.Hashtable; import java.util.Properties; import java.util.ServiceConfigurationError; import java.util.Set; -import javax.naming.NameNotFoundException; import javax.naming.NamingException; import org.hibernate.HibernateException; import org.hibernate.LockMode; import org.hibernate.cache.CacheException; -import org.hibernate.cfg.AvailableSettings; import org.hibernate.dialect.Dialect; -import org.hibernate.engine.jdbc.dialect.spi.DialectResolver; import org.hibernate.engine.jdbc.env.internal.LobCreationLogging; import org.hibernate.engine.jndi.JndiException; import org.hibernate.engine.jndi.JndiNameException; -import org.hibernate.engine.spi.CollectionKey; import org.hibernate.engine.spi.SessionFactoryImplementor; import org.hibernate.id.IntegralDataTypeHolder; +import org.hibernate.service.Service; import org.hibernate.type.SerializationException; -import org.hibernate.type.Type; import org.jboss.logging.BasicLogger; import org.jboss.logging.annotations.Cause; @@ -43,7 +36,6 @@ import org.jboss.logging.annotations.MessageLogger; import org.jboss.logging.annotations.ValidIdRange; import jakarta.transaction.Synchronization; -import jakarta.transaction.SystemException; import org.checkerframework.checker.nullness.qual.Nullable; import static org.jboss.logging.Logger.Level.DEBUG; @@ -58,17 +50,13 @@ import static org.jboss.logging.Logger.Level.WARN; * New messages must be added after the last message defined to ensure message codes are unique. */ @MessageLogger(projectCode = "HHH") -@ValidIdRange( min = 1, max = 10000 ) +@ValidIdRange(max = 10000) public interface CoreMessageLogger extends BasicLogger { @LogMessage(level = WARN) @Message(value = "Already session bound on call to bind(); make sure you clean up your sessions", id = 2) void alreadySessionBound(); - @LogMessage(level = INFO) - @Message(value = "Autocommit mode: %s", id = 6) - void autoCommitMode(boolean autocommit); - @LogMessage(level = WARN) @Message(value = "JTASessionContext being used with JDBC transactions; auto-flush will not operate correctly with getCurrentSession()", id = 8) @@ -79,13 +67,9 @@ public interface CoreMessageLogger extends BasicLogger { */ @Deprecated @LogMessage(level = INFO) - @Message(value = "On release of batch it still contained JDBC statements", id = 10) + @Message(value = "Releases batch still contained JDBC statements", id = 10) void batchContainedStatementsOnRelease(); - @LogMessage(level = DEBUG) - @Message(value = "Bytecode provider: %s", id = 21) - void bytecodeProvider(String provider); - @LogMessage(level = WARN) @Message(value = "c3p0 properties were encountered, but the %s provider class was not found on the classpath; these properties are going to be ignored.", id = 22) @@ -95,15 +79,11 @@ public interface CoreMessageLogger extends BasicLogger { @Message(value = "I/O reported cached file could not be found: [%s]: %s", id = 23) void cachedFileNotFound(String path, FileNotFoundException error); - @LogMessage(level = INFO) - @Message(value = "Cache provider: %s", id = 24) - void cacheProvider(String name); - @LogMessage(level = INFO) @Message(value = "Second-level cache region factory [%s]", id = 25) void regionFactory(String name); - @LogMessage(level = INFO) + @LogMessage(level = DEBUG) @Message(value = "Second-level cache disabled", id = 26) void noRegionFactory(); @@ -135,10 +115,6 @@ public interface CoreMessageLogger extends BasicLogger { @Message(value = "Collections updated: %s", id = 36) void collectionsUpdated(long collectionUpdateCount); - @LogMessage(level = INFO) - @Message(value = "Columns: %s", id = 37) - void columns(Set keySet); - @LogMessage(level = WARN) @Message(value = "Composite-id class does not override equals(): %s", id = 38) void compositeIdClassDoesNotOverrideEquals(String name); @@ -147,78 +123,26 @@ public interface CoreMessageLogger extends BasicLogger { @Message(value = "Composite-id class does not override hashCode(): %s", id = 39) void compositeIdClassDoesNotOverrideHashCode(String name); - @LogMessage(level = INFO) - @Message(value = "Configuration resource: %s", id = 40) - void configurationResource(String resource); - - @LogMessage(level = INFO) - @Message(value = "Configured SessionFactory: %s", id = 41) - void configuredSessionFactory(String name); - - @LogMessage(level = INFO) - @Message(value = "Configuring from file: %s", id = 42) - void configuringFromFile(String file); - - @LogMessage(level = INFO) - @Message(value = "Configuring from resource: %s", id = 43) - void configuringFromResource(String resource); - - @LogMessage(level = INFO) - @Message(value = "Configuring from URL: %s", id = 44) - void configuringFromUrl(URL url); - - @LogMessage(level = INFO) - @Message(value = "Configuring from XML document", id = 45) - void configuringFromXmlDocument(); - @LogMessage(level = INFO) @Message(value = "Connections obtained: %s", id = 48) void connectionsObtained(long connectCount); - @LogMessage(level = ERROR) - @Message(value = "Container is providing a null PersistenceUnitRootUrl: discovery impossible", id = 50) - void containerProvidingNullPersistenceUnitRootUrl(); - @LogMessage(level = WARN) @Message(value = "Ignoring bag join fetch [%s] due to prior collection join fetch", id = 51) void containsJoinFetchedCollection(String role); - @LogMessage(level = INFO) - @Message(value = "Creating subcontext: %s", id = 53) - void creatingSubcontextInfo(String intermediateContextName); - @LogMessage(level = WARN) @Message(value = "Defining %s=true ignored in HEM", id = 59) void definingFlushBeforeCompletionIgnoredInHem(String flushBeforeCompletion); -// @LogMessage(level = WARN) -// @Message(value = "@ForceDiscriminator is deprecated use @DiscriminatorOptions instead.", id = 62) -// void deprecatedForceDescriminatorAnnotation(); - @LogMessage(level = WARN) @Message(value = "DEPRECATED: use [%s] instead with custom [%s] implementation", id = 65) void deprecatedUuidGenerator(String name, String name2); - @LogMessage(level = INFO) - @Message(value = "Disallowing insert statement comment for select-identity due to Oracle driver bug", id = 67) - void disallowingInsertStatementComment(); - @LogMessage(level = WARN) @Message(value = "Duplicate generator name %s", id = 69) void duplicateGeneratorName(String name); - @LogMessage(level = WARN) - @Message(value = "Duplicate generator table: %s", id = 70) - void duplicateGeneratorTable(String name); - - @LogMessage(level = INFO) - @Message(value = "Duplicate import: %s -> %s", id = 71) - void duplicateImport(String entityName, String rename); - - @LogMessage(level = WARN) - @Message(value = "Duplicate joins for class: %s", id = 72) - void duplicateJoins(String entityName); - @LogMessage(level = INFO) @Message(value = "entity-listener duplication, first event definition will be used: %s", id = 73) void duplicateListener(String className); @@ -247,23 +171,11 @@ public interface CoreMessageLogger extends BasicLogger { @Message(value = "Entities updated: %s", id = 80) void entitiesUpdated(long entityUpdateCount); - @LogMessage(level = WARN) - @Message(value = "Entity Manager closed by someone else (%s must not be used)", id = 82) - void entityManagerClosedBySomeoneElse(String autoCloseSession); - @LogMessage(level = WARN) @Message(value = "Entity [%s] is abstract-class/interface explicitly mapped as non-abstract; be sure to supply entity-names", id = 84) void entityMappedAsNonAbstract(String name); - @LogMessage(level = INFO) - @Message(value = "%s %s found", id = 85) - void exceptionHeaderFound(String exceptionHeader, String metaInfOrmXml); - - @LogMessage(level = INFO) - @Message(value = "%s No %s found", id = 86) - void exceptionHeaderNotFound(String exceptionHeader, String metaInfOrmXml); - @LogMessage(level = ERROR) @Message(value = "Exception in interceptor afterTransactionCompletion()", id = 87) void exceptionInAfterTransactionCompletionInterceptor(@Cause Throwable e); @@ -281,10 +193,6 @@ public interface CoreMessageLogger extends BasicLogger { void expectedType(String name, @Nullable String string); - @LogMessage(level = WARN) - @Message(value = "An item was expired by the cache while it was locked (increase your cache timeout): %s", id = 92) - void expired(Object key); - @LogMessage(level = INFO) @Message(value = "Bound factory to JNDI name: %s", id = 94) void factoryBoundToJndiName(String name); @@ -306,39 +214,15 @@ public interface CoreMessageLogger extends BasicLogger { + " to unsafe use of the session): %s", id = 99) void failed(Throwable throwable); -// @LogMessage(level = WARN) -// @Message(value = "Fail-safe cleanup (collections) : %s", id = 100) -// void failSafeCollectionsCleanup(CollectionLoadContext collectionLoadContext); -// -// @LogMessage(level = WARN) -// @Message(value = "Fail-safe cleanup (entities) : %s", id = 101) -// void failSafeEntitiesCleanup(EntityLoadContext entityLoadContext); - - @LogMessage(level = INFO) - @Message(value = "Fetching database metadata", id = 102) - void fetchingDatabaseMetadata(); - @LogMessage(level = INFO) @Message(value = "Flushes: %s", id = 105) void flushes(long flushCount); - @LogMessage(level = INFO) - @Message(value = "Forcing container resource cleanup on transaction completion", id = 106) - void forcingContainerResourceCleanup(); - @LogMessage(level = INFO) @Message(value = "Forcing table use for sequence-style generator due to pooled optimizer selection where db does not support pooled sequences", id = 107) void forcingTableUse(); - @LogMessage(level = INFO) - @Message(value = "Foreign keys: %s", id = 108) - void foreignKeys(Set keySet); - - @LogMessage(level = INFO) - @Message(value = "Found mapping document in jar: %s", id = 109) - void foundMappingDocument(String name); - @LogMessage(level = WARN) @Message(value = "GUID identifier generated: %s", id = 113) void guidGenerated(String result); @@ -368,10 +252,6 @@ public interface CoreMessageLogger extends BasicLogger { @Message(value = "HSQLDB supports only READ_UNCOMMITTED isolation", id = 118) void hsqldbSupportsOnlyReadCommittedIsolation(); - @LogMessage(level = WARN) - @Message(value = "On EntityLoadContext#clear, hydratingEntities contained [%s] entries", id = 119) - void hydratingEntitiesCount(int size); - @LogMessage(level = WARN) @Message(value = "Ignoring unique constraints specified on table generator [%s]", id = 120) void ignoringTableGeneratorConstraints(String name); @@ -388,14 +268,6 @@ public interface CoreMessageLogger extends BasicLogger { String name, String propertyName); - @LogMessage(level = WARN) - @Message(value = "Mapping metadata cache was not completely processed", id = 125) - void incompleteMappingMetadataCacheProcessing(); - - @LogMessage(level = INFO) - @Message(value = "Indexes: %s", id = 126) - void indexes(Set keySet); - @LogMessage(level = DEBUG) @Message(value = "Could not bind JNDI listener", id = 127) void couldNotBindJndiListener(); @@ -408,20 +280,12 @@ public interface CoreMessageLogger extends BasicLogger { @Message(value = "Array element type error\n%s", id = 132) void invalidArrayElementType(String message); - @LogMessage(level = ERROR) - @Message(value = "Application attempted to edit read only item: %s", id = 134) - void invalidEditOfReadOnlyItem(Object key); - @LogMessage(level = ERROR) @Message(value = "Invalid JNDI name: %s", id = 135) void invalidJndiName( String name, @Cause JndiNameException e); - @LogMessage(level = INFO) - @Message(value = "JACC contextID: %s", id = 140) - void jaccContextId(String contextId); - @LogMessage(level = INFO) @Message(value = "java.sql.Types mapped the same code [%s] multiple times; was [%s]; now [%s]", id = 141) void JavaSqlTypesMappedSameCodeMultipleTimes( @@ -435,48 +299,14 @@ public interface CoreMessageLogger extends BasicLogger { @Message(value = "Bytecode enhancement failed because no public, protected or package-private default constructor was found for entity: %s. Private constructors don't work with runtime proxies", id = 143) String bytecodeEnhancementFailedBecauseOfDefaultConstructor(String entityName); - @LogMessage(level = WARN) - @Message(value = "%s = false breaks the EJB3 specification", id = 144) - void jdbcAutoCommitFalseBreaksEjb3Spec(String autocommit); - - @Message(value = "JDBC rollback failed", id = 151) - String jdbcRollbackFailed(); - - @LogMessage(level = INFO) - @Message(value = "JNDI InitialContext properties:%s", id = 154) - void jndiInitialContextProperties(Hashtable hash); - - @LogMessage(level = ERROR) - @Message(value = "JNDI name %s does not handle a session factory reference", id = 155) - void jndiNameDoesNotHandleSessionFactoryReference( - String sfJNDIName, - @Cause ClassCastException e); - @LogMessage(level = DEBUG) @Message(value = "Lazy property fetching available for: %s", id = 157) void lazyPropertyFetchingAvailable(String name); - @LogMessage(level = WARN) - @Message(value = "In CollectionLoadContext#endLoadingCollections, localLoadingCollectionKeys contained [%s], but no LoadingCollectionEntry was found in loadContexts", - id = 159) - void loadingCollectionKeyNotFound(CollectionKey collectionKey); - - @LogMessage(level = WARN) - @Message(value = "On CollectionLoadContext#cleanup, localLoadingCollectionKeys contained [%s] entries", id = 160) - void localLoadingCollectionKeysCount(int size); - @LogMessage(level = INFO) @Message(value = "Logging statistics....", id = 161) void loggingStatistics(); - @LogMessage(level = DEBUG) - @Message(value = "*** Logical connection closed ***", id = 162) - void logicalConnectionClosed(); - - @LogMessage(level = DEBUG) - @Message(value = "Logical connection releasing its physical connection", id = 163) - void logicalConnectionReleasingPhysicalConnection(); - @LogMessage(level = INFO) @Message(value = "Max query time: %sms", id = 173) void maxQueryTime(long queryExecutionMaxTime); @@ -487,23 +317,13 @@ public interface CoreMessageLogger extends BasicLogger { int anticipatedNumberOfArguments, int numberOfArguments); - @LogMessage(level = ERROR) - @Message(value = "Error in named query: %s", id = 177) - void namedQueryError( - String queryName, - @Cause HibernateException e); - @LogMessage(level = WARN) @Message(value = "Naming exception occurred accessing factory: %s", id = 178) void namingExceptionAccessingFactory(NamingException exception); @LogMessage(level = WARN) @Message(value = "Narrowing proxy to %s - this operation breaks ==", id = 179) - void narrowingProxy(Class concreteProxyClass); - - @LogMessage(level = WARN) - @Message(value = "FirstResult/maxResults specified on polymorphic query; applying in memory", id = 180) - void needsLimit(); + void narrowingProxy(Class concreteProxyClass); @LogMessage(level = WARN) @Message(value = "No appropriate connection provider encountered, assuming application will be supplying connections", @@ -511,20 +331,10 @@ public interface CoreMessageLogger extends BasicLogger { void noAppropriateConnectionProvider(); @LogMessage(level = INFO) - @Message(value = "No default (no-argument) constructor for class: %s (class must be instantiated by Interceptor)", + @Message(value = "No default (no-argument) constructor for class [%s] (class must be instantiated by Interceptor)", id = 182) void noDefaultConstructor(String name); - @LogMessage(level = WARN) - @Message(value = "no persistent classes found for query class: %s", id = 183) - void noPersistentClassesFound(String query); - - @LogMessage(level = ERROR) - @Message(value = "No session factory with JNDI name %s", id = 184) - void noSessionFactoryWithJndiName( - String sfJNDIName, - @Cause NameNotFoundException e); - @LogMessage(level = INFO) @Message(value = "Optimistic lock failures: %s", id = 187) void optimisticLockFailures(long optimisticFailureCount); @@ -541,50 +351,11 @@ public interface CoreMessageLogger extends BasicLogger { @Message(value = "LinkageError while attempting to load package: %s", id = 195) void linkageError(String packageName, @Cause LinkageError e); - @LogMessage(level = ERROR) - @Message(value = "Error parsing XML: (%s) %s", id = 196) - void parsingXmlError( - int lineNumber, - String message); - - @LogMessage(level = ERROR) - @Message(value = "Error parsing XML: %s(%s) %s", id = 197) - void parsingXmlErrorForFile( - String file, - int lineNumber, - String message); - - @LogMessage(level = ERROR) - @Message(value = "Warning parsing XML: (%s) %s", id = 198) - void parsingXmlWarning( - int lineNumber, - String message); - - @LogMessage(level = WARN) - @Message(value = "Warning parsing XML: %s(%s) %s", id = 199) - void parsingXmlWarningForFile( - String file, - int lineNumber, - String message); - - @LogMessage(level = WARN) - @Message(value = "Persistence provider caller does not implement the EJB3 spec correctly." - + "PersistenceUnitInfo.getNewTempClassLoader() is null.", id = 200) - void persistenceProviderCallerDoesNotImplementEjb3SpecCorrectly(); - @LogMessage(level = INFO) @Message(value = "Pooled optimizer source reported [%s] as the initial value; use of 1 or greater highly recommended", id = 201) void pooledOptimizerReportedInitialValue(IntegralDataTypeHolder value); - @LogMessage(level = ERROR) - @Message(value = "PreparedStatement was already in the batch, [%s].", id = 202) - void preparedStatementAlreadyInBatch(String sql); - - @LogMessage(level = WARN) - @Message(value = "processEqualityExpression() : No expression to process", id = 203) - void processEqualityExpression(); - @LogMessage(level = INFO) @Message(value = "Processing PersistenceUnitInfo [name: %s]", id = 204) void processingPersistenceUnitInfoName(String persistenceUnitName); @@ -597,16 +368,6 @@ public interface CoreMessageLogger extends BasicLogger { @Message(value = "'hibernate.properties' not found", id = 206) void propertiesNotFound(); - @LogMessage(level = WARN) - @Message(value = "Property '%s' not found in class but described in (possible typo error)", id = 207) - void propertyNotFound(String property); - -// @LogMessage(level = WARN) -// @Message(value = "%s has been deprecated in favor of %s; that provider will be used instead.", id = 208) -// void providerClassDeprecated( -// String providerClassName, -// String actualProviderClassName); - @LogMessage(level = WARN) @Message(value = "proxool properties were encountered, but the %s provider class was not found on the classpath; these properties are going to be ignored.", id = 209) @@ -628,10 +389,6 @@ public interface CoreMessageLogger extends BasicLogger { @Message(value = "Query cache puts: %s", id = 215) void queryCachePuts(long queryCachePutCount); - @LogMessage(level = INFO) - @Message(value = "RDMSOS2200Dialect version: 1.0", id = 218) - void rdmsOs2200Dialect(); - @LogMessage(level = INFO) @Message(value = "Reading mappings from cache file: %s", id = 219) void readingCachedMappings(File cachedFile); @@ -640,14 +397,6 @@ public interface CoreMessageLogger extends BasicLogger { @Message(value = "Reading mappings from file: %s", id = 220) void readingMappingsFromFile(String path); - @LogMessage(level = INFO) - @Message(value = "Reading mappings from resource: %s", id = 221) - void readingMappingsFromResource(String resourceName); - - @LogMessage(level = WARN) - @Message(value = "read-only cache configured for mutable collection [%s]", id = 222) - void readOnlyCacheConfiguredForMutableCollection(String name); - @LogMessage(level = WARN) @Message(value = "Recognized obsolete hibernate namespace %s. Use namespace %s instead. Refer to Hibernate 3.6 Migration Guide", id = 223) @@ -655,16 +404,6 @@ public interface CoreMessageLogger extends BasicLogger { String oldHibernateNamespace, String hibernateNamespace); - @LogMessage(level = WARN) - @Message(value = "Property [%s] has been renamed to [%s]; update your properties appropriately", id = 225) - void renamedProperty( - Object propertyName, - Object newPropertyName); - - @LogMessage(level = INFO) - @Message(value = "Required a different provider: %s", id = 226) - void requiredDifferentProvider(String provider); - @LogMessage(level = INFO) @Message(value = "Running hbm2ddl schema export", id = 227) void runningHbm2ddlSchemaExport(); @@ -677,28 +416,12 @@ public interface CoreMessageLogger extends BasicLogger { @Message(value = "Running schema validator", id = 229) void runningSchemaValidator(); - @LogMessage(level = INFO) - @Message(value = "Schema export complete", id = 230) - void schemaExportComplete(); - - @LogMessage(level = ERROR) - @Message(value = "Schema export unsuccessful", id = 231) - void schemaExportUnsuccessful(@Cause Exception e); - - @LogMessage(level = INFO) - @Message(value = "Schema update complete", id = 232) - void schemaUpdateComplete(); - @LogMessage(level = WARN) @Message(value = "Scoping types to session factory %s after already scoped %s", id = 233) void scopingTypesToSessionFactoryAfterAlreadyScoped( SessionFactoryImplementor factory, SessionFactoryImplementor factory2); - @LogMessage(level = INFO) - @Message(value = "Searching for mapping documents in jar: %s", id = 235) - void searchingForMappingDocuments(String name); - @LogMessage(level = INFO) @Message(value = "Second level cache hits: %s", id = 237) void secondLevelCacheHits(long secondLevelCacheHitCount); @@ -711,10 +434,6 @@ public interface CoreMessageLogger extends BasicLogger { @Message(value = "Second level cache puts: %s", id = 239) void secondLevelCachePuts(long secondLevelCachePutCount); - @LogMessage(level = INFO) - @Message(value = "Service properties: %s", id = 240) - void serviceProperties(Properties properties); - @LogMessage(level = INFO) @Message(value = "Sessions closed: %s", id = 241) void sessionsClosed(long sessionCloseCount); @@ -723,34 +442,12 @@ public interface CoreMessageLogger extends BasicLogger { @Message(value = "Sessions opened: %s", id = 242) void sessionsOpened(long sessionOpenCount); - @LogMessage(level = WARN) - @Message(value = "Manipulation query [%s] resulted in [%s] split queries", id = 245) - void splitQueries( - String sourceQuery, - int length); - -// @LogMessage(level = ERROR) -// @Message(value = "SQLException escaped proxy", id = 246) -// void sqlExceptionEscapedProxy(@Cause SQLException e); - @LogMessage(level = WARN) @Message(value = "SQL Error: %s, SQLState: %s", id = 247) void sqlWarning( int errorCode, String sqlState); - @LogMessage(level = INFO) - @Message(value = "Starting query cache at region: %s", id = 248) - void startingQueryCache(String region); - - @LogMessage(level = INFO) - @Message(value = "Starting service at JNDI name: %s", id = 249) - void startingServiceAtJndiName(String boundName); - - @LogMessage(level = INFO) - @Message(value = "Starting update timestamps cache at region: %s", id = 250) - void startingUpdateTimestampsCache(String region); - @LogMessage(level = INFO) @Message(value = "Start time: %s", id = 251) void startTime(long startTime); @@ -763,14 +460,6 @@ public interface CoreMessageLogger extends BasicLogger { @Message(value = "Statements prepared: %s", id = 253) void statementsPrepared(long prepareStatementCount); - @LogMessage(level = INFO) - @Message(value = "Stopping service", id = 255) - void stoppingService(); - - @LogMessage(level = INFO) - @Message(value = "sub-resolver threw unexpected exception, continuing to next: %s", id = 257) - void subResolverException(String message); - @LogMessage(level = INFO) @Message(value = "Successful transactions: %s", id = 258) void successfulTransactions(long committedTransactionCount); @@ -785,10 +474,6 @@ public interface CoreMessageLogger extends BasicLogger { Synchronization synchronization, Throwable t); - @LogMessage(level = INFO) - @Message(value = "Table found: %s", id = 261) - void tableFound(String string); - @LogMessage(level = INFO) @Message(value = "Table not found: %s", id = 262) void tableNotFound(String name); @@ -801,34 +486,10 @@ public interface CoreMessageLogger extends BasicLogger { @Message(value = "Transactions: %s", id = 266) void transactions(long transactionCount); - @LogMessage(level = WARN) - @Message(value = "Transaction started on non-root session", id = 267) - void transactionStartedOnNonRootSession(); - - @LogMessage(level = INFO) - @Message(value = "Transaction strategy: %s", id = 268) - void transactionStrategy(String strategyClassName); - @LogMessage(level = WARN) @Message(value = "Type [%s] defined no registration keys; ignoring", id = 269) void typeDefinedNoRegistrationKeys(Object type); - @LogMessage(level = DEBUG) - @Message(value = "Type registration key [%s] overrode previous key: %s", id = 270) - void typeRegistrationKeyOverridesPrevious( - String key, - Type old); - - @LogMessage(level = WARN) - @Message(value = "Naming exception occurred accessing Ejb3Configuration", id = 271) - void unableToAccessEjb3Configuration(@Cause NamingException e); - - @LogMessage(level = ERROR) - @Message(value = "Error while accessing session factory with JNDI name %s", id = 272) - void unableToAccessSessionFactory( - String sfJNDIName, - @Cause NamingException e); - @LogMessage(level = WARN) @Message(value = "Error accessing type info result set: %s", id = 273) void unableToAccessTypeInfoResultSet(String string); @@ -839,38 +500,10 @@ public interface CoreMessageLogger extends BasicLogger { String className, @Cause Exception e); - @LogMessage(level = WARN) - @Message(value = "Could not bind Ejb3Configuration to JNDI", id = 276) - void unableToBindEjb3ConfigurationToJndi(@Cause JndiException e); - @LogMessage(level = WARN) @Message(value = "Could not bind factory to JNDI", id = 277) void unableToBindFactoryToJndi(@Cause JndiException e); - @LogMessage(level = INFO) - @Message(value = "Could not bind value '%s' to parameter: %s; %s", id = 278) - void unableToBindValueToParameter( - String nullSafeToString, - int index, - String message); - - @LogMessage(level = ERROR) - @Message(value = "Unable to build enhancement metamodel for %s", id = 279) - void unableToBuildEnhancementMetamodel(String className); - - @LogMessage(level = INFO) - @Message(value = "Could not build SessionFactory using the MBean classpath - will try again using client classpath: %s", - id = 280) - void unableToBuildSessionFactoryUsingMBeanClasspath(String message); - - @LogMessage(level = WARN) - @Message(value = "Unable to clean up callable statement", id = 281) - void unableToCleanUpCallableStatement(@Cause SQLException e); - - @LogMessage(level = WARN) - @Message(value = "Unable to clean up prepared statement", id = 282) - void unableToCleanUpPreparedStatement(@Cause SQLException e); - @LogMessage(level = WARN) @Message(value = "Unable to cleanup temporary id table after use [%s]", id = 283) void unableToCleanupTemporaryIdTable(Throwable t); @@ -879,48 +512,14 @@ public interface CoreMessageLogger extends BasicLogger { @Message(value = "Error closing InitialContext [%s]", id = 285) void unableToCloseInitialContext(String string); - @LogMessage(level = ERROR) - @Message(value = "Error closing input files: %s", id = 286) - void unableToCloseInputFiles( - String name, - @Cause IOException e); - @LogMessage(level = WARN) @Message(value = "Could not close input stream", id = 287) void unableToCloseInputStream(@Cause IOException e); - @LogMessage(level = WARN) - @Message(value = "Could not close input stream for %s", id = 288) - void unableToCloseInputStreamForResource( - String resourceName, - @Cause IOException e); - - @LogMessage(level = INFO) - @Message(value = "Unable to close iterator", id = 289) - void unableToCloseIterator(@Cause SQLException e); - - @LogMessage(level = ERROR) - @Message(value = "Could not close jar: %s", id = 290) - void unableToCloseJar(String message); - - @LogMessage(level = ERROR) - @Message(value = "Error closing output file: %s", id = 291) - void unableToCloseOutputFile( - String outputFile, - @Cause IOException e); - @LogMessage(level = WARN) @Message(value = "IOException occurred closing output stream", id = 292) void unableToCloseOutputStream(@Cause IOException e); - @LogMessage(level = ERROR) - @Message(value = "Could not close session", id = 294) - void unableToCloseSession(@Cause HibernateException e); - - @LogMessage(level = ERROR) - @Message(value = "Could not close session during rollback", id = 295) - void unableToCloseSessionDuringRollback(@Cause Exception e); - @LogMessage(level = WARN) @Message(value = "IOException occurred closing stream", id = 296) void unableToCloseStream(@Cause IOException e); @@ -929,31 +528,12 @@ public interface CoreMessageLogger extends BasicLogger { @Message(value = "Could not close stream on hibernate.properties: %s", id = 297) void unableToCloseStreamError(IOException error); - @Message(value = "JTA commit failed", id = 298) - String unableToCommitJta(); - - @LogMessage(level = ERROR) - @Message(value = "Could not complete schema update", id = 299) - void unableToCompleteSchemaUpdate(@Cause Exception e); - - @LogMessage(level = ERROR) - @Message(value = "Could not complete schema validation", id = 300) - void unableToCompleteSchemaValidation(@Cause SQLException e); - - @LogMessage(level = WARN) - @Message(value = "Unable to configure SQLExceptionConverter: %s", id = 301) - void unableToConfigureSqlExceptionConverter(HibernateException e); - @LogMessage(level = ERROR) @Message(value = "Unable to construct current session context [%s]", id = 302) void unableToConstructCurrentSessionContext( String impl, @Cause Throwable e); - @LogMessage(level = WARN) - @Message(value = "Unable to construct instance of specified SQLExceptionConverter: %s", id = 303) - void unableToConstructSqlExceptionConverter(Throwable t); - @LogMessage(level = WARN) @Message(value = "Could not copy system properties, system properties will be ignored", id = 304) void unableToCopySystemProperties(); @@ -974,32 +554,6 @@ public interface CoreMessageLogger extends BasicLogger { String path, SerializationException error); - @LogMessage(level = WARN) - @Message(value = "Unable to destroy cache: %s", id = 308) - void unableToDestroyCache(String message); - - @LogMessage(level = WARN) - @Message(value = "Unable to destroy query cache: %s: %s", id = 309) - void unableToDestroyQueryCache( - String region, - String message); - - @LogMessage(level = WARN) - @Message(value = "Unable to destroy update timestamps cache: %s: %s", id = 310) - void unableToDestroyUpdateTimestampsCache( - String region, - String message); - - @Message(value = "Could not determine transaction status", id = 312) - String unableToDetermineTransactionStatus(); - - @Message(value = "Could not determine transaction status after commit", id = 313) - String unableToDetermineTransactionStatusAfterCommit(); - - @LogMessage(level = WARN) - @Message(value = "Unable to evictData temporary id table after use [%s]", id = 314) - void unableToDropTemporaryIdTable(String message); - /** * @deprecated Use {@link org.hibernate.engine.jdbc.batch.JdbcBatchLogging#unableToExecuteBatch} instead */ @@ -1008,26 +562,10 @@ public interface CoreMessageLogger extends BasicLogger { @Deprecated void unableToExecuteBatch(Exception e, String sql ); - @LogMessage(level = WARN) - @Message(value = "Error executing resolver [%s]: %s", id = 316) - void unableToExecuteResolver( - DialectResolver abstractDialectResolver, - String message); - @LogMessage(level = INFO) @Message(value = "Could not find any META-INF/persistence.xml file in the classpath", id = 318) void unableToFindPersistenceXmlInClasspath(); - @LogMessage(level = ERROR) - @Message(value = "Could not get database metadata", id = 319) - void unableToGetDatabaseMetadata(@Cause SQLException e); - - @LogMessage(level = WARN) - @Message(value = "Unable to instantiate configured schema name resolver [%s] %s", id = 320) - void unableToInstantiateConfiguredSchemaNameResolver( - String resolverClassName, - String message); - @LogMessage(level = WARN) @Message(value = "Unable to interpret specified optimizer [%s], falling back to noop", id = 321) void unableToLocateCustomOptimizerClass(String type); @@ -1040,18 +578,10 @@ public interface CoreMessageLogger extends BasicLogger { @Message(value = "Unable to instantiate UUID generation strategy class: %s", id = 325) void unableToInstantiateUuidGenerationStrategy(Exception ignore); - @LogMessage(level = WARN) - @Message(value = "Cannot join transaction: do not override %s", id = 326) - void unableToJoinTransaction(String transactionStrategy); - @LogMessage(level = INFO) @Message(value = "Error performing load command", id = 327) void unableToLoadCommand(@Cause HibernateException e); - @LogMessage(level = WARN) - @Message(value = "Unable to load/access derby driver class sysinfo to check versions: %s", id = 328) - void unableToLoadDerbyDriver(String message); - @LogMessage(level = ERROR) @Message(value = "Problem loading properties from hibernate.properties", id = 329) void unableToLoadProperties(); @@ -1059,16 +589,6 @@ public interface CoreMessageLogger extends BasicLogger { @Message(value = "Unable to locate config file: %s", id = 330) String unableToLocateConfigFile(String path); - @LogMessage(level = WARN) - @Message(value = "Unable to locate configured schema name resolver class [%s] %s", id = 331) - void unableToLocateConfiguredSchemaNameResolver( - String resolverClassName, - String message); - - @LogMessage(level = WARN) - @Message(value = "Unable to locate MBeanServer on JMX service shutdown", id = 332) - void unableToLocateMBeanServer(); - @LogMessage(level = WARN) @Message(value = "Unable to locate requested UUID generation strategy class: %s", id = 334) void unableToLocateUuidGenerationStrategy(String strategyClassName); @@ -1077,10 +597,6 @@ public interface CoreMessageLogger extends BasicLogger { @Message(value = "Unable to log SQLWarnings: %s", id = 335) void unableToLogSqlWarnings(SQLException sqle); - @LogMessage(level = WARN) - @Message(value = "Could not log warnings", id = 336) - void unableToLogWarnings(@Cause SQLException e); - @LogMessage(level = ERROR) @Message(value = "Unable to mark for rollback on PersistenceException: ", id = 337) void unableToMarkForRollbackOnPersistenceException(@Cause Exception e); @@ -1097,37 +613,9 @@ public interface CoreMessageLogger extends BasicLogger { @Message(value = "Could not obtain connection to query metadata", id = 342) void unableToObtainConnectionToQueryMetadata(@Cause Exception e); - @LogMessage(level = ERROR) - @Message(value = "Could not obtain initial context", id = 343) - void unableToObtainInitialContext(@Cause NamingException e); - - @LogMessage(level = ERROR) - @Message(value = "Could not parse the package-level metadata [%s]", id = 344) - void unableToParseMetadata(String packageName); - - @Message(value = "JDBC commit failed", id = 345) - String unableToPerformJdbcCommit(); - - @LogMessage(level = ERROR) - @Message(value = "Error during managed flush [%s]", id = 346) - void unableToPerformManagedFlush(String message); - @Message(value = "Unable to query java.sql.DatabaseMetaData", id = 347) String unableToQueryDatabaseMetadata(); - @LogMessage(level = ERROR) - @Message(value = "Unable to read class: %s", id = 348) - void unableToReadClass(String message); - - @LogMessage(level = INFO) - @Message(value = "Could not read column value from result set: %s; %s", id = 349) - void unableToReadColumnValueFromResultSet( - String name, - String message); - - @Message(value = "Could not read a hi value - you need to populate the table: %s", id = 350) - String unableToReadHiValue(String tableName); - @LogMessage(level = ERROR) @Message(value = "Could not read or init a hi value", id = 351) void unableToReadOrInitHiValue(@Cause SQLException e); @@ -1144,14 +632,6 @@ public interface CoreMessageLogger extends BasicLogger { @Message(value = "Could not release a cache lock: %s", id = 353) void unableToReleaseCacheLock(CacheException ce); - @LogMessage(level = INFO) - @Message(value = "Unable to release initial context: %s", id = 354) - void unableToReleaseContext(String message); - - @LogMessage(level = WARN) - @Message(value = "Unable to release created MBeanServer: %s", id = 355) - void unableToReleaseCreatedMBeanServer(String string); - @LogMessage(level = INFO) @Message(value = "Unable to release isolated connection [%s]", id = 356) void unableToReleaseIsolatedConnection(Throwable ignore); @@ -1164,20 +644,6 @@ public interface CoreMessageLogger extends BasicLogger { @Message(value = "Unable to erase previously added bag join fetch", id = 358) void unableToRemoveBagJoinFetch(); - @LogMessage(level = INFO) - @Message(value = "Could not resolve aggregate function [%s]; using standard definition", id = 359) - void unableToResolveAggregateFunction(String name); - - @LogMessage(level = INFO) - @Message(value = "Unable to resolve mapping file [%s]", id = 360) - void unableToResolveMappingFile(String xmlFile); - - @LogMessage(level = INFO) - @Message(value = "Unable to retrieve cache from JNDI [%s]: %s", id = 361) - void unableToRetrieveCache( - String namespace, - String message); - @LogMessage(level = WARN) @Message(value = "Unable to retrieve type info result set: %s", id = 362) void unableToRetrieveTypeInfoResultSet(String string); @@ -1188,74 +654,27 @@ public interface CoreMessageLogger extends BasicLogger { @LogMessage(level = INFO) @Message(value = "Unable to rollback isolated transaction on error [%s]: [%s]", id = 364) - void unableToRollbackIsolatedTransaction( - Exception e, - Exception ignore); - - @Message(value = "JTA rollback failed", id = 365) - String unableToRollbackJta(); + void unableToRollbackIsolatedTransaction(Exception e, Exception ignore); @LogMessage(level = ERROR) @Message(value = "Error running schema update", id = 366) void unableToRunSchemaUpdate(@Cause Exception e); - @LogMessage(level = ERROR) - @Message(value = "Could not set transaction to rollback only", id = 367) - void unableToSetTransactionToRollbackOnly(@Cause SystemException e); - - @LogMessage(level = WARN) - @Message(value = "Exception while stopping service", id = 368) - void unableToStopHibernateService(@Cause Exception e); - @LogMessage(level = INFO) @Message(value = "Error stopping service [%s]", id = 369) - void unableToStopService( - Class class1, - @Cause Exception e); - - @LogMessage(level = WARN) - @Message(value = "Exception switching from method: [%s] to a method using the column index. Reverting to using: [% class1, @Cause Exception e); @LogMessage(level = WARN) @Message(value = "Could not unbind factory from JNDI", id = 374) void unableToUnbindFactoryFromJndi(@Cause JndiException e); - @Message(value = "Could not update hi value in: %s", id = 375) - String unableToUpdateHiValue(String tableName); - @LogMessage(level = ERROR) @Message(value = "Could not updateQuery hi value in: %s", id = 376) - void unableToUpdateQueryHiValue( - String tableName, - @Cause SQLException e); - - @LogMessage(level = INFO) - @Message(value = "Error wrapping result set", id = 377) - void unableToWrapResultSet(@Cause SQLException e); + void unableToUpdateQueryHiValue(String tableName, @Cause SQLException e); @LogMessage(level = WARN) @Message(value = "I/O reported error writing cached file: %s: %s", id = 378) - void unableToWriteCachedFile( - String path, - String message); - - @LogMessage(level = WARN) - @Message(value = "Unexpected literal token type [%s] passed for numeric processing", id = 380) - void unexpectedLiteralTokenType(int type); + void unableToWriteCachedFile(String path, String message); /** * @deprecated Use {@link org.hibernate.engine.jdbc.JdbcLogging#unexpectedRowCounts} instead @@ -1265,22 +684,6 @@ public interface CoreMessageLogger extends BasicLogger { @Deprecated void unexpectedRowCounts(); - @LogMessage(level = WARN) - @Message(value = "Unrecognized bytecode provider [%s]; using the default implementation [%s]", id = 382) - void unknownBytecodeProvider(String providerName, String defaultProvider); - - @LogMessage(level = WARN) - @Message(value = "Unknown Ingres major version [%s]; using Ingres 9.2 dialect", id = 383) - void unknownIngresVersion(int databaseMajorVersion); - - @LogMessage(level = WARN) - @Message(value = "Unknown Oracle major version [%s]", id = 384) - void unknownOracleVersion(int databaseMajorVersion); - - @LogMessage(level = WARN) - @Message(value = "Unknown Microsoft SQL Server major version [%s] using [%s] dialect", id = 385) - void unknownSqlServerVersion(int databaseMajorVersion, Class dialectClass); - @LogMessage(level = WARN) @Message(value = "ResultSet had no statement associated with it, but was not yet registered", id = 386) void unregisteredResultSetWithoutStatement(); @@ -1291,22 +694,6 @@ public interface CoreMessageLogger extends BasicLogger { @Message(value = "ResultSet's statement was not registered", id = 387) void unregisteredStatement(); - @LogMessage(level = ERROR) - @Message(value = "Unsuccessful: %s", id = 388) - void unsuccessful(String sql); - - @LogMessage(level = WARN) - @Message(value = "Overriding release mode as connection provider does not support 'after_statement'", id = 390) - void unsupportedAfterStatement(); - - @LogMessage(level = WARN) - @Message(value = "Ingres 10 is not yet fully supported; using Ingres 9.3 dialect", id = 391) - void unsupportedIngresVersion(); - - @LogMessage(level = WARN) - @Message(value = "Hibernate does not support SequenceGenerator.initialValue() unless '%s' set", id = 392) - void unsupportedInitialValue(String propertyName); - @LogMessage(level = WARN) @Message(value = "The %s.%s.%s version of H2 implements temporary table creation such that it commits current transaction; multi-table, bulk hql/jpaql will not work properly", id = 393) @@ -1315,14 +702,6 @@ public interface CoreMessageLogger extends BasicLogger { int minorVersion, int buildId); - @LogMessage(level = WARN) - @Message(value = "Oracle 11g is not yet fully supported; using Oracle 10g dialect", id = 394) - void unsupportedOracleVersion(); - - @LogMessage(level = INFO) - @Message(value = "Updating schema", id = 396) - void updatingSchema(); - @LogMessage(level = INFO) @Message(value = "Explicit segment value for id generator [%s.%s] suggested; using default [%s]", id = 398) void usingDefaultIdGeneratorSegmentValue( @@ -1330,10 +709,6 @@ public interface CoreMessageLogger extends BasicLogger { String segmentColumnName, String defaultToUse); - @LogMessage(level = INFO) - @Message(value = "Using default transaction strategy (direct JDBC transactions)", id = 399) - void usingDefaultTransactionStrategy(); - /** * @deprecated Use {@link org.hibernate.dialect.DialectLogging#usingDialect} instead */ @@ -1346,10 +721,6 @@ public interface CoreMessageLogger extends BasicLogger { @Message(value = "Don't use old DTDs, read the Hibernate 3.x Migration Guide", id = 404) void usingOldDtd(); -// @LogMessage(level = INFO) -// @Message(value = "Using java.io streams to persist binary types", id = 407) -// void usingStreams(); - @LogMessage(level = WARN) @Message(value = "Using %s which does not generate IETF RFC 4122 compliant UUID values; consider using %s instead", id = 409) @@ -1357,10 +728,6 @@ public interface CoreMessageLogger extends BasicLogger { String name, String name2); - @LogMessage(level = INFO) - @Message(value = "Hibernate Validator not found: ignoring", id = 410) - void validatorNotFound(); - @LogMessage(level = INFO) @Message(value = "Hibernate ORM core version %s", id = 412) void version(String versionString); @@ -1369,34 +736,10 @@ public interface CoreMessageLogger extends BasicLogger { @Message(value = "Warnings creating temp table: %s", id = 413) void warningsCreatingTempTable(SQLWarning warning); - @LogMessage(level = INFO) - @Message(value = "Property hibernate.search.autoregister_listeners is set to false. No attempt will be made to register Hibernate Search event listeners.", - id = 414) - void willNotRegisterListeners(); - @LogMessage(level = WARN) @Message(value = "Write locks via update not supported for non-versioned entities [%s]", id = 416) void writeLocksNotSupported(String entityName); - @LogMessage(level = INFO) - @Message(value = "Writing generated schema to file: %s", id = 417) - void writingGeneratedSchemaToFile(String outputFile); - - @LogMessage(level = INFO) - @Message(value = "Adding override for %s: %s", id = 418) - void addingOverrideFor( - String name, - String name2); - - @LogMessage(level = WARN) - @Message(value = "Resolved SqlTypeDescriptor is for a different SQL code. %s has sqlCode=%s; type override %s has sqlCode=%s", - id = 419) - void resolvedSqlTypeDescriptorForDifferentSqlCode( - String name, - String valueOf, - String name2, - String valueOf2); - @LogMessage(level = DEBUG) @Message(value = "Closing un-released batch", id = 420) void closingUnreleasedBatch(); @@ -1436,37 +779,6 @@ public interface CoreMessageLogger extends BasicLogger { @Message(value = "Disabling contextual LOB creation as createClob() method threw error: %s", id = 424) @Deprecated void disablingContextualLOBCreationSinceCreateClobFailed(Throwable t); - - @LogMessage(level = INFO) - @Message(value = "Could not close session; swallowing exception[%s] as transaction completed", id = 425) - void unableToCloseSessionButSwallowingError(HibernateException e); - - @LogMessage(level = WARN) - @Message(value = "You should set hibernate.transaction.jta.platform if cache is enabled", id = 426) - void setManagerLookupClass(); - -// @LogMessage(level = WARN) -// @Message(value = "Using deprecated %s strategy [%s], use newer %s strategy instead [%s]", id = 427) -// void deprecatedTransactionManagerStrategy(String name, -// String transactionManagerStrategy, -// String name2, -// String jtaPlatform); - - @LogMessage(level = INFO) - @Message(value = "Encountered legacy TransactionManagerLookup specified; convert to newer %s contract specified via %s setting", - id = 428) - void legacyTransactionManagerStrategy( - String name, - String jtaPlatform); - - @LogMessage(level = WARN) - @Message(value = "Setting entity-identifier value binding where one already existed: %s.", id = 429) - void entityIdentifierValueBindingExists(String name); - - @LogMessage(level = WARN) - @Message(value = "There were not column names specified for index %s on table %s", id = 432) - void noColumnsSpecifiedForIndex(String indexName, String tableName); - @LogMessage(level = INFO) @Message(value = "update timestamps cache puts: %s", id = 433) void timestampCachePuts(long updateTimestampsCachePutCount); @@ -1479,11 +791,6 @@ public interface CoreMessageLogger extends BasicLogger { @Message(value = "update timestamps cache misses: %s", id = 435) void timestampCacheMisses(long updateTimestampsCachePutCount); - @LogMessage(level = WARN) - @Message(value = "Entity manager factory name (%s) is already registered. If entity manager will be clustered " + - "or passivated, specify a unique value for property '%s'", id = 436) - void entityManagerFactoryAlreadyRegistered(String emfName, String propertyName); - @LogMessage(level = WARN) @Message(value = "Attempting to save one or more entities that have a non-nullable association with an unsaved transient entity. The unsaved transient entity must be saved in an operation prior to saving these dependent entities.\n" + "\tUnsaved transient entity: (%s)\n\tDependent entities: (%s)\n\tNon-nullable association(s): (%s)", id = 437) @@ -1537,17 +844,6 @@ public interface CoreMessageLogger extends BasicLogger { ) void aliasSpecificLockingWithFollowOnLocking(LockMode lockMode); - /** - * @see org.hibernate.internal.log.DeprecationLogger#logDeprecationOfEmbedXmlSupport() - */ - @LogMessage(level = WARN) - @Message( - value = "embed-xml attributes were intended to be used for DOM4J entity mode. Since that entity mode has been " + - "removed, embed-xml attributes are no longer supported and should be removed from mappings.", - id = 446 - ) - void embedXmlAttributesNoLongerSupported(); - @LogMessage(level = WARN) @Message( value = "Explicit use of UPGRADE_SKIPLOCKED in lock() calls is not recommended; use normal UPGRADE locking instead", @@ -1582,18 +878,6 @@ public interface CoreMessageLogger extends BasicLogger { ) void rollbackFromBackgroundThread(int status); - @LogMessage(level = WARN) - @Message(value = "Exception while loading a class or resource found during scanning", id = 452) - void unableToLoadScannedClassOrResource(@Cause Exception e); - - @LogMessage(level = WARN) - @Message(value = "Exception while discovering OSGi service implementations: %s", id = 453) - void unableToDiscoverOsgiService(String service, @Cause Exception e); - - @LogMessage(level = WARN) - @Message(value = "Named parameters are used for a callable statement, but database metadata indicates named parameters are not supported.", id = 456) - void unsupportedNamedParameters(); - // 458-466 reserved for use by main branch (ORM 5.0.0) @LogMessage(level = DEBUG) @@ -1657,28 +941,6 @@ public interface CoreMessageLogger extends BasicLogger { @Message(value = "A ManagedEntity was associated with a stale PersistenceContext. A ManagedEntity may only be associated with one PersistenceContext at a time; %s", id = 480) void stalePersistenceContextInEntityEntry(String msg); - @LogMessage(level = WARN) - @Message( - id = 481, - value = "Encountered Java type [%s] for which we could not locate a JavaType and " + - "which does not appear to implement equals and/or hashCode. This can lead to " + - "significant performance problems when performing equality/dirty checking involving " + - "this Java type. Consider registering a custom JavaType or at least " + - "implementing equals/hashCode." - ) - void unknownJavaTypeNoEqualsHashCode(Class javaType); - - @LogMessage(level = WARN) - @Message( - id = 483, - value = "An experimental - and now also deprecated - feature has been enabled (" + - AvailableSettings.CREATE_EMPTY_COMPOSITES_ENABLED + - "=true) that instantiates empty composite/embedded " + - "objects when all of its attribute values are null. This feature has known issues and " + - "should not be used in production. See Hibernate Jira issue HHH-11936 for details." - ) - void emptyCompositesEnabled(); - @LogMessage(level = WARN) @Message(value = "Vibur properties were encountered, but the Vibur ConnectionProvider was not found on the classpath; these properties are going to be ignored.", id = 484) @@ -1686,10 +948,7 @@ public interface CoreMessageLogger extends BasicLogger { @LogMessage(level = ERROR) @Message(value = "Illegally attempted to associate a proxy for entity [%s] with id [%s] with two open sessions.", id = 485) - void attemptToAssociateProxyWithTwoOpenSessions( - String entityName, - Object id - ); + void attemptToAssociateProxyWithTwoOpenSessions(String entityName, Object id); @LogMessage(level = WARN) @Message(value = "Agroal properties were encountered, but the Agroal ConnectionProvider was not found on the classpath; these properties are going to be ignored.", @@ -1762,15 +1021,12 @@ public interface CoreMessageLogger extends BasicLogger { @Message(value = "Detaching an uninitialized collection with enabled filters from a session: %s", id = 506) void enabledFiltersWhenDetachFromSession(String collectionInfoString); - @Message(value = "The Javassist based BytecodeProvider has been removed: remove the `hibernate.bytecode.provider` configuration property to switch to the default provider", id = 508) - HibernateException usingRemovedJavassistBytecodeProvider(); - @LogMessage(level = WARN) @Message(value = "Multi-table insert is not available due to missing identity and window function support for: %s", id = 509) void multiTableInsertNotAvailable(String entityName); @LogMessage(level = WARN) - @Message(value = "Association with `fetch=\"join\"`/`@Fetch(FetchMode.JOIN)` and `lazy=\"true\"`/`FetchType.LAZY` found. This will be interpreted as lazy: %s", id = 510) + @Message(value = "Association with '@Fetch(JOIN)' and 'fetch=FetchType.LAZY' found. This is interpreted as lazy: %s", id = 510) void fetchModeJoinWithLazyWarning(String role); @LogMessage(level = WARN) @@ -1786,11 +1042,6 @@ public interface CoreMessageLogger extends BasicLogger { id = 513) void unableToGenerateReflectionOptimizer(String className, String cause); - @LogMessage(level = WARN) - @Message(value = "PostgreSQL JDBC driver classes are inaccessible and thus, certain DDL types like JSONB, JSON, GEOMETRY can not be used.", - id = 514) - void postgreSQLJdbcDriverNotAccessible(); - @Message(value = "Can't retrieve the generated identity value, because the dialect does not support selecting the last generated identity and 'hibernate.jdbc.use_get_generated_keys' was disabled", id = 515) HibernateException nullIdentitySelectString(); diff --git a/hibernate-core/src/main/java/org/hibernate/internal/EntityManagerMessageLogger.java b/hibernate-core/src/main/java/org/hibernate/internal/EntityManagerMessageLogger.java index adf2ffccd4..65bad39c3b 100644 --- a/hibernate-core/src/main/java/org/hibernate/internal/EntityManagerMessageLogger.java +++ b/hibernate-core/src/main/java/org/hibernate/internal/EntityManagerMessageLogger.java @@ -27,30 +27,6 @@ import static org.jboss.logging.Logger.Level.WARN; @ValidIdRange( min = 15001, max = 20000 ) public interface EntityManagerMessageLogger extends CoreMessageLogger { - @LogMessage(level = INFO) - @Message(value = "Bound Ejb3Configuration to JNDI name: %s", id = 15001) - void boundEjb3ConfigurationToJndiName(String name); - - @LogMessage(level = INFO) - @Message(value = "Ejb3Configuration name: %s", id = 15002) - void ejb3ConfigurationName(String name); - - @LogMessage(level = INFO) - @Message(value = "An Ejb3Configuration was renamed from name: %s", id = 15003) - void ejb3ConfigurationRenamedFromName(String name); - - @LogMessage(level = INFO) - @Message(value = "An Ejb3Configuration was unbound from name: %s", id = 15004) - void ejb3ConfigurationUnboundFromName(String name); - - @LogMessage(level = WARN) - @Message(value = "Exploded jar file does not exist (ignored): %s", id = 15005) - void explodedJarDoesNotExist(URL jarUrl); - - @LogMessage(level = WARN) - @Message(value = "Exploded jar file not a directory (ignored): %s", id = 15006) - void explodedJarNotDirectory(URL jarUrl); - @LogMessage(level = ERROR) @Message(value = "Illegal argument on static metamodel field injection : %s#%s; expected type : %s; encountered type : %s", id = 15007) void illegalArgumentOnStaticMetamodelFieldInjection( @@ -59,51 +35,18 @@ public interface EntityManagerMessageLogger extends CoreMessageLogger { String name3, String name4); - @LogMessage(level = ERROR) - @Message(value = "Malformed URL: %s", id = 15008) - void malformedUrl( - URL jarUrl, - @Cause URISyntaxException e); - - @LogMessage(level = WARN) - @Message(value = "Malformed URL: %s", id = 15009) - void malformedUrlWarning( - URL jarUrl, - @Cause URISyntaxException e); - - @LogMessage(level = WARN) - @Message(value = "Unable to find file (ignored): %s", id = 15010) - void unableToFindFile( - URL jarUrl, - @Cause Exception e); - @LogMessage(level = WARN) @Message(value = "Unable to locate static metamodel field : %s#%s; this may or may not indicate a problem with the static metamodel", id = 15011) void unableToLocateStaticMetamodelField( String name, String name2); - @LogMessage(level = INFO) - @Message(value = "Using provided datasource", id = 15012) - void usingProvidedDataSource(); - - @LogMessage(level = DEBUG) @Message(value = "Returning null (as required by JPA spec) rather than throwing EntityNotFoundException, " + "as the entity (type=%s, id=%s) does not exist", id = 15013) void ignoringEntityNotFound(String entityName, String identifier); - @LogMessage(level = WARN) - @Message( - value = "DEPRECATION - attempt to refer to JPA positional parameter [?%1$s] using String name [\"%1$s\"] " + - "rather than int position [%1$s] (generally in Query#setParameter, Query#getParameter or " + - "Query#getParameterValue calls). Hibernate previously allowed such usage, but it is considered " + - "deprecated.", - id = 15014 - ) - void deprecatedJpaPositionalParameterAccess(Integer jpaPositionalParameter); - - @LogMessage(level = INFO) + @LogMessage(level = DEBUG) @Message( id = 15015, value = "Encountered a MappedSuperclass [%s] not used in any entity hierarchy" diff --git a/hibernate-core/src/main/java/org/hibernate/internal/log/ConnectionPoolingLogger.java b/hibernate-core/src/main/java/org/hibernate/internal/log/ConnectionPoolingLogger.java new file mode 100644 index 0000000000..e69de29bb2 diff --git a/hibernate-core/src/main/java/org/hibernate/query/QueryLogging.java b/hibernate-core/src/main/java/org/hibernate/query/QueryLogging.java index c70d24c267..f4f75440b2 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/QueryLogging.java +++ b/hibernate-core/src/main/java/org/hibernate/query/QueryLogging.java @@ -53,7 +53,7 @@ public interface QueryLogging extends BasicLogger { void namedQueryError(String queryName, @Cause HibernateException e); @LogMessage(level = INFO) - @Message(value = "Unable to determine lock mode value : %s -> %s", id = 90003002) + @Message(value = "Unable to determine lock mode value: %s -> %s", id = 90003002) void unableToDetermineLockModeValue(String hintName, Object value); @LogMessage(level = INFO) diff --git a/hibernate-proxool/src/main/java/org/hibernate/proxool/internal/ProxoolMessageLogger.java b/hibernate-proxool/src/main/java/org/hibernate/proxool/internal/ProxoolMessageLogger.java index f44a836ae4..a8e264f2bc 100644 --- a/hibernate-proxool/src/main/java/org/hibernate/proxool/internal/ProxoolMessageLogger.java +++ b/hibernate-proxool/src/main/java/org/hibernate/proxool/internal/ProxoolMessageLogger.java @@ -39,7 +39,7 @@ public interface ProxoolMessageLogger extends ConnectionInfoLogger { * @param proxoolAlias The name (alias) of the proxool pool */ @LogMessage(level = DEBUG) - @Message(value = "Configuring Proxool Provider to use pool alias: %s", id = 30002) + @Message(value = "Configuring Proxool to use pool alias: %s", id = 30002) void configuringProxoolProviderToUsePoolAlias(String proxoolAlias); /** @@ -48,7 +48,7 @@ public interface ProxoolMessageLogger extends ConnectionInfoLogger { * @param proxoolAlias The name (alias) of the proxool pool */ @LogMessage(level = DEBUG) - @Message(value = "Configuring Proxool Provider using existing pool in memory: %s", id = 30003) + @Message(value = "Configuring Proxool using existing pool in memory: %s", id = 30003) void configuringProxoolProviderUsingExistingPool(String proxoolAlias); /** @@ -57,7 +57,7 @@ public interface ProxoolMessageLogger extends ConnectionInfoLogger { * @param jaxpFile The XML configuration file to use */ @LogMessage(level = DEBUG) - @Message(value = "Configuring Proxool Provider using JAXPConfigurator: %s", id = 30004) + @Message(value = "Configuring Proxool using JAXPConfigurator: %s", id = 30004) void configuringProxoolProviderUsingJaxpConfigurator(String jaxpFile); /** @@ -66,7 +66,7 @@ public interface ProxoolMessageLogger extends ConnectionInfoLogger { * @param propFile The properties file to use */ @LogMessage(level = DEBUG) - @Message(value = "Configuring Proxool Provider using Properties File: %s", id = 30005) + @Message(value = "Configuring Proxool using properties file: %s", id = 30005) void configuringProxoolProviderUsingPropertiesFile(String propFile); } diff --git a/hibernate-spatial/src/main/java/org/hibernate/spatial/HSMessageLogger.java b/hibernate-spatial/src/main/java/org/hibernate/spatial/HSMessageLogger.java index bbb7746581..5710912993 100644 --- a/hibernate-spatial/src/main/java/org/hibernate/spatial/HSMessageLogger.java +++ b/hibernate-spatial/src/main/java/org/hibernate/spatial/HSMessageLogger.java @@ -16,6 +16,7 @@ import org.jboss.logging.annotations.Message; import org.jboss.logging.annotations.MessageLogger; import org.jboss.logging.annotations.ValidIdRange; +import static org.jboss.logging.Logger.Level.DEBUG; import static org.jboss.logging.Logger.Level.INFO; /** @@ -37,18 +38,18 @@ public interface HSMessageLogger extends BasicLogger { HSMessageLogger SPATIAL_MSG_LOGGER = Logger.getMessageLogger( HSMessageLogger.class, LOGGER_NAME ); @LogMessage(level = INFO) - @Message(value = "hibernate-spatial integration enabled : %s", id = 80000001) + @Message(value = "Hibernate Spatial integration enabled: %s", id = 80000001) void spatialEnabled(boolean enabled); - @LogMessage(level = INFO) - @Message(value = "hibernate-spatial using Connection Finder for creating Oracle types : %s", id = 80000002) + @LogMessage(level = DEBUG) + @Message(value = "Hibernate Spatial using Connection Finder for creating Oracle types: %s", id = 80000002) void connectionFinder(String className); - @LogMessage(level = INFO) //maybe should be DEBUG? - @Message(value = "hibernate-spatial adding type contributions from : %s", id = 80000003) + @LogMessage(level = DEBUG) + @Message(value = "hibernate-spatial adding type contributions from: %s", id = 80000003) void typeContributions(String source); - @LogMessage(level = INFO) //maybe should be DEBUG? - @Message(value = "hibernate-spatial adding function contributions from : %s", id = 80000004) + @LogMessage(level = DEBUG) + @Message(value = "hibernate-spatial adding function contributions from: %s", id = 80000004) void functionContributions(String source); } diff --git a/tooling/hibernate-ant/src/main/java/org/hibernate/tool/hbm2ddl/TableMetadata.java b/tooling/hibernate-ant/src/main/java/org/hibernate/tool/hbm2ddl/TableMetadata.java index d920a8081e..f8301ba87b 100644 --- a/tooling/hibernate-ant/src/main/java/org/hibernate/tool/hbm2ddl/TableMetadata.java +++ b/tooling/hibernate-ant/src/main/java/org/hibernate/tool/hbm2ddl/TableMetadata.java @@ -13,11 +13,8 @@ import java.util.HashMap; import java.util.Locale; import java.util.Map; -import org.hibernate.internal.CoreMessageLogger; import org.hibernate.mapping.ForeignKey; -import static org.hibernate.internal.CoreLogging.messageLogger; - /** * JDBC table metadata * @@ -29,7 +26,6 @@ import static org.hibernate.internal.CoreLogging.messageLogger; */ @Deprecated public class TableMetadata { - private static final CoreMessageLogger LOG = messageLogger( TableMetadata.class ); private final String catalog; private final String schema; @@ -47,14 +43,6 @@ public class TableMetadata { initForeignKeys( meta ); initIndexes( meta ); } - String cat = catalog == null ? "" : catalog + '.'; - String schem = schema == null ? "" : schema + '.'; - LOG.tableFound( cat + schem + name ); - LOG.columns( columns.keySet() ); - if ( extras ) { - LOG.foreignKeys( foreignKeys.keySet() ); - LOG.indexes( indexes.keySet() ); - } } public String getName() {