]
Diego Plentz resolved HHH-3170.
-------------------------------
Assignee: Diego Plentz
Resolution: Duplicate
PersistentClass classname is not revealed in MappingException
-------------------------------------------------------------
Key: HHH-3170
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-3170
Project: Hibernate3
Issue Type: Improvement
Affects Versions: 3.2.x, 3.3.0.CR1
Reporter: Paul Benedict
Assignee: Diego Plentz
Attachments: SimpleValue.java
A typical exception from bad configuration is:
Caused by: org.hibernate.MappingException: Could not determine type for: java.util.Map,
for columns: [org.hibernate.mapping.Column(name)]
Recommendation:
The "org.hibernate.cfg.Configuration" class should catch the exception and add
the name of the offending PersistentClass. The class is held by the iterator.
Line 1100 improvement:
private void validate() throws MappingException {
Iterator iter = classes.values().iterator();
while ( iter.hasNext() ) {
PersistentClass pc = (PersistentClass) iter.next();
try {
pc.validate( mapping );
} catch(MappingException e) {
throw new MappingException(pc.getClassName(), e);
}
....
}
Otherwise, I find it incredibly difficult to find the offending class without a step
debugger.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: