Fix some obvious log or exception message issues
This commit is contained in:
parent
09c33446ff
commit
d8d8d6e112
|
@ -20,7 +20,7 @@ public class UnknownProfileException extends HibernateException {
|
|||
* @param name The profile name that was unknown.
|
||||
*/
|
||||
public UnknownProfileException(String name) {
|
||||
super( "Unknow fetch profile [" + name + "]" );
|
||||
super( "Unknown fetch profile [" + name + "]" );
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
|
|
|
@ -128,7 +128,7 @@ public class EntityDeleteAction extends EntityAction {
|
|||
final PersistenceContext persistenceContext = session.getPersistenceContextInternal();
|
||||
final EntityEntry entry = persistenceContext.removeEntry( instance );
|
||||
if ( entry == null ) {
|
||||
throw new AssertionFailure( "possible nonthreadsafe access to session" );
|
||||
throw new AssertionFailure( "possible non-threadsafe access to session" );
|
||||
}
|
||||
entry.postDelete();
|
||||
|
||||
|
|
|
@ -211,7 +211,7 @@ public class EntityUpdateAction extends EntityAction {
|
|||
|
||||
final EntityEntry entry = session.getPersistenceContextInternal().getEntry( instance );
|
||||
if ( entry == null ) {
|
||||
throw new AssertionFailure( "possible nonthreadsafe access to session" );
|
||||
throw new AssertionFailure( "possible non-threadsafe access to session" );
|
||||
}
|
||||
|
||||
if ( entry.getStatus()==Status.MANAGED || persister.isVersionPropertyGenerated() ) {
|
||||
|
|
|
@ -168,7 +168,7 @@ public class ConfigLoader {
|
|||
}
|
||||
catch (FileNotFoundException e) {
|
||||
throw new ConfigurationException(
|
||||
"Unable locate specified properties file [" + file.getAbsolutePath() + "]",
|
||||
"Unable to locate specified properties file [" + file.getAbsolutePath() + "]",
|
||||
e
|
||||
);
|
||||
}
|
||||
|
|
|
@ -73,7 +73,7 @@ public class JaxbCfgProcessor {
|
|||
}
|
||||
}
|
||||
catch ( XMLStreamException e ) {
|
||||
throw new HibernateException( "Unable to create stax reader", e );
|
||||
throw new HibernateException( "Unable to create StAX reader", e );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -104,7 +104,7 @@ public class JaxbCfgProcessor {
|
|||
}
|
||||
}
|
||||
catch ( Exception e ) {
|
||||
throw new HibernateException( "Error accessing stax stream", e );
|
||||
throw new HibernateException( "Error accessing StAX stream", e );
|
||||
}
|
||||
|
||||
if ( event == null ) {
|
||||
|
|
|
@ -298,7 +298,7 @@ public class InFlightMetadataCollectorImpl implements InFlightMetadataCollector
|
|||
if ( matchingPersistentClass != null ) {
|
||||
throw new DuplicateMappingException(
|
||||
String.format(
|
||||
"The [%s] and [%s] entities share the same JPA entity name: [%s] which is not allowed!",
|
||||
"The [%s] and [%s] entities share the same JPA entity name: [%s], which is not allowed!",
|
||||
matchingPersistentClass.getClassName(),
|
||||
persistentClass.getClassName(),
|
||||
jpaEntityName
|
||||
|
@ -478,7 +478,7 @@ public class InFlightMetadataCollectorImpl implements InFlightMetadataCollector
|
|||
final IdentifierGeneratorDefinition old = idGeneratorDefinitionMap.put( generator.getName(), generator );
|
||||
if ( old != null && !old.equals( generator ) ) {
|
||||
if ( bootstrapContext.getJpaCompliance().isGlobalGeneratorScopeEnabled() ) {
|
||||
throw new IllegalArgumentException( "Duplicate generator name " + old.getName() + " you will likely want to set the property " + AvailableSettings.JPA_ID_GENERATOR_GLOBAL_SCOPE_COMPLIANCE + " to false " );
|
||||
throw new IllegalArgumentException( "Duplicate generator name " + old.getName() + "; you will likely want to set the property " + AvailableSettings.JPA_ID_GENERATOR_GLOBAL_SCOPE_COMPLIANCE + " to false " );
|
||||
}
|
||||
else {
|
||||
log.duplicateGeneratorName( old.getName() );
|
||||
|
|
|
@ -97,7 +97,7 @@ public class MetadataBuilderImpl implements MetadataBuilderImplementor, TypeCont
|
|||
}
|
||||
else if ( BootstrapServiceRegistry.class.isInstance( serviceRegistry ) ) {
|
||||
log.debugf(
|
||||
"ServiceRegistry passed to MetadataBuilder was a BootstrapServiceRegistry; this likely wont end well" +
|
||||
"ServiceRegistry passed to MetadataBuilder was a BootstrapServiceRegistry; this likely won't end well " +
|
||||
"if attempt is made to build SessionFactory"
|
||||
);
|
||||
return new StandardServiceRegistryBuilder( (BootstrapServiceRegistry) serviceRegistry ).build();
|
||||
|
|
|
@ -74,7 +74,7 @@ public abstract class AbstractBinder implements Binder {
|
|||
return new BufferedXMLEventReader( staxReader, 100 );
|
||||
}
|
||||
catch ( XMLStreamException e ) {
|
||||
throw new MappingException( "Unable to create stax reader", e, origin );
|
||||
throw new MappingException( "Unable to create StAX reader", e, origin );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -92,7 +92,7 @@ public abstract class AbstractBinder implements Binder {
|
|||
return new BufferedXMLEventReader( staxReader, 100 );
|
||||
}
|
||||
catch ( XMLStreamException e ) {
|
||||
throw new MappingException( "Unable to create stax reader", e, origin );
|
||||
throw new MappingException( "Unable to create StAX reader", e, origin );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -138,7 +138,7 @@ public abstract class AbstractBinder implements Binder {
|
|||
}
|
||||
}
|
||||
catch ( Exception e ) {
|
||||
throw new MappingException( "Error accessing stax stream", e, origin );
|
||||
throw new MappingException( "Error accessing StAX stream", e, origin );
|
||||
}
|
||||
|
||||
if ( rootElementStartEvent == null ) {
|
||||
|
|
|
@ -92,7 +92,7 @@ public class TypeDefinitionRegistry {
|
|||
throw new IllegalArgumentException(
|
||||
String.format(
|
||||
Locale.ROOT,
|
||||
"Attempted to ovewrite registration [%s] for type definition.",
|
||||
"Attempted to overwrite registration [%s] for type definition.",
|
||||
name
|
||||
)
|
||||
);
|
||||
|
|
|
@ -17,8 +17,8 @@ import org.hibernate.cfg.Environment;
|
|||
public class NoCacheRegionFactoryAvailableException extends CacheException {
|
||||
private static final String MSG = String.format(
|
||||
"Second-level cache is used in the application, but property %s is not given; " +
|
||||
"please either disable second level cache or set correct region factory using the %s setting " +
|
||||
"and make sure the second level cache provider (hibernate-infinispan, e.g.) is available on the " +
|
||||
"please either disable second-level cache or set correct region factory using the %s setting " +
|
||||
"and make sure the second-level cache provider (hibernate-infinispan, e.g.) is available on the " +
|
||||
"classpath.",
|
||||
Environment.CACHE_REGION_FACTORY,
|
||||
Environment.CACHE_REGION_FACTORY
|
||||
|
|
|
@ -317,7 +317,7 @@ public abstract class CollectionBinder {
|
|||
}
|
||||
else {
|
||||
throw new AnnotationException(
|
||||
"Illegal attempt to map a non collection as a @OneToMany, @ManyToMany or @CollectionOfElements: "
|
||||
"Illegal attempt to map a non collection as a @OneToMany, @ManyToMany or @ElementCollection: "
|
||||
+ StringHelper.qualify( entityName, property.getName() )
|
||||
);
|
||||
}
|
||||
|
@ -347,28 +347,28 @@ public abstract class CollectionBinder {
|
|||
String entityName, boolean isIndexed) {
|
||||
if ( java.util.Set.class.equals( clazz) ) {
|
||||
if ( property.isAnnotationPresent( CollectionId.class) ) {
|
||||
throw new AnnotationException("Set do not support @CollectionId: "
|
||||
throw new AnnotationException("Set does not support @CollectionId: "
|
||||
+ StringHelper.qualify( entityName, property.getName() ) );
|
||||
}
|
||||
return new SetBinder( false );
|
||||
}
|
||||
else if ( java.util.SortedSet.class.equals( clazz ) ) {
|
||||
if ( property.isAnnotationPresent( CollectionId.class ) ) {
|
||||
throw new AnnotationException( "Set do not support @CollectionId: "
|
||||
throw new AnnotationException( "SortedSet does not support @CollectionId: "
|
||||
+ StringHelper.qualify( entityName, property.getName() ) );
|
||||
}
|
||||
return new SetBinder( true );
|
||||
}
|
||||
else if ( java.util.Map.class.equals( clazz ) ) {
|
||||
if ( property.isAnnotationPresent( CollectionId.class ) ) {
|
||||
throw new AnnotationException( "Map do not support @CollectionId: "
|
||||
throw new AnnotationException( "Map does not support @CollectionId: "
|
||||
+ StringHelper.qualify( entityName, property.getName() ) );
|
||||
}
|
||||
return new MapBinder( false );
|
||||
}
|
||||
else if ( java.util.SortedMap.class.equals( clazz ) ) {
|
||||
if ( property.isAnnotationPresent( CollectionId.class ) ) {
|
||||
throw new AnnotationException( "Map do not support @CollectionId: "
|
||||
throw new AnnotationException( "SortedMap does not support @CollectionId: "
|
||||
+ StringHelper.qualify( entityName, property.getName() ) );
|
||||
}
|
||||
return new MapBinder( true );
|
||||
|
@ -385,7 +385,7 @@ public abstract class CollectionBinder {
|
|||
if ( isIndexed ) {
|
||||
if ( property.isAnnotationPresent( CollectionId.class ) ) {
|
||||
throw new AnnotationException(
|
||||
"List do not support @CollectionId and @OrderColumn (or @IndexColumn) at the same time: "
|
||||
"List does not support @CollectionId and @OrderColumn (or @IndexColumn) at the same time: "
|
||||
+ StringHelper.qualify( entityName, property.getName() ) );
|
||||
}
|
||||
return new ListBinder();
|
||||
|
@ -666,7 +666,7 @@ public abstract class CollectionBinder {
|
|||
if ( isSortedCollection ) {
|
||||
if ( ! hadExplicitSort && !hadOrderBy ) {
|
||||
throw new AnnotationException(
|
||||
"A sorted collection must define and ordering or sorting : " + safeCollectionRole()
|
||||
"A sorted collection must define an ordering or sorting : " + safeCollectionRole()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -723,7 +723,7 @@ public abstract class CollectionBinder {
|
|||
}
|
||||
else {
|
||||
throw new AssertionFailure(
|
||||
"Define fetch strategy on a property not annotated with @ManyToOne nor @OneToMany nor @CollectionOfElements"
|
||||
"Define fetch strategy on a property not annotated with @ManyToOne nor @OneToMany nor @ElementCollection"
|
||||
);
|
||||
}
|
||||
if ( lazy != null ) {
|
||||
|
@ -1313,7 +1313,7 @@ public abstract class CollectionBinder {
|
|||
LOG.debugf("Binding a OneToMany: %s through an association table", path);
|
||||
}
|
||||
else if (isCollectionOfEntities) {
|
||||
LOG.debugf("Binding as ManyToMany: %s", path);
|
||||
LOG.debugf("Binding a ManyToMany: %s", path);
|
||||
}
|
||||
else if (anyAnn != null) {
|
||||
LOG.debugf("Binding a ManyToAny: %s", path);
|
||||
|
@ -1365,7 +1365,7 @@ public abstract class CollectionBinder {
|
|||
}
|
||||
catch (MappingException e) {
|
||||
throw new AnnotationException(
|
||||
"mappedBy reference an unknown target entity property: "
|
||||
"mappedBy references an unknown target entity property: "
|
||||
+ collType + "." + joinColumns[0].getMappedBy() + " in "
|
||||
+ collValue.getOwnerEntityName() + "." + joinColumns[0].getPropertyName()
|
||||
);
|
||||
|
@ -1671,7 +1671,7 @@ public abstract class CollectionBinder {
|
|||
!( collValue.getElement() instanceof SimpleValue ) && //SimpleValue (CollectionOfElements) are always SELECT but it does not matter
|
||||
collValue.getElement().getFetchMode() != FetchMode.JOIN ) {
|
||||
throw new MappingException(
|
||||
"@ManyToMany or @CollectionOfElements defining filter or where without join fetching "
|
||||
"@ManyToMany or @ElementCollection defining filter or where without join fetching "
|
||||
+ "not valid within collection using join fetching[" + collValue.getRole() + "]"
|
||||
);
|
||||
}
|
||||
|
|
|
@ -532,7 +532,7 @@ public class MapBinder extends CollectionBinder {
|
|||
return targetValue;
|
||||
}
|
||||
else {
|
||||
throw new AssertionFailure( "Unknown type encounters for map key: " + value.getClass() );
|
||||
throw new AssertionFailure( "Unknown type encountered for map key: " + value.getClass() );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -234,7 +234,7 @@ public class ResultsetMappingSecondPass implements QuerySecondPass {
|
|||
}
|
||||
catch (ClassCastException e) {
|
||||
throw new MappingException(
|
||||
"dotted notation reference neither a component nor a many/one to one", e
|
||||
"dotted notation references neither a component nor a many/one to one", e
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -250,13 +250,13 @@ public class ResultsetMappingSecondPass implements QuerySecondPass {
|
|||
}
|
||||
catch (ClassCastException e) {
|
||||
throw new MappingException(
|
||||
"dotted notation reference neither a component nor a many/one to one", e
|
||||
"dotted notation references neither a component nor a many/one to one", e
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
throw new MappingException( "dotted notation reference neither a component nor a many/one to one" );
|
||||
throw new MappingException( "dotted notation references neither a component nor a many/one to one" );
|
||||
}
|
||||
return parentPropIter;
|
||||
}
|
||||
|
|
|
@ -210,7 +210,7 @@ public class SimpleValueBinder {
|
|||
}
|
||||
case TIME: {
|
||||
throw new NotYetImplementedException(
|
||||
"Calendar cannot persist TIME only" + StringHelper.qualify( persistentClassName, propertyName )
|
||||
"Calendar cannot persist TIME only: " + StringHelper.qualify( persistentClassName, propertyName )
|
||||
);
|
||||
}
|
||||
default: {
|
||||
|
|
|
@ -640,7 +640,7 @@ public class TableBinder {
|
|||
//implicit case, we hope PK and FK columns are in the same order
|
||||
if ( columns.length != referencedEntity.getIdentifier().getColumnSpan() ) {
|
||||
throw new AnnotationException(
|
||||
"A Foreign key refering " + referencedEntity.getEntityName()
|
||||
"A Foreign key referring " + referencedEntity.getEntityName()
|
||||
+ " from " + associatedClass.getEntityName()
|
||||
+ " has the wrong number of column. should be " + referencedEntity.getIdentifier()
|
||||
.getColumnSpan()
|
||||
|
|
|
@ -1675,7 +1675,7 @@ public class JPAOverriddenAnnotationReader implements AnnotationReader {
|
|||
type = AccessType.valueOf( access );
|
||||
}
|
||||
catch ( IllegalArgumentException e ) {
|
||||
throw new AnnotationException( access + " is not a valid access type. Check you xml confguration." );
|
||||
throw new AnnotationException( access + " is not a valid access type. Check you xml configuration." );
|
||||
}
|
||||
|
||||
if ( ( AccessType.PROPERTY.equals( type ) && this.element instanceof Method ) ||
|
||||
|
@ -1881,7 +1881,7 @@ public class JPAOverriddenAnnotationReader implements AnnotationReader {
|
|||
type = AccessType.valueOf( access );
|
||||
}
|
||||
catch ( IllegalArgumentException e ) {
|
||||
throw new AnnotationException( access + " is not a valid access type. Check you xml confguration." );
|
||||
throw new AnnotationException( access + " is not a valid access type. Check you xml configuration." );
|
||||
}
|
||||
ad.setValue( "value", type );
|
||||
return AnnotationFactory.create( ad );
|
||||
|
@ -2614,7 +2614,7 @@ public class JPAOverriddenAnnotationReader implements AnnotationReader {
|
|||
}
|
||||
else {
|
||||
throw new AnnotationException(
|
||||
"Unknown DiscrimiatorType in XML: " + value + " (" + SCHEMA_VALIDATION + ")"
|
||||
"Unknown DiscriminatorType in XML: " + value + " (" + SCHEMA_VALIDATION + ")"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -136,7 +136,7 @@ public class XMLContext implements Serializable {
|
|||
type = AccessType.valueOf( access );
|
||||
}
|
||||
catch ( IllegalArgumentException e ) {
|
||||
throw new AnnotationException( "Invalid access type " + access + " (check your xml configuration)" );
|
||||
throw new AnnotationException( "Invalid access type: " + access + " (check your xml configuration)" );
|
||||
}
|
||||
defaultType.setAccess( type );
|
||||
}
|
||||
|
|
|
@ -612,7 +612,7 @@ public abstract class AbstractPersistentCollection implements Serializable, Pers
|
|||
throw new LazyInitializationException(
|
||||
"failed to lazily initialize a collection" +
|
||||
(role == null ? "" : " of role: " + role) +
|
||||
", " + message
|
||||
": " + message
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -698,7 +698,7 @@ public abstract class AbstractPersistentCollection implements Serializable, Pers
|
|||
final String msg = generateUnexpectedSessionStateMessage( session );
|
||||
if ( isConnectedToSession() ) {
|
||||
throw new HibernateException(
|
||||
"Illegal attempt to associate a collection with two open sessions. " + msg
|
||||
"Illegal attempt to associate a collection with two open sessions: " + msg
|
||||
);
|
||||
}
|
||||
else {
|
||||
|
@ -783,7 +783,7 @@ public abstract class AbstractPersistentCollection implements Serializable, Pers
|
|||
public final void forceInitialization() throws HibernateException {
|
||||
if ( !initialized ) {
|
||||
if ( initializing ) {
|
||||
throw new AssertionFailure( "force initialize loading collection" );
|
||||
throw new AssertionFailure( "force initializing collection loading" );
|
||||
}
|
||||
initialize( false );
|
||||
}
|
||||
|
|
|
@ -103,7 +103,7 @@ public class JTASessionContext extends AbstractCurrentSessionContext {
|
|||
currentSession.close();
|
||||
}
|
||||
catch ( Throwable ignore ) {
|
||||
LOG.debug( "Unable to release generated current-session on failed synch registration", ignore );
|
||||
LOG.debug( "Unable to release generated current-session on failed synchronization registration", ignore );
|
||||
}
|
||||
throw new HibernateException( "Unable to register cleanup Synchronization with TransactionManager" );
|
||||
}
|
||||
|
|
|
@ -192,7 +192,7 @@ public class EntityEntryContext {
|
|||
// NOTE: otherPersistenceContext may be operating on the entityEntry in a different thread.
|
||||
// it is not safe to associate entityEntry with this EntityEntryContext.
|
||||
throw new HibernateException(
|
||||
"Illegal attempt to associate a ManagedEntity with two open persistence contexts. " + entityEntry
|
||||
"Illegal attempt to associate a ManagedEntity with two open persistence contexts: " + entityEntry
|
||||
);
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -162,7 +162,7 @@ public class NaturalIdXrefDelegate {
|
|||
*/
|
||||
protected void validateNaturalId(EntityPersister persister, Object[] naturalIdValues) {
|
||||
if ( !persister.hasNaturalIdentifier() ) {
|
||||
throw new IllegalArgumentException( "Entity did not define a natrual-id" );
|
||||
throw new IllegalArgumentException( "Entity did not define a natural-id" );
|
||||
}
|
||||
if ( persister.getNaturalIdentifierProperties().length != naturalIdValues.length ) {
|
||||
throw new IllegalArgumentException( "Mismatch between expected number of natural-id values and found." );
|
||||
|
|
|
@ -50,7 +50,7 @@ public enum TypeNullability {
|
|||
return UNKNOWN;
|
||||
}
|
||||
default: {
|
||||
throw new IllegalArgumentException( "Unknown type nullability code [" + code + "] enountered" );
|
||||
throw new IllegalArgumentException( "Unknown type nullability code [" + code + "] encountered" );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -58,7 +58,7 @@ public enum TypeSearchability {
|
|||
return CHAR;
|
||||
}
|
||||
default: {
|
||||
throw new IllegalArgumentException( "Unknown type searchability code [" + code + "] enountered" );
|
||||
throw new IllegalArgumentException( "Unknown type searchability code [" + code + "] encountered" );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -342,8 +342,8 @@ public final class QueryParameters {
|
|||
final int values = positionalParameterValues == null ? 0 : positionalParameterValues.length;
|
||||
if ( types != values ) {
|
||||
throw new QueryException(
|
||||
"Number of positional parameter types:" + types +
|
||||
" does not match number of positional parameters: " + values
|
||||
"Number of positional parameter types [" + types +
|
||||
"] does not match number of positional parameters [" + values + "]"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -65,7 +65,7 @@ public class DefaultAutoFlushEventListener extends AbstractFlushingEventListener
|
|||
}
|
||||
}
|
||||
else {
|
||||
LOG.trace( "Don't need to execute flush" );
|
||||
LOG.trace( "No need to execute flush" );
|
||||
event.setFlushRequired( false );
|
||||
actionQueue.clearFromFlushNeededCheck( oldSize );
|
||||
}
|
||||
|
|
|
@ -79,7 +79,7 @@ public class DefaultFlushEntityEventListener implements FlushEntityEventListener
|
|||
if ( !persister.getIdentifierType().isEqual( id, oid, session.getFactory() ) ) {
|
||||
throw new HibernateException(
|
||||
"identifier of an instance of " + persister.getEntityName() + " was altered from "
|
||||
+ id + " to " + oid
|
||||
+ oid + " to " + id
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -283,7 +283,7 @@ public class DefaultFlushEntityEventListener implements FlushEntityEventListener
|
|||
}
|
||||
else {
|
||||
LOG.tracev(
|
||||
"Updating deleted entity: ",
|
||||
"Updating deleted entity: {0}",
|
||||
MessageHelper.infoString( persister, entry.getId(), session.getFactory() )
|
||||
);
|
||||
}
|
||||
|
|
|
@ -240,7 +240,7 @@ class EventListenerGroupImpl<T> implements EventListenerGroup<T> {
|
|||
}
|
||||
case REPLACE_ORIGINAL: {
|
||||
if ( debugEnabled ) {
|
||||
log.debugf( "Replacing listener registration (%s) : `%s` -> %s", strategy.getAction(), existingListener, listener );
|
||||
log.debugf( "Replacing listener registration (%s) : `%s` -> `%s`", strategy.getAction(), existingListener, listener );
|
||||
}
|
||||
prepareListener( listener );
|
||||
|
||||
|
|
|
@ -74,7 +74,7 @@ public class SequenceIdentityGenerator
|
|||
this.sequenceNextValFragment = dialect.getSelectSequenceNextValString( sequenceName );
|
||||
this.keyColumns = getPersister().getRootTableKeyColumnNames();
|
||||
if ( keyColumns.length > 1 ) {
|
||||
throw new HibernateException( "sequence-identity generator cannot be used with with multi-column keys" );
|
||||
throw new HibernateException( "sequence-identity generator cannot be used with multi-column keys" );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -195,7 +195,7 @@ public abstract class AbstractSharedSessionContract implements SharedSessionCont
|
|||
}
|
||||
if ( sharedOptions.getPhysicalConnectionHandlingMode() != this.jdbcCoordinator.getLogicalConnection().getConnectionHandlingMode() ) {
|
||||
log.debug(
|
||||
"Session creation specified 'PhysicalConnectionHandlingMode which is invalid in conjunction " +
|
||||
"Session creation specified 'PhysicalConnectionHandlingMode' which is invalid in conjunction " +
|
||||
"with sharing JDBC connection between sessions; ignoring"
|
||||
);
|
||||
}
|
||||
|
|
|
@ -665,7 +665,7 @@ public class SessionFactoryImpl implements SessionFactoryImplementor {
|
|||
// 2) an explicit SynchronizationType is specified
|
||||
if ( !getServiceRegistry().getService( TransactionCoordinatorBuilder.class ).isJta() ) {
|
||||
throw new IllegalStateException(
|
||||
"Illegal attempt to specify a SynchronizationType when building an EntityManager from a " +
|
||||
"Illegal attempt to specify a SynchronizationType when building an EntityManager from an " +
|
||||
"EntityManagerFactory defined as RESOURCE_LOCAL (as opposed to JTA)"
|
||||
);
|
||||
}
|
||||
|
@ -879,7 +879,7 @@ public class SessionFactoryImpl implements SessionFactoryImplementor {
|
|||
// if we get here, we are unsure how to properly unwrap the incoming query to extract the needed information
|
||||
throw new PersistenceException(
|
||||
String.format(
|
||||
"Unsure how to how to properly unwrap given Query [%s] as basis for named query",
|
||||
"Unsure how to properly unwrap given Query [%s] as basis for named query",
|
||||
query
|
||||
)
|
||||
);
|
||||
|
|
|
@ -78,7 +78,7 @@ public class Cloneable {
|
|||
);
|
||||
}
|
||||
catch (Throwable t) {
|
||||
throw new HibernateException( "Unable copy copy listener [" + pd.getName() + "]" );
|
||||
throw new HibernateException( "Unable to copy listener [" + pd.getName() + "]" );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -71,7 +71,7 @@ public class DTDEntityResolver implements EntityResolver, Serializable {
|
|||
LOG.debugf( "Unable to locate [%s] on classpath", systemId );
|
||||
}
|
||||
else {
|
||||
LOG.debugf( "Located [%s] in classpath", systemId );
|
||||
LOG.debugf( "Located [%s] on classpath", systemId );
|
||||
source = new InputSource( stream );
|
||||
source.setPublicId( publicId );
|
||||
source.setSystemId( systemId );
|
||||
|
@ -92,7 +92,7 @@ public class DTDEntityResolver implements EntityResolver, Serializable {
|
|||
}
|
||||
}
|
||||
else {
|
||||
LOG.debugf( "Located [%s] in classpath", systemId );
|
||||
LOG.debugf( "Located [%s] on classpath", systemId );
|
||||
source = new InputSource( dtdStream );
|
||||
source.setPublicId( publicId );
|
||||
source.setSystemId( systemId );
|
||||
|
|
|
@ -145,7 +145,7 @@ public class JmxServiceImpl implements JmxService, Stoppable {
|
|||
registerMBean( objectName, service.getManagementBean() );
|
||||
}
|
||||
catch ( MalformedObjectNameException e ) {
|
||||
throw new HibernateException( "Unable to generate service IbjectName", e );
|
||||
throw new HibernateException( "Unable to generate service ObjectName", e );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -160,7 +160,7 @@ public class CacheEntityLoaderHelper extends AbstractLockUpgradeEventListener {
|
|||
if ( entry.isReferenceEntry() ) {
|
||||
if ( event.getInstanceToLoad() != null ) {
|
||||
throw new HibernateException(
|
||||
"Attempt to load entity [%s] from cache using provided object instance, but cache " +
|
||||
"Attempt to load entity from cache using provided object instance, but cache " +
|
||||
"is storing references: " + event.getEntityId() );
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -185,7 +185,7 @@ public class AttributeFactory {
|
|||
public <X, Y> SingularAttributeImpl<X, Y> buildVersionAttribute(
|
||||
IdentifiableDomainType<X> ownerType,
|
||||
Property property) {
|
||||
LOG.trace( "Building version attribute [ownerType.getTypeName()" + "." + "property.getName()]" );
|
||||
LOG.trace( "Building version attribute [" + ownerType.getTypeName() + "." + property.getName() + "]" );
|
||||
|
||||
final SingularAttributeMetadata<X, Y> attributeMetadata = (SingularAttributeMetadata<X, Y>) determineAttributeMetadata(
|
||||
wrap( ownerType, property ),
|
||||
|
|
|
@ -309,7 +309,7 @@ public class JpaMetamodelImpl implements JpaMetamodel {
|
|||
private void applyNamedEntityGraphs(java.util.Collection<NamedEntityGraphDefinition> namedEntityGraphs) {
|
||||
for ( NamedEntityGraphDefinition definition : namedEntityGraphs ) {
|
||||
log.debugf(
|
||||
"Applying named entity graph [name=%s, entity-name=%s, jpa-entity-name=%s",
|
||||
"Applying named entity graph [name=%s, entity-name=%s, jpa-entity-name=%s]",
|
||||
definition.getRegisteredName(),
|
||||
definition.getEntityName(),
|
||||
definition.getJpaEntityName()
|
||||
|
|
|
@ -47,7 +47,7 @@ public class ElementPropertyMapping implements PropertyMapping {
|
|||
* Given a property path, return the corresponding column name(s).
|
||||
*/
|
||||
public String[] toColumns(String propertyName) throws QueryException, UnsupportedOperationException {
|
||||
throw new UnsupportedOperationException( "References to collections must be define a SQL alias" );
|
||||
throw new UnsupportedOperationException( "References to collections must define an SQL alias" );
|
||||
}
|
||||
|
||||
public Type getType() {
|
||||
|
|
|
@ -236,7 +236,7 @@ public abstract class AbstractLazyInitializer implements LazyInitializer {
|
|||
checkTargetState(session);
|
||||
}
|
||||
else {
|
||||
throw new LazyInitializationException( "could not initialize proxy [" + entityName + "#" + id + "] - Session was closed or disced" );
|
||||
throw new LazyInitializationException( "could not initialize proxy [" + entityName + "#" + id + "] - Session was closed or disconnected" );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -51,7 +51,7 @@ public enum ImmutableEntityUpdateQueryHandlingMode {
|
|||
}
|
||||
throw new HibernateException(
|
||||
"Unrecognized immutable_entity_update_query_handling_mode value : " + mode
|
||||
+ ". Supported values include 'warning' and 'exception''."
|
||||
+ ". Supported values include 'warning' and 'exception'."
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -96,7 +96,7 @@ public class ContainerManagedLifecycleStrategy implements BeanLifecycleStrategy
|
|||
throw e;
|
||||
}
|
||||
catch (Exception e) {
|
||||
log.debugf( "Error resolving CDI bean [%s] - using fallback" );
|
||||
log.debugf( "Error resolving CDI bean - using fallback" );
|
||||
this.beanInstance = produceFallbackInstance();
|
||||
this.instance = null;
|
||||
}
|
||||
|
|
|
@ -167,7 +167,7 @@ public class OutputsImpl implements Outputs {
|
|||
protected Output buildOutput() {
|
||||
if ( log.isDebugEnabled() ) {
|
||||
log.debugf(
|
||||
"Building Return [isResultSet=%s, updateCount=%s, extendedReturn=%s",
|
||||
"Building Return [isResultSet=%s, updateCount=%s, extendedReturn=%s]",
|
||||
isResultSet(),
|
||||
getUpdateCount(),
|
||||
hasExtendedReturns()
|
||||
|
|
|
@ -24,7 +24,7 @@ public abstract class AliasedTupleSubsetResultTransformer
|
|||
if ( aliases.length != tupleLength ) {
|
||||
throw new IllegalArgumentException(
|
||||
"aliases and tupleLength must have the same length; " +
|
||||
"aliases.length=" + aliases.length + "tupleLength=" + tupleLength
|
||||
"aliases.length=" + aliases.length + "; tupleLength=" + tupleLength
|
||||
);
|
||||
}
|
||||
boolean[] includeInTransform = new boolean[tupleLength];
|
||||
|
|
|
@ -97,8 +97,8 @@ public class CacheableResultTransformer implements ResultTransformer {
|
|||
int tupleLength = ArrayHelper.countTrue( includeInTuple );
|
||||
if ( aliases != null && aliases.length != tupleLength ) {
|
||||
throw new IllegalArgumentException(
|
||||
"if aliases is not null, then the length of aliases[] must equal the number of true elements in includeInTuple; " +
|
||||
"aliases.length=" + aliases.length + "tupleLength=" + tupleLength
|
||||
"if aliases are not null, then the length of aliases must equal the number of true elements in includeInTuple; " +
|
||||
"aliases.length=" + aliases.length + "; tupleLength=" + tupleLength
|
||||
);
|
||||
}
|
||||
return new CacheableResultTransformer(
|
||||
|
|
|
@ -61,7 +61,7 @@ public class MergeMultipleEntityCopiesDisallowedByDefaultTest extends BaseEntity
|
|||
em.getTransaction().begin();
|
||||
try {
|
||||
em.merge( hoarder );
|
||||
fail( "should have failed due IllegalStateException");
|
||||
fail( "should have failed due to IllegalStateException");
|
||||
}
|
||||
catch (IllegalStateException ex) {
|
||||
//expected
|
||||
|
@ -106,7 +106,7 @@ public class MergeMultipleEntityCopiesDisallowedByDefaultTest extends BaseEntity
|
|||
// now item1Merged is managed and it has a nested detached item
|
||||
try {
|
||||
em.merge( item1Merged );
|
||||
fail( "should have failed due IllegalStateException");
|
||||
fail( "should have failed due to IllegalStateException");
|
||||
}
|
||||
catch (IllegalStateException ex) {
|
||||
//expected
|
||||
|
|
|
@ -77,7 +77,7 @@ public final class ClassWriter {
|
|||
catch ( IOException ioEx ) {
|
||||
context.logMessage(
|
||||
Diagnostic.Kind.ERROR,
|
||||
"Problem opening file to write MetaModel for " + entity.getSimpleName() + ioEx.getMessage()
|
||||
"Problem opening file to write MetaModel for " + entity.getSimpleName() + ": " + ioEx.getMessage()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue