warning in log when using @renderSubContentCache freemarker macro
----------------------------------------------------------------- Key: OFBIZ-4451 URL: https://issues.apache.org/jira/browse/OFBIZ-4451 Project: OFBiz Issue Type: Bug Components: content Affects Versions: SVN trunk Reporter: Martin Kreidenweis Priority: Minor When using the @renderSubContentCache freemarker macro, warnings like this appear in the log: {code} [ GenericEntity.java:314:WARN ] The field name (or key) [caContentAssocTypeId] is not valid for entity [ContentDataResourceView], printing IllegalArgumentException instead of throwing it because Map interface specification does not allow throwing that exception. {code} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira |
[ https://issues.apache.org/jira/browse/OFBIZ-4451?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Martin Kreidenweis updated OFBIZ-4451: -------------------------------------- Attachment: OFBIZ-4451.patch Patch: GenericValue.get() will actually not throw an exception (any more?) but instead log a warning if the field doesn't exist, so now we first check if the field we are trying to access exists. Checking one of the fields through the ModelEntity should be enough, as all three of them come from the same entity. > warning in log when using @renderSubContentCache freemarker macro > ----------------------------------------------------------------- > > Key: OFBIZ-4451 > URL: https://issues.apache.org/jira/browse/OFBIZ-4451 > Project: OFBiz > Issue Type: Bug > Components: content > Affects Versions: SVN trunk > Reporter: Martin Kreidenweis > Priority: Minor > Attachments: OFBIZ-4451.patch > > > When using the @renderSubContentCache freemarker macro, warnings like this appear in the log: > {code} > [ GenericEntity.java:314:WARN ] The field name (or key) [caContentAssocTypeId] is not valid for entity [ContentDataResourceView], printing IllegalArgumentException instead of throwing it because Map interface specification does not allow throwing that exception. > {code} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-4451?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13116915#comment-13116915 ] Jacques Le Roux commented on OFBIZ-4451: ---------------------------------------- I guess the reason why not exception is thrown: <<printing IllegalArgumentException instead of throwing it because Map interface specification does not allow throwing that exception.>>. Your patch sounds good to me. Opinions? > warning in log when using @renderSubContentCache freemarker macro > ----------------------------------------------------------------- > > Key: OFBIZ-4451 > URL: https://issues.apache.org/jira/browse/OFBIZ-4451 > Project: OFBiz > Issue Type: Bug > Components: content > Affects Versions: SVN trunk > Reporter: Martin Kreidenweis > Priority: Minor > Attachments: OFBIZ-4451.patch > > > When using the @renderSubContentCache freemarker macro, warnings like this appear in the log: > {code} > [ GenericEntity.java:314:WARN ] The field name (or key) [caContentAssocTypeId] is not valid for entity [ContentDataResourceView], printing IllegalArgumentException instead of throwing it because Map interface specification does not allow throwing that exception. > {code} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-4451?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jacques Le Roux closed OFBIZ-4451. ---------------------------------- Resolution: Fixed Fix Version/s: SVN trunk Release Branch 11.04 Release Branch 10.04 Release Branch 09.04 Assignee: Jacques Le Roux Thanks Martin, Your patch is in trunk r1212147 R11.04 r1212150 R10.04 r1212151 R09.04 r1212152 > warning in log when using @renderSubContentCache freemarker macro > ----------------------------------------------------------------- > > Key: OFBIZ-4451 > URL: https://issues.apache.org/jira/browse/OFBIZ-4451 > Project: OFBiz > Issue Type: Bug > Components: content > Affects Versions: SVN trunk > Reporter: Martin Kreidenweis > Assignee: Jacques Le Roux > Priority: Minor > Fix For: Release Branch 09.04, Release Branch 10.04, Release Branch 11.04, SVN trunk > > Attachments: OFBIZ-4451.patch > > > When using the @renderSubContentCache freemarker macro, warnings like this appear in the log: > {code} > [ GenericEntity.java:314:WARN ] The field name (or key) [caContentAssocTypeId] is not valid for entity [ContentDataResourceView], printing IllegalArgumentException instead of throwing it because Map interface specification does not allow throwing that exception. > {code} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira |
Free forum by Nabble | Edit this page |