Browse Source

Improve exception message for JPA entity scanning

pull/36110/head
Sam Brannen 4 weeks ago
parent
commit
e94aaab288
  1. 2
      spring-orm/src/main/java/org/springframework/orm/jpa/hibernate/LocalSessionFactoryBuilder.java
  2. 2
      spring-orm/src/main/java/org/springframework/orm/jpa/persistenceunit/PersistenceManagedTypesScanner.java

2
spring-orm/src/main/java/org/springframework/orm/jpa/hibernate/LocalSessionFactoryBuilder.java

@ -332,7 +332,7 @@ public class LocalSessionFactoryBuilder extends Configuration {
} }
} }
catch (Throwable ex) { catch (Throwable ex) {
throw new MappingException("Failed to read candidate component class: " + resource, ex); throw new MappingException("Failed to read candidate entity class: " + resource, ex);
} }
} }
} }

2
spring-orm/src/main/java/org/springframework/orm/jpa/persistenceunit/PersistenceManagedTypesScanner.java

@ -161,7 +161,7 @@ public final class PersistenceManagedTypesScanner {
} }
} }
catch (Throwable ex) { catch (Throwable ex) {
throw new PersistenceException("Failed to read candidate component class: " + resource, ex); throw new PersistenceException("Failed to read candidate entity class: " + resource, ex);
} }
} }
} }

Loading…
Cancel
Save