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

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

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.


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

Posted by "Cimballi (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OFBIZ-2697?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Cimballi resolved OFBIZ-2697.
-----------------------------

    Resolution: Invalid

Hey Andrew, you're right, I reproduce the error again but in fact the entry following the "getNextSeqId" call is well created. Maybe in my first test I had another problem.

Sorry for the trouble, I set the issue as invalid.


> 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.


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

Posted by "Andrew Zeneski (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-2697?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12727068#action_12727068 ] 

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

After looking at this in more detail, the sequence generator does not require the entity to exist to generate a sequence value. You should have received a valid value for this method call, with just an error message printed in the logs. Nothing should have been rolled back in this case. However, if you tried to create an entity which did not exist, an error should have been thrown at that time and rolled back the transaction. 

You mentioned in your email that your transaction did not rollback, was this the only operation you attempted on the invalid entity? If so, nothing should have rolled back. If you did attempt a create or update and still there was no roll back then there may be an issue related to that.

> 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.


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

Posted by "Cimballi (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-2697?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12727051#action_12727051 ] 

Cimballi commented on OFBIZ-2697:
---------------------------------

The exception is thrown on this statement :

{{final String shipGroupSeqId = delegator.getNextSeqId("ShipGroup");}}


> 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.


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

Posted by "Andrew Zeneski (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OFBIZ-2697?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrew Zeneski reassigned OFBIZ-2697:
-------------------------------------

    Assignee: Andrew Zeneski

> 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.


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

Posted by "Jacques Le Roux (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OFBIZ-2697?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jacques Le Roux closed OFBIZ-2697.
----------------------------------


> 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.


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

Posted by "Andrew Zeneski (JIRA)" <ji...@apache.org>.
    [ 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.