You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "Divesh Dutta (JIRA)" <ji...@apache.org> on 2014/12/29 14:14:13 UTC

[jira] [Updated] (OFBIZ-5906) The action in definitions throw an error in tests

     [ https://issues.apache.org/jira/browse/OFBIZ-5906?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Divesh Dutta updated OFBIZ-5906:
--------------------------------
    Attachment: OFBIZ-5906.patch

Attached is the patch to fix this issue. Fix is referenced from EntityDataLoader.java. 

Data loading for xml data was working fine when <delete>,<create>, <create-update> tag were used . But these tags were not working when data was loaded at the time of running J-unit tests.  So after researched that how data loading was working fine for simple data load. 

So commented the old way of reading XML document and used new way used in EntityDataLoader.java to parse the XML file. 

> The <delete> action in <entity-engine-xml> definitions throw an error in tests
> ------------------------------------------------------------------------------
>
>                 Key: OFBIZ-5906
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-5906
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework
>    Affects Versions: Release Branch 12.04, Release Branch 13.07, Trunk
>            Reporter: Jacques Le Roux
>            Priority: Minor
>         Attachments: OFBIZ-5906.patch
>
>
> While running a test with test data defined with a <delete> inside I got thses errors:
> {code}
> 2014-10-28 15:21:22,155 |main                 |GenericDelegator              |E| Error getting entity definition from model
> org.ofbiz.entity.GenericModelException: Could not find definition for entity name delete
> 	at org.ofbiz.entity.model.ModelReader.getModelEntity(ModelReader.java:489) ~[ofbiz-entity.jar:?]
> 	at org.ofbiz.entity.GenericDelegator.getModelEntity(GenericDelegator.java:405) [ofbiz-entity.jar:?]
> 	at org.ofbiz.entity.GenericDelegator.makeValue(GenericDelegator.java:600) [ofbiz-entity.jar:?]
> 	at org.ofbiz.entity.GenericDelegator.makeValue(GenericDelegator.java:2397) [ofbiz-entity.jar:?]
> 	at org.ofbiz.entity.GenericDelegator.makeValues(GenericDelegator.java:2356) [ofbiz-entity.jar:?]
> 	at org.ofbiz.entity.GenericDelegator.readXmlDocument(GenericDelegator.java:2327) [ofbiz-entity.jar:?]
> 	at org.ofbiz.testtools.EntityXmlAssertTest.countTestCases(EntityXmlAssertTest.java:61) [ofbiz-testtools.jar:?]
> 	at junit.framework.TestResult.startTest(TestResult.java:150) [junit-dep-4.10.jar:?]
> 	at org.ofbiz.testtools.EntityXmlAssertTest.run(EntityXmlAssertTest.java:71) [ofbiz-testtools.jar:?]
> 	at junit.framework.TestSuite.runTest(TestSuite.java:243) [junit-dep-4.10.jar:?]
> 	at junit.framework.TestSuite.run(TestSuite.java:238) [junit-dep-4.10.jar:?]
> 	at org.ofbiz.testtools.TestRunContainer.start(TestRunContainer.java:147) [ofbiz-testtools.jar:?]
> 	at org.ofbiz.base.container.ContainerLoader.start(ContainerLoader.java:237) [ofbiz-base.jar:?]
> 	at org.ofbiz.base.start.Start.startStartLoaders(Start.java:341) [ofbiz.jar:?]
> 	at org.ofbiz.base.start.Start.start(Start.java:367) [ofbiz.jar:?]
> 	at org.ofbiz.base.start.Start.main(Start.java:135) [ofbiz.jar:?]
> 2014-10-28 15:21:22,156 |main                 |ServiceTest                   |E| Error getting test case count
> java.lang.IllegalArgumentException: [GenericDelegator.makeValue] could not find entity for entityName: delete
> 	at org.ofbiz.entity.GenericDelegator.makeValue(GenericDelegator.java:602) ~[ofbiz-entity.jar:?]
> 	at org.ofbiz.entity.GenericDelegator.makeValue(GenericDelegator.java:2397) ~[ofbiz-entity.jar:?]
> 	at org.ofbiz.entity.GenericDelegator.makeValues(GenericDelegator.java:2356) ~[ofbiz-entity.jar:?]
> 	at org.ofbiz.entity.GenericDelegator.readXmlDocument(GenericDelegator.java:2327) ~[ofbiz-entity.jar:?]
> 	at org.ofbiz.testtools.EntityXmlAssertTest.countTestCases(EntityXmlAssertTest.java:61) [ofbiz-testtools.jar:?]
> 	at junit.framework.TestResult.startTest(TestResult.java:150) [junit-dep-4.10.jar:?]
> 	at org.ofbiz.testtools.EntityXmlAssertTest.run(EntityXmlAssertTest.java:71) [ofbiz-testtools.jar:?]
> 	at junit.framework.TestSuite.runTest(TestSuite.java:243) [junit-dep-4.10.jar:?]
> 	at junit.framework.TestSuite.run(TestSuite.java:238) [junit-dep-4.10.jar:?]
> 	at org.ofbiz.testtools.TestRunContainer.start(TestRunContainer.java:147) [ofbiz-testtools.jar:?]
> 	at org.ofbiz.base.container.ContainerLoader.start(ContainerLoader.java:237) [ofbiz-base.jar:?]
> 	at org.ofbiz.base.start.Start.startStartLoaders(Start.java:341) [ofbiz.jar:?]
> 	at org.ofbiz.base.start.Start.start(Start.java:367) [ofbiz.jar:?]
> 	at org.ofbiz.base.start.Start.main(Start.java:135) [ofbiz.jar:?]
> {code}
> This has no consequences AFAIK, but is a bit annoying...



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)