You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "Andrew Zeneski (JIRA)" <ji...@apache.org> on 2009/07/03 19:03:47 UTC

[jira] Commented: (OFBIZ-2697) Method getModelEntity in GenericDelegator 'swallow' exceptions

    [ https://issues.apache.org/jira/browse/OFBIZ-2697?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12727048#action_12727048 ] 

Andrew Zeneski commented on OFBIZ-2697:
---------------------------------------

Can you please add a comment which includes the code you used to cause this error? I would like to see what you are doing in order to determine the proper fix. Thanks!

> 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
>            Assignee: Andrew Zeneski
>
> 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.