Method getModelEntity in GenericDelegator 'swallow' exceptions
--------------------------------------------------------------
Key: OFBIZ-2697
URL: https://issues.apache.org/jira/browse/OFBIZ-2697
Project: OFBiz
Issue Type: Bug
Components: framework
Environment: Tested with version "ofbiz-rel9.04-2009-05-28-v779496"
Reporter: Cimballi
The method getModelEntity in GenericDelegator 'swallow' exceptions :
public ModelEntity getModelEntity(String entityName) {
try {
return getModelReader().getModelEntity(entityName);
} catch (GenericEntityException e) {
Debug.logError(e, "Error getting entity definition from
model", module);
return null;
}
}
So if you make a typo error on the name of an entity, an error while be logged
but the code will continue to execute.
Stack trace of the logged error when I typed "ShipGroup" for an entity name :
2009-07-03 08:23:39,836 (RMI TCP Connection(5)-192.168.1.33) [
GenericDelegator.java:398:ERROR]
---- exception report ----------------------------------------------------------
Error getting entity definition from model
Exception: org.ofbiz.entity.GenericModelException
Message: Could not find definition for entity name ShipGroup
---- stack trace ---------------------------------------------------------------
org.ofbiz.entity.GenericModelException: Could not find definition for
entity name ShipGroup
org.ofbiz.entity.model.ModelReader.getModelEntity(ModelReader.java:451)
org.ofbiz.entity.GenericDelegator.getModelEntity(GenericDelegator.java:396)
org.ofbiz.entity.GenericDelegator.getNextSeqIdLong(GenericDelegator.java:3166)
org.ofbiz.entity.GenericDelegator.getNextSeqId(GenericDelegator.java:3119)
org.ofbiz.entity.GenericDelegator.getNextSeqId(GenericDelegator.java:3109)
...
More precisely, this error happened when I try to get the next id of a sequence
and I enter the wrong name for the entity.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.