You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by Vikas Mayur <vi...@gmail.com> on 2008/06/12 16:05:01 UTC

Error in running test cases

Hi,

I was testing few patches for test cases posted on Jira and thought to
modify <if-empty field-name=""> to use <if-empty field=""> instead.
But its giving following error ( This particular log is associated with when
test is run on example component )

Any thoughts, why this is happening ?

Vikas


Exception: java.lang.Exception
Message: Error in simple-method [test the create example service
[file:/Users/vikas/work/projects/ofbiz/framework/example/script/org/ofbiz/example/example/ExampleServices.xml#testCreateExampleService]]:
; [Assertion failed: (empty[=null])]
---- stack trace
---------------------------------------------------------------
java.lang.Exception: Error in simple-method [test the create example service
[file:/Users/vikas/work/projects/ofbiz/framework/example/script/org/ofbiz/example/example/ExampleServices.xml#testCreateExampleService]]:
; [Assertion failed: (empty[=null])]
org.ofbiz.entity.transaction.TransactionUtil.setRollbackOnly(TransactionUtil.java:311)
org.ofbiz.entity.transaction.TransactionUtil.rollback(TransactionUtil.java:258)
org.ofbiz.minilang.SimpleMethod.exec(SimpleMethod.java:875)
org.ofbiz.minilang.SimpleMethod.runSimpleMethod(SimpleMethod.java:134)
org.ofbiz.minilang.SimpleMethod.runSimpleService(SimpleMethod.java:116)
org.ofbiz.minilang.SimpleServiceEngine.serviceInvoker(SimpleServiceEngine.java:76)
org.ofbiz.minilang.SimpleServiceEngine.runSync(SimpleServiceEngine.java:51)
org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:384)
org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:213)
org.ofbiz.service.GenericDispatcher.runSync(GenericDispatcher.java:149)
org.ofbiz.testtools.ServiceTest.run(ServiceTest.java:61)
junit.framework.TestSuite.runTest(TestSuite.java:208)
junit.framework.TestSuite.run(TestSuite.java:203)
org.ofbiz.testtools.TestRunContainer.start(TestRunContainer.java:134)
org.ofbiz.base.container.ContainerLoader.start(ContainerLoader.java:101)
org.ofbiz.base.start.Start.startStartLoaders(Start.java:263)
org.ofbiz.base.start.Start.startServer(Start.java:312)
org.ofbiz.base.start.Start.start(Start.java:316)
org.ofbiz.base.start.Start.main(Start.java:399)

Re: Error in running test cases

Posted by Vikas Mayur <vi...@gmail.com>.
Hi David,

I have seen that work and was trying do similar modifications to test case
patches.
It worked nicely with "field-name" though with some errors as you said which
are fine, but
the test case fails using "field".


Vikas

On Fri, Jun 13, 2008 at 10:07 AM, David E Jones <jo...@hotwaxmedia.com>
wrote:

>
> This is related to the cleanup of the simple-method attributes (and some
> elements). There is a summary of what has been done so far here:
>
> http://docs.ofbiz.org/display/OFBTECH/Simple+Method+Cleanup+Effort
>
> You will get XSD validation errors for unchanged elements, but the methods
> should still run just fine.
>
> If you change "field-name" to "field" then the validation error should go
> away, and things should work as before.
>
> If that is not happening, please let me know!
>
> -David
>
>
>
> On Jun 12, 2008, at 10:22 PM, Vikas Mayur wrote:
>
>  Hi Scott,
>>
>> It is working fine with "field-name" though it gives few errors like
>>
>> UtilXml.java:660:ERROR] XmlFileLoader: File
>>
>> file:/Users/vikas/work/projects/ofbiz/framework/example/script/org/ofbiz/example/example/ExampleServices.xml
>> process error. Line: 123. Error message: cvc-complex-type.3.2.2: Attribute
>> 'field-name' is not allowed to appear in element 'if-empty'.
>>
>> BTW, I see that its a issue with <if-empty> tag only.
>>
>> Vikas
>>
>>
>> On Fri, Jun 13, 2008 at 8:06 AM, Scott Gray <le...@gmail.com> wrote:
>>
>>  Hi Vikas
>>>
>>> The two attributes field-name and field should be interchangeable, are
>>> you
>>> sure that you don't have a problem even if you use field-name?
>>>
>>> Regards
>>> Scott
>>>
>>> 2008/6/13 Vikas Mayur <vi...@gmail.com>:
>>>
>>>  Hi,
>>>>
>>>> I was testing few patches for test cases posted on Jira and thought to
>>>> modify <if-empty field-name=""> to use <if-empty field=""> instead.
>>>> But its giving following error ( This particular log is associated with
>>>> when
>>>> test is run on example component )
>>>>
>>>> Any thoughts, why this is happening ?
>>>>
>>>> Vikas
>>>>
>>>>
>>>> Exception: java.lang.Exception
>>>> Message: Error in simple-method [test the create example service
>>>>
>>>>
>>>> [file:/Users/vikas/work/projects/ofbiz/framework/example/script/org/ofbiz/example/example/ExampleServices.xml#testCreateExampleService]]:
>>>
>>>> ; [Assertion failed: (empty[=null])]
>>>> ---- stack trace
>>>> ---------------------------------------------------------------
>>>> java.lang.Exception: Error in simple-method [test the create example
>>>> service
>>>>
>>>>
>>>> [file:/Users/vikas/work/projects/ofbiz/framework/example/script/org/ofbiz/example/example/ExampleServices.xml#testCreateExampleService]]:
>>>
>>>> ; [Assertion failed: (empty[=null])]
>>>>
>>>>
>>>> org.ofbiz.entity.transaction.TransactionUtil.setRollbackOnly(TransactionUtil.java:311)
>>>
>>>>
>>>>
>>>> org.ofbiz.entity.transaction.TransactionUtil.rollback(TransactionUtil.java:258)
>>>
>>>> org.ofbiz.minilang.SimpleMethod.exec(SimpleMethod.java:875)
>>>> org.ofbiz.minilang.SimpleMethod.runSimpleMethod(SimpleMethod.java:134)
>>>> org.ofbiz.minilang.SimpleMethod.runSimpleService(SimpleMethod.java:116)
>>>>
>>>>
>>>> org.ofbiz.minilang.SimpleServiceEngine.serviceInvoker(SimpleServiceEngine.java:76)
>>>
>>>>
>>>> org.ofbiz.minilang.SimpleServiceEngine.runSync(SimpleServiceEngine.java:51)
>>>
>>>> org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:384)
>>>> org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:213)
>>>> org.ofbiz.service.GenericDispatcher.runSync(GenericDispatcher.java:149)
>>>> org.ofbiz.testtools.ServiceTest.run(ServiceTest.java:61)
>>>> junit.framework.TestSuite.runTest(TestSuite.java:208)
>>>> junit.framework.TestSuite.run(TestSuite.java:203)
>>>> org.ofbiz.testtools.TestRunContainer.start(TestRunContainer.java:134)
>>>> org.ofbiz.base.container.ContainerLoader.start(ContainerLoader.java:101)
>>>> org.ofbiz.base.start.Start.startStartLoaders(Start.java:263)
>>>> org.ofbiz.base.start.Start.startServer(Start.java:312)
>>>> org.ofbiz.base.start.Start.start(Start.java:316)
>>>> org.ofbiz.base.start.Start.main(Start.java:399)
>>>>
>>>>
>>>
>

Re: Error in running test cases

Posted by David E Jones <jo...@hotwaxmedia.com>.
This is related to the cleanup of the simple-method attributes (and  
some elements). There is a summary of what has been done so far here:

http://docs.ofbiz.org/display/OFBTECH/Simple+Method+Cleanup+Effort

You will get XSD validation errors for unchanged elements, but the  
methods should still run just fine.

If you change "field-name" to "field" then the validation error should  
go away, and things should work as before.

If that is not happening, please let me know!

-David


On Jun 12, 2008, at 10:22 PM, Vikas Mayur wrote:

> Hi Scott,
>
> It is working fine with "field-name" though it gives few errors like
>
> UtilXml.java:660:ERROR] XmlFileLoader: File
> file:/Users/vikas/work/projects/ofbiz/framework/example/script/org/ 
> ofbiz/example/example/ExampleServices.xml
> process error. Line: 123. Error message: cvc-complex-type.3.2.2:  
> Attribute
> 'field-name' is not allowed to appear in element 'if-empty'.
>
> BTW, I see that its a issue with <if-empty> tag only.
>
> Vikas
>
>
> On Fri, Jun 13, 2008 at 8:06 AM, Scott Gray <le...@gmail.com> wrote:
>
>> Hi Vikas
>>
>> The two attributes field-name and field should be interchangeable,  
>> are you
>> sure that you don't have a problem even if you use field-name?
>>
>> Regards
>> Scott
>>
>> 2008/6/13 Vikas Mayur <vi...@gmail.com>:
>>
>>> Hi,
>>>
>>> I was testing few patches for test cases posted on Jira and  
>>> thought to
>>> modify <if-empty field-name=""> to use <if-empty field=""> instead.
>>> But its giving following error ( This particular log is associated  
>>> with
>>> when
>>> test is run on example component )
>>>
>>> Any thoughts, why this is happening ?
>>>
>>> Vikas
>>>
>>>
>>> Exception: java.lang.Exception
>>> Message: Error in simple-method [test the create example service
>>>
>>>
>> [file:/Users/vikas/work/projects/ofbiz/framework/example/script/org/ 
>> ofbiz/example/example/ExampleServices.xml#testCreateExampleService]]:
>>> ; [Assertion failed: (empty[=null])]
>>> ---- stack trace
>>> ---------------------------------------------------------------
>>> java.lang.Exception: Error in simple-method [test the create example
>>> service
>>>
>>>
>> [file:/Users/vikas/work/projects/ofbiz/framework/example/script/org/ 
>> ofbiz/example/example/ExampleServices.xml#testCreateExampleService]]:
>>> ; [Assertion failed: (empty[=null])]
>>>
>>>
>> org 
>> .ofbiz 
>> .entity 
>> .transaction.TransactionUtil.setRollbackOnly(TransactionUtil.java: 
>> 311)
>>>
>>>
>> org 
>> .ofbiz 
>> .entity.transaction.TransactionUtil.rollback(TransactionUtil.java: 
>> 258)
>>> org.ofbiz.minilang.SimpleMethod.exec(SimpleMethod.java:875)
>>> org.ofbiz.minilang.SimpleMethod.runSimpleMethod(SimpleMethod.java: 
>>> 134)
>>> org.ofbiz.minilang.SimpleMethod.runSimpleService(SimpleMethod.java: 
>>> 116)
>>>
>>>
>> org 
>> .ofbiz 
>> .minilang 
>> .SimpleServiceEngine.serviceInvoker(SimpleServiceEngine.java:76)
>>>
>> org 
>> .ofbiz 
>> .minilang.SimpleServiceEngine.runSync(SimpleServiceEngine.java:51)
>>> org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java: 
>>> 384)
>>> org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java: 
>>> 213)
>>> org.ofbiz.service.GenericDispatcher.runSync(GenericDispatcher.java: 
>>> 149)
>>> org.ofbiz.testtools.ServiceTest.run(ServiceTest.java:61)
>>> junit.framework.TestSuite.runTest(TestSuite.java:208)
>>> junit.framework.TestSuite.run(TestSuite.java:203)
>>> org.ofbiz.testtools.TestRunContainer.start(TestRunContainer.java: 
>>> 134)
>>> org 
>>> .ofbiz.base.container.ContainerLoader.start(ContainerLoader.java: 
>>> 101)
>>> org.ofbiz.base.start.Start.startStartLoaders(Start.java:263)
>>> org.ofbiz.base.start.Start.startServer(Start.java:312)
>>> org.ofbiz.base.start.Start.start(Start.java:316)
>>> org.ofbiz.base.start.Start.main(Start.java:399)
>>>
>>


Re: Error in running test cases

Posted by Vikas Mayur <vi...@gmail.com>.
Thanks Scott - much appreciated.

Vikas

On Fri, Jun 13, 2008 at 12:16 PM, Scott Gray <le...@gmail.com> wrote:

> Thanks Vikas, I found the problem and fixed it in rev. 667385
>
> Regards
> Scott
>
> 2008/6/13 Vikas Mayur <vi...@gmail.com>:
>
> > Just run the following command on terminal
> >
> > java -jar ofbiz.jar -test component='example'
> >
> > and if you want to run a single test case under example test suite -
> > comment
> > other in example/testdef/tests.xml
> >
> >
> > Please let me know if you need further information.
> >
> >
> > Thanks,
> > Vikas
> >
> > On Fri, Jun 13, 2008 at 11:36 AM, Scott Gray <le...@gmail.com> wrote:
> >
> > > I'll take a look, how do I run the tests for just the example
> component?
> > >
> > > Thanks
> > > Scott
> > >
> > > 2008/6/13 Vikas Mayur <vi...@gmail.com>:
> > >
> > > > Hi Scott,
> > > >
> > > > I have seen this problem coming while running a test case.
> > > > For now you can run the test case for example component to see the
> > > problem
> > > > and file of interest is ExampleServices.xml,
> > > > method-name="testCreateExampleService".
> > > >
> > > > Thanks,
> > > > Vikas
> > > >
> > > > On Fri, Jun 13, 2008 at 10:27 AM, Scott Gray <le...@gmail.com>
> > wrote:
> > > >
> > > > > Hi Vikas
> > > > >
> > > > > I can't see any reason why it would not work, where is the code I
> can
> > > use
> > > > > to
> > > > > replicate the issue?
> > > > >
> > > > > Thanks
> > > > > Scott
> > > > >
> > > > > 2008/6/13 Vikas Mayur <vi...@gmail.com>:
> > > > >
> > > > > > Hi Scott,
> > > > > >
> > > > > > It is working fine with "field-name" though it gives few errors
> > like
> > > > > >
> > > > > > UtilXml.java:660:ERROR] XmlFileLoader: File
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> file:/Users/vikas/work/projects/ofbiz/framework/example/script/org/ofbiz/example/example/ExampleServices.xml
> > > > > > process error. Line: 123. Error message: cvc-complex-type.3.2.2:
> > > > > Attribute
> > > > > > 'field-name' is not allowed to appear in element 'if-empty'.
> > > > > >
> > > > > > BTW, I see that its a issue with <if-empty> tag only.
> > > > > >
> > > > > > Vikas
> > > > > >
> > > > > >
> > > > > > On Fri, Jun 13, 2008 at 8:06 AM, Scott Gray <le...@gmail.com>
> > > wrote:
> > > > > >
> > > > > > > Hi Vikas
> > > > > > >
> > > > > > > The two attributes field-name and field should be
> > interchangeable,
> > > > are
> > > > > > you
> > > > > > > sure that you don't have a problem even if you use field-name?
> > > > > > >
> > > > > > > Regards
> > > > > > > Scott
> > > > > > >
> > > > > > > 2008/6/13 Vikas Mayur <vi...@gmail.com>:
> > > > > > >
> > > > > > > > Hi,
> > > > > > > >
> > > > > > > > I was testing few patches for test cases posted on Jira and
> > > thought
> > > > > to
> > > > > > > > modify <if-empty field-name=""> to use <if-empty field="">
> > > instead.
> > > > > > > > But its giving following error ( This particular log is
> > > associated
> > > > > with
> > > > > > > > when
> > > > > > > > test is run on example component )
> > > > > > > >
> > > > > > > > Any thoughts, why this is happening ?
> > > > > > > >
> > > > > > > > Vikas
> > > > > > > >
> > > > > > > >
> > > > > > > > Exception: java.lang.Exception
> > > > > > > > Message: Error in simple-method [test the create example
> > service
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> [file:/Users/vikas/work/projects/ofbiz/framework/example/script/org/ofbiz/example/example/ExampleServices.xml#testCreateExampleService]]:
> > > > > > > > ; [Assertion failed: (empty[=null])]
> > > > > > > > ---- stack trace
> > > > > > > >
> ---------------------------------------------------------------
> > > > > > > > java.lang.Exception: Error in simple-method [test the create
> > > > example
> > > > > > > > service
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> [file:/Users/vikas/work/projects/ofbiz/framework/example/script/org/ofbiz/example/example/ExampleServices.xml#testCreateExampleService]]:
> > > > > > > > ; [Assertion failed: (empty[=null])]
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.ofbiz.entity.transaction.TransactionUtil.setRollbackOnly(TransactionUtil.java:311)
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.ofbiz.entity.transaction.TransactionUtil.rollback(TransactionUtil.java:258)
> > > > > > > > org.ofbiz.minilang.SimpleMethod.exec(SimpleMethod.java:875)
> > > > > > > >
> > > > >
> > org.ofbiz.minilang.SimpleMethod.runSimpleMethod(SimpleMethod.java:134)
> > > > > > > >
> > > > >
> > org.ofbiz.minilang.SimpleMethod.runSimpleService(SimpleMethod.java:116)
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.ofbiz.minilang.SimpleServiceEngine.serviceInvoker(SimpleServiceEngine.java:76)
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.ofbiz.minilang.SimpleServiceEngine.runSync(SimpleServiceEngine.java:51)
> > > > > > > >
> > > > >
> > org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:384)
> > > > > > > >
> > > > >
> > org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:213)
> > > > > > > >
> > > > >
> > org.ofbiz.service.GenericDispatcher.runSync(GenericDispatcher.java:149)
> > > > > > > > org.ofbiz.testtools.ServiceTest.run(ServiceTest.java:61)
> > > > > > > > junit.framework.TestSuite.runTest(TestSuite.java:208)
> > > > > > > > junit.framework.TestSuite.run(TestSuite.java:203)
> > > > > > > >
> > > > org.ofbiz.testtools.TestRunContainer.start(TestRunContainer.java:134)
> > > > > > > >
> > > > > >
> > > >
> > org.ofbiz.base.container.ContainerLoader.start(ContainerLoader.java:101)
> > > > > > > > org.ofbiz.base.start.Start.startStartLoaders(Start.java:263)
> > > > > > > > org.ofbiz.base.start.Start.startServer(Start.java:312)
> > > > > > > > org.ofbiz.base.start.Start.start(Start.java:316)
> > > > > > > > org.ofbiz.base.start.Start.main(Start.java:399)
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>

Re: Error in running test cases

Posted by Scott Gray <le...@gmail.com>.
Thanks Vikas, I found the problem and fixed it in rev. 667385

Regards
Scott

2008/6/13 Vikas Mayur <vi...@gmail.com>:

> Just run the following command on terminal
>
> java -jar ofbiz.jar -test component='example'
>
> and if you want to run a single test case under example test suite -
> comment
> other in example/testdef/tests.xml
>
>
> Please let me know if you need further information.
>
>
> Thanks,
> Vikas
>
> On Fri, Jun 13, 2008 at 11:36 AM, Scott Gray <le...@gmail.com> wrote:
>
> > I'll take a look, how do I run the tests for just the example component?
> >
> > Thanks
> > Scott
> >
> > 2008/6/13 Vikas Mayur <vi...@gmail.com>:
> >
> > > Hi Scott,
> > >
> > > I have seen this problem coming while running a test case.
> > > For now you can run the test case for example component to see the
> > problem
> > > and file of interest is ExampleServices.xml,
> > > method-name="testCreateExampleService".
> > >
> > > Thanks,
> > > Vikas
> > >
> > > On Fri, Jun 13, 2008 at 10:27 AM, Scott Gray <le...@gmail.com>
> wrote:
> > >
> > > > Hi Vikas
> > > >
> > > > I can't see any reason why it would not work, where is the code I can
> > use
> > > > to
> > > > replicate the issue?
> > > >
> > > > Thanks
> > > > Scott
> > > >
> > > > 2008/6/13 Vikas Mayur <vi...@gmail.com>:
> > > >
> > > > > Hi Scott,
> > > > >
> > > > > It is working fine with "field-name" though it gives few errors
> like
> > > > >
> > > > > UtilXml.java:660:ERROR] XmlFileLoader: File
> > > > >
> > > > >
> > > >
> > >
> >
> file:/Users/vikas/work/projects/ofbiz/framework/example/script/org/ofbiz/example/example/ExampleServices.xml
> > > > > process error. Line: 123. Error message: cvc-complex-type.3.2.2:
> > > > Attribute
> > > > > 'field-name' is not allowed to appear in element 'if-empty'.
> > > > >
> > > > > BTW, I see that its a issue with <if-empty> tag only.
> > > > >
> > > > > Vikas
> > > > >
> > > > >
> > > > > On Fri, Jun 13, 2008 at 8:06 AM, Scott Gray <le...@gmail.com>
> > wrote:
> > > > >
> > > > > > Hi Vikas
> > > > > >
> > > > > > The two attributes field-name and field should be
> interchangeable,
> > > are
> > > > > you
> > > > > > sure that you don't have a problem even if you use field-name?
> > > > > >
> > > > > > Regards
> > > > > > Scott
> > > > > >
> > > > > > 2008/6/13 Vikas Mayur <vi...@gmail.com>:
> > > > > >
> > > > > > > Hi,
> > > > > > >
> > > > > > > I was testing few patches for test cases posted on Jira and
> > thought
> > > > to
> > > > > > > modify <if-empty field-name=""> to use <if-empty field="">
> > instead.
> > > > > > > But its giving following error ( This particular log is
> > associated
> > > > with
> > > > > > > when
> > > > > > > test is run on example component )
> > > > > > >
> > > > > > > Any thoughts, why this is happening ?
> > > > > > >
> > > > > > > Vikas
> > > > > > >
> > > > > > >
> > > > > > > Exception: java.lang.Exception
> > > > > > > Message: Error in simple-method [test the create example
> service
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> [file:/Users/vikas/work/projects/ofbiz/framework/example/script/org/ofbiz/example/example/ExampleServices.xml#testCreateExampleService]]:
> > > > > > > ; [Assertion failed: (empty[=null])]
> > > > > > > ---- stack trace
> > > > > > > ---------------------------------------------------------------
> > > > > > > java.lang.Exception: Error in simple-method [test the create
> > > example
> > > > > > > service
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> [file:/Users/vikas/work/projects/ofbiz/framework/example/script/org/ofbiz/example/example/ExampleServices.xml#testCreateExampleService]]:
> > > > > > > ; [Assertion failed: (empty[=null])]
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.ofbiz.entity.transaction.TransactionUtil.setRollbackOnly(TransactionUtil.java:311)
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.ofbiz.entity.transaction.TransactionUtil.rollback(TransactionUtil.java:258)
> > > > > > > org.ofbiz.minilang.SimpleMethod.exec(SimpleMethod.java:875)
> > > > > > >
> > > >
> org.ofbiz.minilang.SimpleMethod.runSimpleMethod(SimpleMethod.java:134)
> > > > > > >
> > > >
> org.ofbiz.minilang.SimpleMethod.runSimpleService(SimpleMethod.java:116)
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.ofbiz.minilang.SimpleServiceEngine.serviceInvoker(SimpleServiceEngine.java:76)
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.ofbiz.minilang.SimpleServiceEngine.runSync(SimpleServiceEngine.java:51)
> > > > > > >
> > > >
> org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:384)
> > > > > > >
> > > >
> org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:213)
> > > > > > >
> > > >
> org.ofbiz.service.GenericDispatcher.runSync(GenericDispatcher.java:149)
> > > > > > > org.ofbiz.testtools.ServiceTest.run(ServiceTest.java:61)
> > > > > > > junit.framework.TestSuite.runTest(TestSuite.java:208)
> > > > > > > junit.framework.TestSuite.run(TestSuite.java:203)
> > > > > > >
> > > org.ofbiz.testtools.TestRunContainer.start(TestRunContainer.java:134)
> > > > > > >
> > > > >
> > >
> org.ofbiz.base.container.ContainerLoader.start(ContainerLoader.java:101)
> > > > > > > org.ofbiz.base.start.Start.startStartLoaders(Start.java:263)
> > > > > > > org.ofbiz.base.start.Start.startServer(Start.java:312)
> > > > > > > org.ofbiz.base.start.Start.start(Start.java:316)
> > > > > > > org.ofbiz.base.start.Start.main(Start.java:399)
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>

Re: Error in running test cases

Posted by Vikas Mayur <vi...@gmail.com>.
Just run the following command on terminal

java -jar ofbiz.jar -test component='example'

and if you want to run a single test case under example test suite - comment
other in example/testdef/tests.xml


Please let me know if you need further information.


Thanks,
Vikas

On Fri, Jun 13, 2008 at 11:36 AM, Scott Gray <le...@gmail.com> wrote:

> I'll take a look, how do I run the tests for just the example component?
>
> Thanks
> Scott
>
> 2008/6/13 Vikas Mayur <vi...@gmail.com>:
>
> > Hi Scott,
> >
> > I have seen this problem coming while running a test case.
> > For now you can run the test case for example component to see the
> problem
> > and file of interest is ExampleServices.xml,
> > method-name="testCreateExampleService".
> >
> > Thanks,
> > Vikas
> >
> > On Fri, Jun 13, 2008 at 10:27 AM, Scott Gray <le...@gmail.com> wrote:
> >
> > > Hi Vikas
> > >
> > > I can't see any reason why it would not work, where is the code I can
> use
> > > to
> > > replicate the issue?
> > >
> > > Thanks
> > > Scott
> > >
> > > 2008/6/13 Vikas Mayur <vi...@gmail.com>:
> > >
> > > > Hi Scott,
> > > >
> > > > It is working fine with "field-name" though it gives few errors like
> > > >
> > > > UtilXml.java:660:ERROR] XmlFileLoader: File
> > > >
> > > >
> > >
> >
> file:/Users/vikas/work/projects/ofbiz/framework/example/script/org/ofbiz/example/example/ExampleServices.xml
> > > > process error. Line: 123. Error message: cvc-complex-type.3.2.2:
> > > Attribute
> > > > 'field-name' is not allowed to appear in element 'if-empty'.
> > > >
> > > > BTW, I see that its a issue with <if-empty> tag only.
> > > >
> > > > Vikas
> > > >
> > > >
> > > > On Fri, Jun 13, 2008 at 8:06 AM, Scott Gray <le...@gmail.com>
> wrote:
> > > >
> > > > > Hi Vikas
> > > > >
> > > > > The two attributes field-name and field should be interchangeable,
> > are
> > > > you
> > > > > sure that you don't have a problem even if you use field-name?
> > > > >
> > > > > Regards
> > > > > Scott
> > > > >
> > > > > 2008/6/13 Vikas Mayur <vi...@gmail.com>:
> > > > >
> > > > > > Hi,
> > > > > >
> > > > > > I was testing few patches for test cases posted on Jira and
> thought
> > > to
> > > > > > modify <if-empty field-name=""> to use <if-empty field="">
> instead.
> > > > > > But its giving following error ( This particular log is
> associated
> > > with
> > > > > > when
> > > > > > test is run on example component )
> > > > > >
> > > > > > Any thoughts, why this is happening ?
> > > > > >
> > > > > > Vikas
> > > > > >
> > > > > >
> > > > > > Exception: java.lang.Exception
> > > > > > Message: Error in simple-method [test the create example service
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> [file:/Users/vikas/work/projects/ofbiz/framework/example/script/org/ofbiz/example/example/ExampleServices.xml#testCreateExampleService]]:
> > > > > > ; [Assertion failed: (empty[=null])]
> > > > > > ---- stack trace
> > > > > > ---------------------------------------------------------------
> > > > > > java.lang.Exception: Error in simple-method [test the create
> > example
> > > > > > service
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> [file:/Users/vikas/work/projects/ofbiz/framework/example/script/org/ofbiz/example/example/ExampleServices.xml#testCreateExampleService]]:
> > > > > > ; [Assertion failed: (empty[=null])]
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.ofbiz.entity.transaction.TransactionUtil.setRollbackOnly(TransactionUtil.java:311)
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.ofbiz.entity.transaction.TransactionUtil.rollback(TransactionUtil.java:258)
> > > > > > org.ofbiz.minilang.SimpleMethod.exec(SimpleMethod.java:875)
> > > > > >
> > > org.ofbiz.minilang.SimpleMethod.runSimpleMethod(SimpleMethod.java:134)
> > > > > >
> > > org.ofbiz.minilang.SimpleMethod.runSimpleService(SimpleMethod.java:116)
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.ofbiz.minilang.SimpleServiceEngine.serviceInvoker(SimpleServiceEngine.java:76)
> > > > > >
> > > > >
> > > >
> > >
> >
> org.ofbiz.minilang.SimpleServiceEngine.runSync(SimpleServiceEngine.java:51)
> > > > > >
> > > org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:384)
> > > > > >
> > > org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:213)
> > > > > >
> > > org.ofbiz.service.GenericDispatcher.runSync(GenericDispatcher.java:149)
> > > > > > org.ofbiz.testtools.ServiceTest.run(ServiceTest.java:61)
> > > > > > junit.framework.TestSuite.runTest(TestSuite.java:208)
> > > > > > junit.framework.TestSuite.run(TestSuite.java:203)
> > > > > >
> > org.ofbiz.testtools.TestRunContainer.start(TestRunContainer.java:134)
> > > > > >
> > > >
> > org.ofbiz.base.container.ContainerLoader.start(ContainerLoader.java:101)
> > > > > > org.ofbiz.base.start.Start.startStartLoaders(Start.java:263)
> > > > > > org.ofbiz.base.start.Start.startServer(Start.java:312)
> > > > > > org.ofbiz.base.start.Start.start(Start.java:316)
> > > > > > org.ofbiz.base.start.Start.main(Start.java:399)
> > > > > >
> > > > >
> > > >
> > >
> >
>

Re: Error in running test cases

Posted by Scott Gray <le...@gmail.com>.
I'll take a look, how do I run the tests for just the example component?

Thanks
Scott

2008/6/13 Vikas Mayur <vi...@gmail.com>:

> Hi Scott,
>
> I have seen this problem coming while running a test case.
> For now you can run the test case for example component to see the problem
> and file of interest is ExampleServices.xml,
> method-name="testCreateExampleService".
>
> Thanks,
> Vikas
>
> On Fri, Jun 13, 2008 at 10:27 AM, Scott Gray <le...@gmail.com> wrote:
>
> > Hi Vikas
> >
> > I can't see any reason why it would not work, where is the code I can use
> > to
> > replicate the issue?
> >
> > Thanks
> > Scott
> >
> > 2008/6/13 Vikas Mayur <vi...@gmail.com>:
> >
> > > Hi Scott,
> > >
> > > It is working fine with "field-name" though it gives few errors like
> > >
> > > UtilXml.java:660:ERROR] XmlFileLoader: File
> > >
> > >
> >
> file:/Users/vikas/work/projects/ofbiz/framework/example/script/org/ofbiz/example/example/ExampleServices.xml
> > > process error. Line: 123. Error message: cvc-complex-type.3.2.2:
> > Attribute
> > > 'field-name' is not allowed to appear in element 'if-empty'.
> > >
> > > BTW, I see that its a issue with <if-empty> tag only.
> > >
> > > Vikas
> > >
> > >
> > > On Fri, Jun 13, 2008 at 8:06 AM, Scott Gray <le...@gmail.com> wrote:
> > >
> > > > Hi Vikas
> > > >
> > > > The two attributes field-name and field should be interchangeable,
> are
> > > you
> > > > sure that you don't have a problem even if you use field-name?
> > > >
> > > > Regards
> > > > Scott
> > > >
> > > > 2008/6/13 Vikas Mayur <vi...@gmail.com>:
> > > >
> > > > > Hi,
> > > > >
> > > > > I was testing few patches for test cases posted on Jira and thought
> > to
> > > > > modify <if-empty field-name=""> to use <if-empty field=""> instead.
> > > > > But its giving following error ( This particular log is associated
> > with
> > > > > when
> > > > > test is run on example component )
> > > > >
> > > > > Any thoughts, why this is happening ?
> > > > >
> > > > > Vikas
> > > > >
> > > > >
> > > > > Exception: java.lang.Exception
> > > > > Message: Error in simple-method [test the create example service
> > > > >
> > > > >
> > > >
> > >
> >
> [file:/Users/vikas/work/projects/ofbiz/framework/example/script/org/ofbiz/example/example/ExampleServices.xml#testCreateExampleService]]:
> > > > > ; [Assertion failed: (empty[=null])]
> > > > > ---- stack trace
> > > > > ---------------------------------------------------------------
> > > > > java.lang.Exception: Error in simple-method [test the create
> example
> > > > > service
> > > > >
> > > > >
> > > >
> > >
> >
> [file:/Users/vikas/work/projects/ofbiz/framework/example/script/org/ofbiz/example/example/ExampleServices.xml#testCreateExampleService]]:
> > > > > ; [Assertion failed: (empty[=null])]
> > > > >
> > > > >
> > > >
> > >
> >
> org.ofbiz.entity.transaction.TransactionUtil.setRollbackOnly(TransactionUtil.java:311)
> > > > >
> > > > >
> > > >
> > >
> >
> org.ofbiz.entity.transaction.TransactionUtil.rollback(TransactionUtil.java:258)
> > > > > org.ofbiz.minilang.SimpleMethod.exec(SimpleMethod.java:875)
> > > > >
> > org.ofbiz.minilang.SimpleMethod.runSimpleMethod(SimpleMethod.java:134)
> > > > >
> > org.ofbiz.minilang.SimpleMethod.runSimpleService(SimpleMethod.java:116)
> > > > >
> > > > >
> > > >
> > >
> >
> org.ofbiz.minilang.SimpleServiceEngine.serviceInvoker(SimpleServiceEngine.java:76)
> > > > >
> > > >
> > >
> >
> org.ofbiz.minilang.SimpleServiceEngine.runSync(SimpleServiceEngine.java:51)
> > > > >
> > org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:384)
> > > > >
> > org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:213)
> > > > >
> > org.ofbiz.service.GenericDispatcher.runSync(GenericDispatcher.java:149)
> > > > > org.ofbiz.testtools.ServiceTest.run(ServiceTest.java:61)
> > > > > junit.framework.TestSuite.runTest(TestSuite.java:208)
> > > > > junit.framework.TestSuite.run(TestSuite.java:203)
> > > > >
> org.ofbiz.testtools.TestRunContainer.start(TestRunContainer.java:134)
> > > > >
> > >
> org.ofbiz.base.container.ContainerLoader.start(ContainerLoader.java:101)
> > > > > org.ofbiz.base.start.Start.startStartLoaders(Start.java:263)
> > > > > org.ofbiz.base.start.Start.startServer(Start.java:312)
> > > > > org.ofbiz.base.start.Start.start(Start.java:316)
> > > > > org.ofbiz.base.start.Start.main(Start.java:399)
> > > > >
> > > >
> > >
> >
>

Re: Error in running test cases

Posted by Vikas Mayur <vi...@gmail.com>.
Hi Scott,

I have seen this problem coming while running a test case.
For now you can run the test case for example component to see the problem
and file of interest is ExampleServices.xml,
method-name="testCreateExampleService".

Thanks,
Vikas

On Fri, Jun 13, 2008 at 10:27 AM, Scott Gray <le...@gmail.com> wrote:

> Hi Vikas
>
> I can't see any reason why it would not work, where is the code I can use
> to
> replicate the issue?
>
> Thanks
> Scott
>
> 2008/6/13 Vikas Mayur <vi...@gmail.com>:
>
> > Hi Scott,
> >
> > It is working fine with "field-name" though it gives few errors like
> >
> > UtilXml.java:660:ERROR] XmlFileLoader: File
> >
> >
> file:/Users/vikas/work/projects/ofbiz/framework/example/script/org/ofbiz/example/example/ExampleServices.xml
> > process error. Line: 123. Error message: cvc-complex-type.3.2.2:
> Attribute
> > 'field-name' is not allowed to appear in element 'if-empty'.
> >
> > BTW, I see that its a issue with <if-empty> tag only.
> >
> > Vikas
> >
> >
> > On Fri, Jun 13, 2008 at 8:06 AM, Scott Gray <le...@gmail.com> wrote:
> >
> > > Hi Vikas
> > >
> > > The two attributes field-name and field should be interchangeable, are
> > you
> > > sure that you don't have a problem even if you use field-name?
> > >
> > > Regards
> > > Scott
> > >
> > > 2008/6/13 Vikas Mayur <vi...@gmail.com>:
> > >
> > > > Hi,
> > > >
> > > > I was testing few patches for test cases posted on Jira and thought
> to
> > > > modify <if-empty field-name=""> to use <if-empty field=""> instead.
> > > > But its giving following error ( This particular log is associated
> with
> > > > when
> > > > test is run on example component )
> > > >
> > > > Any thoughts, why this is happening ?
> > > >
> > > > Vikas
> > > >
> > > >
> > > > Exception: java.lang.Exception
> > > > Message: Error in simple-method [test the create example service
> > > >
> > > >
> > >
> >
> [file:/Users/vikas/work/projects/ofbiz/framework/example/script/org/ofbiz/example/example/ExampleServices.xml#testCreateExampleService]]:
> > > > ; [Assertion failed: (empty[=null])]
> > > > ---- stack trace
> > > > ---------------------------------------------------------------
> > > > java.lang.Exception: Error in simple-method [test the create example
> > > > service
> > > >
> > > >
> > >
> >
> [file:/Users/vikas/work/projects/ofbiz/framework/example/script/org/ofbiz/example/example/ExampleServices.xml#testCreateExampleService]]:
> > > > ; [Assertion failed: (empty[=null])]
> > > >
> > > >
> > >
> >
> org.ofbiz.entity.transaction.TransactionUtil.setRollbackOnly(TransactionUtil.java:311)
> > > >
> > > >
> > >
> >
> org.ofbiz.entity.transaction.TransactionUtil.rollback(TransactionUtil.java:258)
> > > > org.ofbiz.minilang.SimpleMethod.exec(SimpleMethod.java:875)
> > > >
> org.ofbiz.minilang.SimpleMethod.runSimpleMethod(SimpleMethod.java:134)
> > > >
> org.ofbiz.minilang.SimpleMethod.runSimpleService(SimpleMethod.java:116)
> > > >
> > > >
> > >
> >
> org.ofbiz.minilang.SimpleServiceEngine.serviceInvoker(SimpleServiceEngine.java:76)
> > > >
> > >
> >
> org.ofbiz.minilang.SimpleServiceEngine.runSync(SimpleServiceEngine.java:51)
> > > >
> org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:384)
> > > >
> org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:213)
> > > >
> org.ofbiz.service.GenericDispatcher.runSync(GenericDispatcher.java:149)
> > > > org.ofbiz.testtools.ServiceTest.run(ServiceTest.java:61)
> > > > junit.framework.TestSuite.runTest(TestSuite.java:208)
> > > > junit.framework.TestSuite.run(TestSuite.java:203)
> > > > org.ofbiz.testtools.TestRunContainer.start(TestRunContainer.java:134)
> > > >
> > org.ofbiz.base.container.ContainerLoader.start(ContainerLoader.java:101)
> > > > org.ofbiz.base.start.Start.startStartLoaders(Start.java:263)
> > > > org.ofbiz.base.start.Start.startServer(Start.java:312)
> > > > org.ofbiz.base.start.Start.start(Start.java:316)
> > > > org.ofbiz.base.start.Start.main(Start.java:399)
> > > >
> > >
> >
>

Re: Error in running test cases

Posted by Scott Gray <le...@gmail.com>.
Hi Vikas

I can't see any reason why it would not work, where is the code I can use to
replicate the issue?

Thanks
Scott

2008/6/13 Vikas Mayur <vi...@gmail.com>:

> Hi Scott,
>
> It is working fine with "field-name" though it gives few errors like
>
> UtilXml.java:660:ERROR] XmlFileLoader: File
>
> file:/Users/vikas/work/projects/ofbiz/framework/example/script/org/ofbiz/example/example/ExampleServices.xml
> process error. Line: 123. Error message: cvc-complex-type.3.2.2: Attribute
> 'field-name' is not allowed to appear in element 'if-empty'.
>
> BTW, I see that its a issue with <if-empty> tag only.
>
> Vikas
>
>
> On Fri, Jun 13, 2008 at 8:06 AM, Scott Gray <le...@gmail.com> wrote:
>
> > Hi Vikas
> >
> > The two attributes field-name and field should be interchangeable, are
> you
> > sure that you don't have a problem even if you use field-name?
> >
> > Regards
> > Scott
> >
> > 2008/6/13 Vikas Mayur <vi...@gmail.com>:
> >
> > > Hi,
> > >
> > > I was testing few patches for test cases posted on Jira and thought to
> > > modify <if-empty field-name=""> to use <if-empty field=""> instead.
> > > But its giving following error ( This particular log is associated with
> > > when
> > > test is run on example component )
> > >
> > > Any thoughts, why this is happening ?
> > >
> > > Vikas
> > >
> > >
> > > Exception: java.lang.Exception
> > > Message: Error in simple-method [test the create example service
> > >
> > >
> >
> [file:/Users/vikas/work/projects/ofbiz/framework/example/script/org/ofbiz/example/example/ExampleServices.xml#testCreateExampleService]]:
> > > ; [Assertion failed: (empty[=null])]
> > > ---- stack trace
> > > ---------------------------------------------------------------
> > > java.lang.Exception: Error in simple-method [test the create example
> > > service
> > >
> > >
> >
> [file:/Users/vikas/work/projects/ofbiz/framework/example/script/org/ofbiz/example/example/ExampleServices.xml#testCreateExampleService]]:
> > > ; [Assertion failed: (empty[=null])]
> > >
> > >
> >
> org.ofbiz.entity.transaction.TransactionUtil.setRollbackOnly(TransactionUtil.java:311)
> > >
> > >
> >
> org.ofbiz.entity.transaction.TransactionUtil.rollback(TransactionUtil.java:258)
> > > org.ofbiz.minilang.SimpleMethod.exec(SimpleMethod.java:875)
> > > org.ofbiz.minilang.SimpleMethod.runSimpleMethod(SimpleMethod.java:134)
> > > org.ofbiz.minilang.SimpleMethod.runSimpleService(SimpleMethod.java:116)
> > >
> > >
> >
> org.ofbiz.minilang.SimpleServiceEngine.serviceInvoker(SimpleServiceEngine.java:76)
> > >
> >
> org.ofbiz.minilang.SimpleServiceEngine.runSync(SimpleServiceEngine.java:51)
> > > org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:384)
> > > org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:213)
> > > org.ofbiz.service.GenericDispatcher.runSync(GenericDispatcher.java:149)
> > > org.ofbiz.testtools.ServiceTest.run(ServiceTest.java:61)
> > > junit.framework.TestSuite.runTest(TestSuite.java:208)
> > > junit.framework.TestSuite.run(TestSuite.java:203)
> > > org.ofbiz.testtools.TestRunContainer.start(TestRunContainer.java:134)
> > >
> org.ofbiz.base.container.ContainerLoader.start(ContainerLoader.java:101)
> > > org.ofbiz.base.start.Start.startStartLoaders(Start.java:263)
> > > org.ofbiz.base.start.Start.startServer(Start.java:312)
> > > org.ofbiz.base.start.Start.start(Start.java:316)
> > > org.ofbiz.base.start.Start.main(Start.java:399)
> > >
> >
>

Re: Error in running test cases

Posted by Vikas Mayur <vi...@gmail.com>.
Hi Scott,

It is working fine with "field-name" though it gives few errors like

UtilXml.java:660:ERROR] XmlFileLoader: File
file:/Users/vikas/work/projects/ofbiz/framework/example/script/org/ofbiz/example/example/ExampleServices.xml
process error. Line: 123. Error message: cvc-complex-type.3.2.2: Attribute
'field-name' is not allowed to appear in element 'if-empty'.

BTW, I see that its a issue with <if-empty> tag only.

Vikas


On Fri, Jun 13, 2008 at 8:06 AM, Scott Gray <le...@gmail.com> wrote:

> Hi Vikas
>
> The two attributes field-name and field should be interchangeable, are you
> sure that you don't have a problem even if you use field-name?
>
> Regards
> Scott
>
> 2008/6/13 Vikas Mayur <vi...@gmail.com>:
>
> > Hi,
> >
> > I was testing few patches for test cases posted on Jira and thought to
> > modify <if-empty field-name=""> to use <if-empty field=""> instead.
> > But its giving following error ( This particular log is associated with
> > when
> > test is run on example component )
> >
> > Any thoughts, why this is happening ?
> >
> > Vikas
> >
> >
> > Exception: java.lang.Exception
> > Message: Error in simple-method [test the create example service
> >
> >
> [file:/Users/vikas/work/projects/ofbiz/framework/example/script/org/ofbiz/example/example/ExampleServices.xml#testCreateExampleService]]:
> > ; [Assertion failed: (empty[=null])]
> > ---- stack trace
> > ---------------------------------------------------------------
> > java.lang.Exception: Error in simple-method [test the create example
> > service
> >
> >
> [file:/Users/vikas/work/projects/ofbiz/framework/example/script/org/ofbiz/example/example/ExampleServices.xml#testCreateExampleService]]:
> > ; [Assertion failed: (empty[=null])]
> >
> >
> org.ofbiz.entity.transaction.TransactionUtil.setRollbackOnly(TransactionUtil.java:311)
> >
> >
> org.ofbiz.entity.transaction.TransactionUtil.rollback(TransactionUtil.java:258)
> > org.ofbiz.minilang.SimpleMethod.exec(SimpleMethod.java:875)
> > org.ofbiz.minilang.SimpleMethod.runSimpleMethod(SimpleMethod.java:134)
> > org.ofbiz.minilang.SimpleMethod.runSimpleService(SimpleMethod.java:116)
> >
> >
> org.ofbiz.minilang.SimpleServiceEngine.serviceInvoker(SimpleServiceEngine.java:76)
> >
> org.ofbiz.minilang.SimpleServiceEngine.runSync(SimpleServiceEngine.java:51)
> > org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:384)
> > org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:213)
> > org.ofbiz.service.GenericDispatcher.runSync(GenericDispatcher.java:149)
> > org.ofbiz.testtools.ServiceTest.run(ServiceTest.java:61)
> > junit.framework.TestSuite.runTest(TestSuite.java:208)
> > junit.framework.TestSuite.run(TestSuite.java:203)
> > org.ofbiz.testtools.TestRunContainer.start(TestRunContainer.java:134)
> > org.ofbiz.base.container.ContainerLoader.start(ContainerLoader.java:101)
> > org.ofbiz.base.start.Start.startStartLoaders(Start.java:263)
> > org.ofbiz.base.start.Start.startServer(Start.java:312)
> > org.ofbiz.base.start.Start.start(Start.java:316)
> > org.ofbiz.base.start.Start.main(Start.java:399)
> >
>

Re: Error in running test cases

Posted by Scott Gray <le...@gmail.com>.
Hi Vikas

The two attributes field-name and field should be interchangeable, are you
sure that you don't have a problem even if you use field-name?

Regards
Scott

2008/6/13 Vikas Mayur <vi...@gmail.com>:

> Hi,
>
> I was testing few patches for test cases posted on Jira and thought to
> modify <if-empty field-name=""> to use <if-empty field=""> instead.
> But its giving following error ( This particular log is associated with
> when
> test is run on example component )
>
> Any thoughts, why this is happening ?
>
> Vikas
>
>
> Exception: java.lang.Exception
> Message: Error in simple-method [test the create example service
>
> [file:/Users/vikas/work/projects/ofbiz/framework/example/script/org/ofbiz/example/example/ExampleServices.xml#testCreateExampleService]]:
> ; [Assertion failed: (empty[=null])]
> ---- stack trace
> ---------------------------------------------------------------
> java.lang.Exception: Error in simple-method [test the create example
> service
>
> [file:/Users/vikas/work/projects/ofbiz/framework/example/script/org/ofbiz/example/example/ExampleServices.xml#testCreateExampleService]]:
> ; [Assertion failed: (empty[=null])]
>
> org.ofbiz.entity.transaction.TransactionUtil.setRollbackOnly(TransactionUtil.java:311)
>
> org.ofbiz.entity.transaction.TransactionUtil.rollback(TransactionUtil.java:258)
> org.ofbiz.minilang.SimpleMethod.exec(SimpleMethod.java:875)
> org.ofbiz.minilang.SimpleMethod.runSimpleMethod(SimpleMethod.java:134)
> org.ofbiz.minilang.SimpleMethod.runSimpleService(SimpleMethod.java:116)
>
> org.ofbiz.minilang.SimpleServiceEngine.serviceInvoker(SimpleServiceEngine.java:76)
> org.ofbiz.minilang.SimpleServiceEngine.runSync(SimpleServiceEngine.java:51)
> org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:384)
> org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:213)
> org.ofbiz.service.GenericDispatcher.runSync(GenericDispatcher.java:149)
> org.ofbiz.testtools.ServiceTest.run(ServiceTest.java:61)
> junit.framework.TestSuite.runTest(TestSuite.java:208)
> junit.framework.TestSuite.run(TestSuite.java:203)
> org.ofbiz.testtools.TestRunContainer.start(TestRunContainer.java:134)
> org.ofbiz.base.container.ContainerLoader.start(ContainerLoader.java:101)
> org.ofbiz.base.start.Start.startStartLoaders(Start.java:263)
> org.ofbiz.base.start.Start.startServer(Start.java:312)
> org.ofbiz.base.start.Start.start(Start.java:316)
> org.ofbiz.base.start.Start.main(Start.java:399)
>