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

Hasan Muhammad updated TUSCANY-1096:
------------------------------------

    Attachment: reftest.xsd
                ReferenceTestCase.java

Frank,

I have attached the updated Reference test case and schema file. If you want 
to, you can include them.

Hasan

> Exception thrown when reference with many multiplicity to the element of 
> anyType
> --------------------------------------------------------------------------------
>
>                 Key: TUSCANY-1096
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1096
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SDO Implementation
>    Affects Versions: Java-SDO-Mx
>            Reporter: Fuhwei Lwo
>             Fix For: Java-SDO-Mx
>
>         Attachments: ReferenceTestCase.java, ReferenceTestCase.java, 
> reftest.xsd, reftest.xsd
>
>
> In the XSD, a reference is defined like <xsd:element ref="simple:stockQuote2" 
> maxOccurs="unbounded"/> to reference a global element defined like 
> <xsd:element name="stockQuote2" type="xsd:anyType"/>.
> If the global element type is a fixed type or reference doesn't have many 
> multiplicity, it's working. Only the case like above will throw the following 
> exception.
> java.lang.ArrayStoreException
>       at org.eclipse.emf.common.util.BasicEList.assign(BasicEList.java:188)
>       at 
> org.eclipse.emf.common.util.BasicEList.addAllUnique(BasicEList.java:774)
>       at 
> org.eclipse.emf.common.notify.impl.NotifyingListImpl.doAddAllUnique(NotifyingListImpl.java:494)
>       at 
> org.eclipse.emf.common.notify.impl.NotifyingListImpl.addAllUnique(NotifyingListImpl.java:467)
>       at 
> org.eclipse.emf.common.notify.impl.NotifyingListImpl.addAllUnique(NotifyingListImpl.java:396)
>       at org.eclipse.emf.common.util.BasicEList.addAll(BasicEList.java:688)
>       at org.eclipse.emf.ecore.util.EcoreEList.set(EcoreEList.java:448)
>       at 
> org.eclipse.emf.ecore.impl.EStructuralFeatureImpl$InternalSettingDelegateMany.dynamicSet(EStructuralFeatureImpl.java:1647)
>       at 
> org.eclipse.emf.ecore.impl.BasicEObjectImpl.eDynamicSet(BasicEObjectImpl.java:709)
>       at 
> org.apache.tuscany.sdo.impl.DynamicDataObjectImpl.eDynamicSet(DynamicDataObjectImpl.java:159)
>       at 
> org.apache.tuscany.sdo.impl.DataObjectImpl.eSet(DataObjectImpl.java:1450)
>       at 
> org.eclipse.emf.ecore.impl.BasicEObjectImpl.eSet(BasicEObjectImpl.java:654)
>       at 
> org.apache.tuscany.sdo.impl.DataObjectImpl.set(DataObjectImpl.java:143)
>       at 
> org.apache.tuscany.sdo.util.DataObjectUtil.set(DataObjectUtil.java:744)
>       at 
> org.apache.tuscany.sdo.impl.DataObjectImpl.setList(DataObjectImpl.java:536)
>       at 
> org.apache.tuscany.sdo.test.ReferenceTestCase.testDynamic(ReferenceTestCase.java:77)
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
>       at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>       at java.lang.reflect.Method.invoke(Method.java:615)
>       at junit.framework.TestCase.runTest(TestCase.java:154)
>       at junit.framework.TestCase.runBare(TestCase.java:127)
>       at junit.framework.TestResult$1.protect(TestResult.java:106)
>       at junit.framework.TestResult.runProtected(TestResult.java:124)
>       at junit.framework.TestResult.run(TestResult.java:109)
>       at junit.framework.TestCase.run(TestCase.java:118)
>       at junit.framework.TestSuite.runTest(TestSuite.java:208)
>       at junit.framework.TestSuite.run(TestSuite.java:203)
>       at 
> org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128)
>       at 
> org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
>       at 
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
>       at 
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
>       at 
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
>       at 
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to