Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » XML Schema Definition (XSD) » The 'no duplicates' constraint is violated
The 'no duplicates' constraint is violated [message #34246] Wed, 17 December 2003 14:33 Go to next message
Eclipse UserFriend
Originally posted by: niemaz.xrce.xerox.com

I get this error when trying to load an xsd file.
My question is : is there a workaround?
A quick and dirty load?

thanx,

--mike
Re: The 'no duplicates' constraint is violated [message #34312 is a reply to message #34246] Wed, 17 December 2003 14:45 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Mike,

You need to provide more detail, like a stack trace. I'm not a mind
reader...


mike wrote:

> I get this error when trying to load an xsd file.
> My question is : is there a workaround?
> A quick and dirty load?
>
> thanx,
>
> --mike
Re: The 'no duplicates' constraint is violated [message #34380 is a reply to message #34312] Wed, 17 December 2003 15:09 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: niemaz.xrce.xerox.com

Yep sorry, I wasn't quiet sure my message would be read.
Below is the stacktrace.
Seems to be the BasicEList#add method which catches the xsd incorrectness
and
sends the error.

--mike

java.lang.IllegalArgumentException: The 'no duplicates' constraint is
violated
at org.eclipse.emf.common.util.BasicEList.add(BasicEList.java:6 12)
at
org.eclipse.emf.common.util.BasicEList$EListIterator.add(Bas icEList.java:1399)
at
org.eclipse.xsd.impl.XSDNamedComponentImpl.mergeToSortedList (XSDNamedComponentImpl.java:178)
at
org.eclipse.xsd.impl.XSDSchemaImpl.propogateComponents(XSDSc hemaImpl.java:2862)
at
org.eclipse.xsd.impl.XSDSchemaImpl.incorporate(XSDSchemaImpl .java:3027)
at
org.eclipse.xsd.impl.XSDSchemaImpl.included(XSDSchemaImpl.ja va:2946)
at
org.eclipse.xsd.impl.XSDIncludeImpl.handleResolvedSchema(XSD IncludeImpl.java:337)
at
org.eclipse.xsd.impl.XSDSchemaDirectiveImpl.resolve(XSDSchem aDirectiveImpl.java:405)
at
org.eclipse.xsd.impl.XSDIncludeImpl.patch(XSDIncludeImpl.jav a:324)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.patch(XSDConcr eteComponentImpl.java:513)
at
org.eclipse.xsd.impl.XSDSchemaImpl.patch(XSDSchemaImpl.java: 1494)
at
org.eclipse.xsd.impl.XSDSchemaImpl.incorporate(XSDSchemaImpl .java:3025)
at
org.eclipse.xsd.impl.XSDSchemaImpl.included(XSDSchemaImpl.ja va:2946)
at
org.eclipse.xsd.impl.XSDIncludeImpl.handleResolvedSchema(XSD IncludeImpl.java:337)
at
org.eclipse.xsd.impl.XSDSchemaDirectiveImpl.resolve(XSDSchem aDirectiveImpl.java:405)
at
org.eclipse.xsd.impl.XSDIncludeImpl.patch(XSDIncludeImpl.jav a:324)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.patch(XSDConcr eteComponentImpl.java:513)
at
org.eclipse.xsd.impl.XSDSchemaImpl.patch(XSDSchemaImpl.java: 1494)
at
org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2240)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1205)
at
org.eclipse.xsd.impl.XSDSchemaImpl.setSchemaLocation(XSDSche maImpl.java:842)
at
org.eclipse.xsd.util.XSDResourceImpl.attached(XSDResourceImp l.java:410)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl$ContentsELi st.inverseAdd(ResourceImpl.java:326)
at
org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:233)
at org.eclipse.emf.common.util.BasicEList.add(BasicEList.java:5 70)
at
org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:374)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:881)
at
org.eclipse.xsd.impl.XSDSchemaDirectiveImpl.resolve(XSDSchem aDirectiveImpl.java:380)
at
org.eclipse.xsd.impl.XSDIncludeImpl.patch(XSDIncludeImpl.jav a:324)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.patch(XSDConcr eteComponentImpl.java:513)
at
org.eclipse.xsd.impl.XSDSchemaImpl.patch(XSDSchemaImpl.java: 1494)
at
org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2240)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1205)
at
org.eclipse.xsd.impl.XSDSchemaImpl.setSchemaLocation(XSDSche maImpl.java:842)
at
org.eclipse.xsd.util.XSDResourceImpl.attached(XSDResourceImp l.java:410)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl$ContentsELi st.inverseAdd(ResourceImpl.java:326)
at
org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:233)
at org.eclipse.emf.common.util.BasicEList.add(BasicEList.java:5 70)
at
org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:374)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:881)
at
org.eclipse.xsd.impl.XSDSchemaDirectiveImpl.resolve(XSDSchem aDirectiveImpl.java:380)
at
org.eclipse.xsd.impl.XSDIncludeImpl.patch(XSDIncludeImpl.jav a:324)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.patch(XSDConcr eteComponentImpl.java:513)
at
org.eclipse.xsd.impl.XSDSchemaImpl.patch(XSDSchemaImpl.java: 1494)
at
org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2240)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1205)
at
org.eclipse.xsd.impl.XSDSchemaImpl.setSchemaLocation(XSDSche maImpl.java:842)
at
org.eclipse.xsd.util.XSDResourceImpl.attached(XSDResourceImp l.java:410)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl$ContentsELi st.inverseAdd(ResourceImpl.java:326)
at
org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:233)
at org.eclipse.emf.common.util.BasicEList.add(BasicEList.java:5 70)
at
org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:374)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:881)
at
org.eclipse.xsd.impl.XSDSchemaDirectiveImpl.resolve(XSDSchem aDirectiveImpl.java:380)
at
org.eclipse.xsd.impl.XSDIncludeImpl.patch(XSDIncludeImpl.jav a:324)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.patch(XSDConcr eteComponentImpl.java:513)
at
org.eclipse.xsd.impl.XSDSchemaImpl.patch(XSDSchemaImpl.java: 1494)
at
org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2240)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1205)
at
org.eclipse.xsd.impl.XSDSchemaImpl.setSchemaLocation(XSDSche maImpl.java:842)
at
org.eclipse.xsd.util.XSDResourceImpl.attached(XSDResourceImp l.java:410)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl$ContentsELi st.inverseAdd(ResourceImpl.java:326)
at
org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:233)
at org.eclipse.emf.common.util.BasicEList.add(BasicEList.java:5 70)
at
org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:374)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:881)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:755)
at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:220)
at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:286)

Ed Merks wrote:

> Mike,

> You need to provide more detail, like a stack trace. I'm not a mind
> reader...


> mike wrote:

> > I get this error when trying to load an xsd file.
> > My question is : is there a workaround?
> > A quick and dirty load?
> >
> > thanx,
> >
> > --mike
Re: The 'no duplicates' constraint is violated [message #34450 is a reply to message #34380] Wed, 17 December 2003 15:48 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Mike,

Hmmm. There's some interesting include stuff going on here. Could you share the schemas that
produce this problem? If I have a working (i.e., failing) test case, I can get to the bottom of it
quickly...


mike wrote:

> Yep sorry, I wasn't quiet sure my message would be read.
> Below is the stacktrace.
> Seems to be the BasicEList#add method which catches the xsd incorrectness
> and
> sends the error.
>
> --mike
>
> java.lang.IllegalArgumentException: The 'no duplicates' constraint is
> violated
> at org.eclipse.emf.common.util.BasicEList.add(BasicEList.java:6 12)
> at
> org.eclipse.emf.common.util.BasicEList$EListIterator.add(Bas icEList.java:1399)
> at
> org.eclipse.xsd.impl.XSDNamedComponentImpl.mergeToSortedList (XSDNamedComponentImpl.java:178)
> at
> org.eclipse.xsd.impl.XSDSchemaImpl.propogateComponents(XSDSc hemaImpl.java:2862)
> at
> org.eclipse.xsd.impl.XSDSchemaImpl.incorporate(XSDSchemaImpl .java:3027)
> at
> org.eclipse.xsd.impl.XSDSchemaImpl.included(XSDSchemaImpl.ja va:2946)
> at
> org.eclipse.xsd.impl.XSDIncludeImpl.handleResolvedSchema(XSD IncludeImpl.java:337)
> at
> org.eclipse.xsd.impl.XSDSchemaDirectiveImpl.resolve(XSDSchem aDirectiveImpl.java:405)
> at
> org.eclipse.xsd.impl.XSDIncludeImpl.patch(XSDIncludeImpl.jav a:324)
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.patch(XSDConcr eteComponentImpl.java:513)
> at
> org.eclipse.xsd.impl.XSDSchemaImpl.patch(XSDSchemaImpl.java: 1494)
> at
> org.eclipse.xsd.impl.XSDSchemaImpl.incorporate(XSDSchemaImpl .java:3025)
> at
> org.eclipse.xsd.impl.XSDSchemaImpl.included(XSDSchemaImpl.ja va:2946)
> at
> org.eclipse.xsd.impl.XSDIncludeImpl.handleResolvedSchema(XSD IncludeImpl.java:337)
> at
> org.eclipse.xsd.impl.XSDSchemaDirectiveImpl.resolve(XSDSchem aDirectiveImpl.java:405)
> at
> org.eclipse.xsd.impl.XSDIncludeImpl.patch(XSDIncludeImpl.jav a:324)
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.patch(XSDConcr eteComponentImpl.java:513)
> at
> org.eclipse.xsd.impl.XSDSchemaImpl.patch(XSDSchemaImpl.java: 1494)
> at
> org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2240)
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1205)
> at
> org.eclipse.xsd.impl.XSDSchemaImpl.setSchemaLocation(XSDSche maImpl.java:842)
> at
> org.eclipse.xsd.util.XSDResourceImpl.attached(XSDResourceImp l.java:410)
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl$ContentsELi st.inverseAdd(ResourceImpl.java:326)
> at
> org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:233)
> at org.eclipse.emf.common.util.BasicEList.add(BasicEList.java:5 70)
> at
> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:374)
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:881)
> at
> org.eclipse.xsd.impl.XSDSchemaDirectiveImpl.resolve(XSDSchem aDirectiveImpl.java:380)
> at
> org.eclipse.xsd.impl.XSDIncludeImpl.patch(XSDIncludeImpl.jav a:324)
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.patch(XSDConcr eteComponentImpl.java:513)
> at
> org.eclipse.xsd.impl.XSDSchemaImpl.patch(XSDSchemaImpl.java: 1494)
> at
> org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2240)
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1205)
> at
> org.eclipse.xsd.impl.XSDSchemaImpl.setSchemaLocation(XSDSche maImpl.java:842)
> at
> org.eclipse.xsd.util.XSDResourceImpl.attached(XSDResourceImp l.java:410)
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl$ContentsELi st.inverseAdd(ResourceImpl.java:326)
> at
> org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:233)
> at org.eclipse.emf.common.util.BasicEList.add(BasicEList.java:5 70)
> at
> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:374)
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:881)
> at
> org.eclipse.xsd.impl.XSDSchemaDirectiveImpl.resolve(XSDSchem aDirectiveImpl.java:380)
> at
> org.eclipse.xsd.impl.XSDIncludeImpl.patch(XSDIncludeImpl.jav a:324)
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.patch(XSDConcr eteComponentImpl.java:513)
> at
> org.eclipse.xsd.impl.XSDSchemaImpl.patch(XSDSchemaImpl.java: 1494)
> at
> org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2240)
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1205)
> at
> org.eclipse.xsd.impl.XSDSchemaImpl.setSchemaLocation(XSDSche maImpl.java:842)
> at
> org.eclipse.xsd.util.XSDResourceImpl.attached(XSDResourceImp l.java:410)
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl$ContentsELi st.inverseAdd(ResourceImpl.java:326)
> at
> org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:233)
> at org.eclipse.emf.common.util.BasicEList.add(BasicEList.java:5 70)
> at
> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:374)
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:881)
> at
> org.eclipse.xsd.impl.XSDSchemaDirectiveImpl.resolve(XSDSchem aDirectiveImpl.java:380)
> at
> org.eclipse.xsd.impl.XSDIncludeImpl.patch(XSDIncludeImpl.jav a:324)
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.patch(XSDConcr eteComponentImpl.java:513)
> at
> org.eclipse.xsd.impl.XSDSchemaImpl.patch(XSDSchemaImpl.java: 1494)
> at
> org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2240)
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1205)
> at
> org.eclipse.xsd.impl.XSDSchemaImpl.setSchemaLocation(XSDSche maImpl.java:842)
> at
> org.eclipse.xsd.util.XSDResourceImpl.attached(XSDResourceImp l.java:410)
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl$ContentsELi st.inverseAdd(ResourceImpl.java:326)
> at
> org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:233)
> at org.eclipse.emf.common.util.BasicEList.add(BasicEList.java:5 70)
> at
> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:374)
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:881)
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:755)
> at
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:220)
> at
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:286)
>
> Ed Merks wrote:
>
> > Mike,
>
> > You need to provide more detail, like a stack trace. I'm not a mind
> > reader...
>
> > mike wrote:
>
> > > I get this error when trying to load an xsd file.
> > > My question is : is there a workaround?
> > > A quick and dirty load?
> > >
> > > thanx,
> > >
> > > --mike
Re: The 'no duplicates' constraint is violated [message #34484 is a reply to message #34450] Wed, 17 December 2003 16:03 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: niemaz.xrce.xerox.com

I'm afraid I can't share this one, but I'll try to isolate the problem and
create a test file from it.

--mike

Ed Merks wrote:

> Mike,

> Hmmm. There's some interesting include stuff going on here. Could you
share the schemas that
> produce this problem? If I have a working (i.e., failing) test case, I can
get to the bottom of it
> quickly...


> mike wrote:

> > Yep sorry, I wasn't quiet sure my message would be read.
> > Below is the stacktrace.
> > Seems to be the BasicEList#add method which catches the xsd incorrectness
> > and
> > sends the error.
> >
> > --mike
> >
> > java.lang.IllegalArgumentException: The 'no duplicates' constraint is
> > violated
> > at org.eclipse.emf.common.util.BasicEList.add(BasicEList.java:6 12)
> > at
> >
org.eclipse.emf.common.util.BasicEList$EListIterator.add(Bas icEList.java:1399)
> > at
> >
org.eclipse.xsd.impl.XSDNamedComponentImpl.mergeToSortedList (XSDNamedComponentImpl.java:178)
> > at
> >
org.eclipse.xsd.impl.XSDSchemaImpl.propogateComponents(XSDSc hemaImpl.java:2862)
> > at
> > org.eclipse.xsd.impl.XSDSchemaImpl.incorporate(XSDSchemaImpl .java:3027)
> > at
> > org.eclipse.xsd.impl.XSDSchemaImpl.included(XSDSchemaImpl.ja va:2946)
> > at
> >
org.eclipse.xsd.impl.XSDIncludeImpl.handleResolvedSchema(XSD IncludeImpl.java:337)
> > at
> >
org.eclipse.xsd.impl.XSDSchemaDirectiveImpl.resolve(XSDSchem aDirectiveImpl.java:405)
> > at
> > org.eclipse.xsd.impl.XSDIncludeImpl.patch(XSDIncludeImpl.jav a:324)
> > at
> >
org.eclipse.xsd.impl.XSDConcreteComponentImpl.patch(XSDConcr eteComponentImpl.java:513)
> > at
> > org.eclipse.xsd.impl.XSDSchemaImpl.patch(XSDSchemaImpl.java: 1494)
> > at
> > org.eclipse.xsd.impl.XSDSchemaImpl.incorporate(XSDSchemaImpl .java:3025)
> > at
> > org.eclipse.xsd.impl.XSDSchemaImpl.included(XSDSchemaImpl.ja va:2946)
> > at
> >
org.eclipse.xsd.impl.XSDIncludeImpl.handleResolvedSchema(XSD IncludeImpl.java:337)
> > at
> >
org.eclipse.xsd.impl.XSDSchemaDirectiveImpl.resolve(XSDSchem aDirectiveImpl.java:405)
> > at
> > org.eclipse.xsd.impl.XSDIncludeImpl.patch(XSDIncludeImpl.jav a:324)
> > at
> >
org.eclipse.xsd.impl.XSDConcreteComponentImpl.patch(XSDConcr eteComponentImpl.java:513)
> > at
> > org.eclipse.xsd.impl.XSDSchemaImpl.patch(XSDSchemaImpl.java: 1494)
> > at
> > org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2240)
> > at
> >
org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1205)
> > at
> >
org.eclipse.xsd.impl.XSDSchemaImpl.setSchemaLocation(XSDSche maImpl.java:842)
> > at
> > org.eclipse.xsd.util.XSDResourceImpl.attached(XSDResourceImp l.java:410)
> > at
> >
org.eclipse.emf.ecore.resource.impl.ResourceImpl$ContentsELi st.inverseAdd(ResourceImpl.java:326)
> > at
> >
org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:233)
> > at org.eclipse.emf.common.util.BasicEList.add(BasicEList.java:5 70)
> > at
> > org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:374)
> > at
> >
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:881)
> > at
> >
org.eclipse.xsd.impl.XSDSchemaDirectiveImpl.resolve(XSDSchem aDirectiveImpl.java:380)
> > at
> > org.eclipse.xsd.impl.XSDIncludeImpl.patch(XSDIncludeImpl.jav a:324)
> > at
> >
org.eclipse.xsd.impl.XSDConcreteComponentImpl.patch(XSDConcr eteComponentImpl.java:513)
> > at
> > org.eclipse.xsd.impl.XSDSchemaImpl.patch(XSDSchemaImpl.java: 1494)
> > at
> > org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2240)
> > at
> >
org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1205)
> > at
> >
org.eclipse.xsd.impl.XSDSchemaImpl.setSchemaLocation(XSDSche maImpl.java:842)
> > at
> > org.eclipse.xsd.util.XSDResourceImpl.attached(XSDResourceImp l.java:410)
> > at
> >
org.eclipse.emf.ecore.resource.impl.ResourceImpl$ContentsELi st.inverseAdd(ResourceImpl.java:326)
> > at
> >
org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:233)
> > at org.eclipse.emf.common.util.BasicEList.add(BasicEList.java:5 70)
> > at
> > org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:374)
> > at
> >
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:881)
> > at
> >
org.eclipse.xsd.impl.XSDSchemaDirectiveImpl.resolve(XSDSchem aDirectiveImpl.java:380)
> > at
> > org.eclipse.xsd.impl.XSDIncludeImpl.patch(XSDIncludeImpl.jav a:324)
> > at
> >
org.eclipse.xsd.impl.XSDConcreteComponentImpl.patch(XSDConcr eteComponentImpl.java:513)
> > at
> > org.eclipse.xsd.impl.XSDSchemaImpl.patch(XSDSchemaImpl.java: 1494)
> > at
> > org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2240)
> > at
> >
org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1205)
> > at
> >
org.eclipse.xsd.impl.XSDSchemaImpl.setSchemaLocation(XSDSche maImpl.java:842)
> > at
> > org.eclipse.xsd.util.XSDResourceImpl.attached(XSDResourceImp l.java:410)
> > at
> >
org.eclipse.emf.ecore.resource.impl.ResourceImpl$ContentsELi st.inverseAdd(ResourceImpl.java:326)
> > at
> >
org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:233)
> > at org.eclipse.emf.common.util.BasicEList.add(BasicEList.java:5 70)
> > at
> > org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:374)
> > at
> >
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:881)
> > at
> >
org.eclipse.xsd.impl.XSDSchemaDirectiveImpl.resolve(XSDSchem aDirectiveImpl.java:380)
> > at
> > org.eclipse.xsd.impl.XSDIncludeImpl.patch(XSDIncludeImpl.jav a:324)
> > at
> >
org.eclipse.xsd.impl.XSDConcreteComponentImpl.patch(XSDConcr eteComponentImpl.java:513)
> > at
> > org.eclipse.xsd.impl.XSDSchemaImpl.patch(XSDSchemaImpl.java: 1494)
> > at
> > org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2240)
> > at
> >
org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1205)
> > at
> >
org.eclipse.xsd.impl.XSDSchemaImpl.setSchemaLocation(XSDSche maImpl.java:842)
> > at
> > org.eclipse.xsd.util.XSDResourceImpl.attached(XSDResourceImp l.java:410)
> > at
> >
org.eclipse.emf.ecore.resource.impl.ResourceImpl$ContentsELi st.inverseAdd(ResourceImpl.java:326)
> > at
> >
org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:233)
> > at org.eclipse.emf.common.util.BasicEList.add(BasicEList.java:5 70)
> > at
> > org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:374)
> > at
> >
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:881)
> > at
> >
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:755)
> > at
> >
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:220)
> > at
> >
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:286)
> >
> > Ed Merks wrote:
> >
> > > Mike,
> >
> > > You need to provide more detail, like a stack trace. I'm not a mind
> > > reader...
> >
> > > mike wrote:
> >
> > > > I get this error when trying to load an xsd file.
> > > > My question is : is there a workaround?
> > > > A quick and dirty load?
> > > >
> > > > thanx,
> > > >
> > > > --mike
Re: The 'no duplicates' constraint is violated [message #34517 is a reply to message #34484] Wed, 17 December 2003 16:11 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Mike,

That would be much appreciated. I may be able to fix this for the 2.0 drop later this week if you
act quickly. ;-)

mike wrote:

> I'm afraid I can't share this one, but I'll try to isolate the problem and
> create a test file from it.
>
> --mike
>
> Ed Merks wrote:
>
> > Mike,
>
> > Hmmm. There's some interesting include stuff going on here. Could you
> share the schemas that
> > produce this problem? If I have a working (i.e., failing) test case, I can
> get to the bottom of it
> > quickly...
>
> > mike wrote:
>
> > > Yep sorry, I wasn't quiet sure my message would be read.
> > > Below is the stacktrace.
> > > Seems to be the BasicEList#add method which catches the xsd incorrectness
> > > and
> > > sends the error.
> > >
> > > --mike
> > >
> > > java.lang.IllegalArgumentException: The 'no duplicates' constraint is
> > > violated
> > > at org.eclipse.emf.common.util.BasicEList.add(BasicEList.java:6 12)
> > > at
> > >
> org.eclipse.emf.common.util.BasicEList$EListIterator.add(Bas icEList.java:1399)
> > > at
> > >
> org.eclipse.xsd.impl.XSDNamedComponentImpl.mergeToSortedList (XSDNamedComponentImpl.java:178)
> > > at
> > >
> org.eclipse.xsd.impl.XSDSchemaImpl.propogateComponents(XSDSc hemaImpl.java:2862)
> > > at
> > > org.eclipse.xsd.impl.XSDSchemaImpl.incorporate(XSDSchemaImpl .java:3027)
> > > at
> > > org.eclipse.xsd.impl.XSDSchemaImpl.included(XSDSchemaImpl.ja va:2946)
> > > at
> > >
> org.eclipse.xsd.impl.XSDIncludeImpl.handleResolvedSchema(XSD IncludeImpl.java:337)
> > > at
> > >
> org.eclipse.xsd.impl.XSDSchemaDirectiveImpl.resolve(XSDSchem aDirectiveImpl.java:405)
> > > at
> > > org.eclipse.xsd.impl.XSDIncludeImpl.patch(XSDIncludeImpl.jav a:324)
> > > at
> > >
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.patch(XSDConcr eteComponentImpl.java:513)
> > > at
> > > org.eclipse.xsd.impl.XSDSchemaImpl.patch(XSDSchemaImpl.java: 1494)
> > > at
> > > org.eclipse.xsd.impl.XSDSchemaImpl.incorporate(XSDSchemaImpl .java:3025)
> > > at
> > > org.eclipse.xsd.impl.XSDSchemaImpl.included(XSDSchemaImpl.ja va:2946)
> > > at
> > >
> org.eclipse.xsd.impl.XSDIncludeImpl.handleResolvedSchema(XSD IncludeImpl.java:337)
> > > at
> > >
> org.eclipse.xsd.impl.XSDSchemaDirectiveImpl.resolve(XSDSchem aDirectiveImpl.java:405)
> > > at
> > > org.eclipse.xsd.impl.XSDIncludeImpl.patch(XSDIncludeImpl.jav a:324)
> > > at
> > >
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.patch(XSDConcr eteComponentImpl.java:513)
> > > at
> > > org.eclipse.xsd.impl.XSDSchemaImpl.patch(XSDSchemaImpl.java: 1494)
> > > at
> > > org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2240)
> > > at
> > >
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1205)
> > > at
> > >
> org.eclipse.xsd.impl.XSDSchemaImpl.setSchemaLocation(XSDSche maImpl.java:842)
> > > at
> > > org.eclipse.xsd.util.XSDResourceImpl.attached(XSDResourceImp l.java:410)
> > > at
> > >
> org.eclipse.emf.ecore.resource.impl.ResourceImpl$ContentsELi st.inverseAdd(ResourceImpl.java:326)
> > > at
> > >
> org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:233)
> > > at org.eclipse.emf.common.util.BasicEList.add(BasicEList.java:5 70)
> > > at
> > > org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:374)
> > > at
> > >
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:881)
> > > at
> > >
> org.eclipse.xsd.impl.XSDSchemaDirectiveImpl.resolve(XSDSchem aDirectiveImpl.java:380)
> > > at
> > > org.eclipse.xsd.impl.XSDIncludeImpl.patch(XSDIncludeImpl.jav a:324)
> > > at
> > >
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.patch(XSDConcr eteComponentImpl.java:513)
> > > at
> > > org.eclipse.xsd.impl.XSDSchemaImpl.patch(XSDSchemaImpl.java: 1494)
> > > at
> > > org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2240)
> > > at
> > >
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1205)
> > > at
> > >
> org.eclipse.xsd.impl.XSDSchemaImpl.setSchemaLocation(XSDSche maImpl.java:842)
> > > at
> > > org.eclipse.xsd.util.XSDResourceImpl.attached(XSDResourceImp l.java:410)
> > > at
> > >
> org.eclipse.emf.ecore.resource.impl.ResourceImpl$ContentsELi st.inverseAdd(ResourceImpl.java:326)
> > > at
> > >
> org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:233)
> > > at org.eclipse.emf.common.util.BasicEList.add(BasicEList.java:5 70)
> > > at
> > > org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:374)
> > > at
> > >
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:881)
> > > at
> > >
> org.eclipse.xsd.impl.XSDSchemaDirectiveImpl.resolve(XSDSchem aDirectiveImpl.java:380)
> > > at
> > > org.eclipse.xsd.impl.XSDIncludeImpl.patch(XSDIncludeImpl.jav a:324)
> > > at
> > >
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.patch(XSDConcr eteComponentImpl.java:513)
> > > at
> > > org.eclipse.xsd.impl.XSDSchemaImpl.patch(XSDSchemaImpl.java: 1494)
> > > at
> > > org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2240)
> > > at
> > >
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1205)
> > > at
> > >
> org.eclipse.xsd.impl.XSDSchemaImpl.setSchemaLocation(XSDSche maImpl.java:842)
> > > at
> > > org.eclipse.xsd.util.XSDResourceImpl.attached(XSDResourceImp l.java:410)
> > > at
> > >
> org.eclipse.emf.ecore.resource.impl.ResourceImpl$ContentsELi st.inverseAdd(ResourceImpl.java:326)
> > > at
> > >
> org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:233)
> > > at org.eclipse.emf.common.util.BasicEList.add(BasicEList.java:5 70)
> > > at
> > > org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:374)
> > > at
> > >
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:881)
> > > at
> > >
> org.eclipse.xsd.impl.XSDSchemaDirectiveImpl.resolve(XSDSchem aDirectiveImpl.java:380)
> > > at
> > > org.eclipse.xsd.impl.XSDIncludeImpl.patch(XSDIncludeImpl.jav a:324)
> > > at
> > >
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.patch(XSDConcr eteComponentImpl.java:513)
> > > at
> > > org.eclipse.xsd.impl.XSDSchemaImpl.patch(XSDSchemaImpl.java: 1494)
> > > at
> > > org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2240)
> > > at
> > >
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1205)
> > > at
> > >
> org.eclipse.xsd.impl.XSDSchemaImpl.setSchemaLocation(XSDSche maImpl.java:842)
> > > at
> > > org.eclipse.xsd.util.XSDResourceImpl.attached(XSDResourceImp l.java:410)
> > > at
> > >
> org.eclipse.emf.ecore.resource.impl.ResourceImpl$ContentsELi st.inverseAdd(ResourceImpl.java:326)
> > > at
> > >
> org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:233)
> > > at org.eclipse.emf.common.util.BasicEList.add(BasicEList.java:5 70)
> > > at
> > > org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:374)
> > > at
> > >
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:881)
> > > at
> > >
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:755)
> > > at
> > >
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:220)
> > > at
> > >
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:286)
> > >
> > > Ed Merks wrote:
> > >
> > > > Mike,
> > >
> > > > You need to provide more detail, like a stack trace. I'm not a mind
> > > > reader...
> > >
> > > > mike wrote:
> > >
> > > > > I get this error when trying to load an xsd file.
> > > > > My question is : is there a workaround?
> > > > > A quick and dirty load?
> > > > >
> > > > > thanx,
> > > > >
> > > > > --mike
Re: The 'no duplicates' constraint is violated [message #581675 is a reply to message #34246] Wed, 17 December 2003 14:45 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
Mike,

You need to provide more detail, like a stack trace. I'm not a mind
reader...


mike wrote:

> I get this error when trying to load an xsd file.
> My question is : is there a workaround?
> A quick and dirty load?
>
> thanx,
>
> --mike


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: The 'no duplicates' constraint is violated [message #581765 is a reply to message #34312] Wed, 17 December 2003 15:09 Go to previous messageGo to next message
mike is currently offline mikeFriend
Messages: 35
Registered: July 2009
Member
Yep sorry, I wasn't quiet sure my message would be read.
Below is the stacktrace.
Seems to be the BasicEList#add method which catches the xsd incorrectness
and
sends the error.

--mike

java.lang.IllegalArgumentException: The 'no duplicates' constraint is
violated
at org.eclipse.emf.common.util.BasicEList.add(BasicEList.java:6 12)
at
org.eclipse.emf.common.util.BasicEList$EListIterator.add(Bas icEList.java:1399)
at
org.eclipse.xsd.impl.XSDNamedComponentImpl.mergeToSortedList (XSDNamedComponentImpl.java:178)
at
org.eclipse.xsd.impl.XSDSchemaImpl.propogateComponents(XSDSc hemaImpl.java:2862)
at
org.eclipse.xsd.impl.XSDSchemaImpl.incorporate(XSDSchemaImpl .java:3027)
at
org.eclipse.xsd.impl.XSDSchemaImpl.included(XSDSchemaImpl.ja va:2946)
at
org.eclipse.xsd.impl.XSDIncludeImpl.handleResolvedSchema(XSD IncludeImpl.java:337)
at
org.eclipse.xsd.impl.XSDSchemaDirectiveImpl.resolve(XSDSchem aDirectiveImpl.java:405)
at
org.eclipse.xsd.impl.XSDIncludeImpl.patch(XSDIncludeImpl.jav a:324)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.patch(XSDConcr eteComponentImpl.java:513)
at
org.eclipse.xsd.impl.XSDSchemaImpl.patch(XSDSchemaImpl.java: 1494)
at
org.eclipse.xsd.impl.XSDSchemaImpl.incorporate(XSDSchemaImpl .java:3025)
at
org.eclipse.xsd.impl.XSDSchemaImpl.included(XSDSchemaImpl.ja va:2946)
at
org.eclipse.xsd.impl.XSDIncludeImpl.handleResolvedSchema(XSD IncludeImpl.java:337)
at
org.eclipse.xsd.impl.XSDSchemaDirectiveImpl.resolve(XSDSchem aDirectiveImpl.java:405)
at
org.eclipse.xsd.impl.XSDIncludeImpl.patch(XSDIncludeImpl.jav a:324)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.patch(XSDConcr eteComponentImpl.java:513)
at
org.eclipse.xsd.impl.XSDSchemaImpl.patch(XSDSchemaImpl.java: 1494)
at
org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2240)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1205)
at
org.eclipse.xsd.impl.XSDSchemaImpl.setSchemaLocation(XSDSche maImpl.java:842)
at
org.eclipse.xsd.util.XSDResourceImpl.attached(XSDResourceImp l.java:410)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl$ContentsELi st.inverseAdd(ResourceImpl.java:326)
at
org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:233)
at org.eclipse.emf.common.util.BasicEList.add(BasicEList.java:5 70)
at
org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:374)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:881)
at
org.eclipse.xsd.impl.XSDSchemaDirectiveImpl.resolve(XSDSchem aDirectiveImpl.java:380)
at
org.eclipse.xsd.impl.XSDIncludeImpl.patch(XSDIncludeImpl.jav a:324)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.patch(XSDConcr eteComponentImpl.java:513)
at
org.eclipse.xsd.impl.XSDSchemaImpl.patch(XSDSchemaImpl.java: 1494)
at
org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2240)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1205)
at
org.eclipse.xsd.impl.XSDSchemaImpl.setSchemaLocation(XSDSche maImpl.java:842)
at
org.eclipse.xsd.util.XSDResourceImpl.attached(XSDResourceImp l.java:410)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl$ContentsELi st.inverseAdd(ResourceImpl.java:326)
at
org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:233)
at org.eclipse.emf.common.util.BasicEList.add(BasicEList.java:5 70)
at
org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:374)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:881)
at
org.eclipse.xsd.impl.XSDSchemaDirectiveImpl.resolve(XSDSchem aDirectiveImpl.java:380)
at
org.eclipse.xsd.impl.XSDIncludeImpl.patch(XSDIncludeImpl.jav a:324)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.patch(XSDConcr eteComponentImpl.java:513)
at
org.eclipse.xsd.impl.XSDSchemaImpl.patch(XSDSchemaImpl.java: 1494)
at
org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2240)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1205)
at
org.eclipse.xsd.impl.XSDSchemaImpl.setSchemaLocation(XSDSche maImpl.java:842)
at
org.eclipse.xsd.util.XSDResourceImpl.attached(XSDResourceImp l.java:410)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl$ContentsELi st.inverseAdd(ResourceImpl.java:326)
at
org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:233)
at org.eclipse.emf.common.util.BasicEList.add(BasicEList.java:5 70)
at
org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:374)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:881)
at
org.eclipse.xsd.impl.XSDSchemaDirectiveImpl.resolve(XSDSchem aDirectiveImpl.java:380)
at
org.eclipse.xsd.impl.XSDIncludeImpl.patch(XSDIncludeImpl.jav a:324)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.patch(XSDConcr eteComponentImpl.java:513)
at
org.eclipse.xsd.impl.XSDSchemaImpl.patch(XSDSchemaImpl.java: 1494)
at
org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2240)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1205)
at
org.eclipse.xsd.impl.XSDSchemaImpl.setSchemaLocation(XSDSche maImpl.java:842)
at
org.eclipse.xsd.util.XSDResourceImpl.attached(XSDResourceImp l.java:410)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl$ContentsELi st.inverseAdd(ResourceImpl.java:326)
at
org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:233)
at org.eclipse.emf.common.util.BasicEList.add(BasicEList.java:5 70)
at
org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:374)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:881)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:755)
at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:220)
at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:286)

Ed Merks wrote:

> Mike,

> You need to provide more detail, like a stack trace. I'm not a mind
> reader...


> mike wrote:

> > I get this error when trying to load an xsd file.
> > My question is : is there a workaround?
> > A quick and dirty load?
> >
> > thanx,
> >
> > --mike
Re: The 'no duplicates' constraint is violated [message #581831 is a reply to message #34380] Wed, 17 December 2003 15:48 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
Mike,

Hmmm. There's some interesting include stuff going on here. Could you share the schemas that
produce this problem? If I have a working (i.e., failing) test case, I can get to the bottom of it
quickly...


mike wrote:

> Yep sorry, I wasn't quiet sure my message would be read.
> Below is the stacktrace.
> Seems to be the BasicEList#add method which catches the xsd incorrectness
> and
> sends the error.
>
> --mike
>
> java.lang.IllegalArgumentException: The 'no duplicates' constraint is
> violated
> at org.eclipse.emf.common.util.BasicEList.add(BasicEList.java:6 12)
> at
> org.eclipse.emf.common.util.BasicEList$EListIterator.add(Bas icEList.java:1399)
> at
> org.eclipse.xsd.impl.XSDNamedComponentImpl.mergeToSortedList (XSDNamedComponentImpl.java:178)
> at
> org.eclipse.xsd.impl.XSDSchemaImpl.propogateComponents(XSDSc hemaImpl.java:2862)
> at
> org.eclipse.xsd.impl.XSDSchemaImpl.incorporate(XSDSchemaImpl .java:3027)
> at
> org.eclipse.xsd.impl.XSDSchemaImpl.included(XSDSchemaImpl.ja va:2946)
> at
> org.eclipse.xsd.impl.XSDIncludeImpl.handleResolvedSchema(XSD IncludeImpl.java:337)
> at
> org.eclipse.xsd.impl.XSDSchemaDirectiveImpl.resolve(XSDSchem aDirectiveImpl.java:405)
> at
> org.eclipse.xsd.impl.XSDIncludeImpl.patch(XSDIncludeImpl.jav a:324)
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.patch(XSDConcr eteComponentImpl.java:513)
> at
> org.eclipse.xsd.impl.XSDSchemaImpl.patch(XSDSchemaImpl.java: 1494)
> at
> org.eclipse.xsd.impl.XSDSchemaImpl.incorporate(XSDSchemaImpl .java:3025)
> at
> org.eclipse.xsd.impl.XSDSchemaImpl.included(XSDSchemaImpl.ja va:2946)
> at
> org.eclipse.xsd.impl.XSDIncludeImpl.handleResolvedSchema(XSD IncludeImpl.java:337)
> at
> org.eclipse.xsd.impl.XSDSchemaDirectiveImpl.resolve(XSDSchem aDirectiveImpl.java:405)
> at
> org.eclipse.xsd.impl.XSDIncludeImpl.patch(XSDIncludeImpl.jav a:324)
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.patch(XSDConcr eteComponentImpl.java:513)
> at
> org.eclipse.xsd.impl.XSDSchemaImpl.patch(XSDSchemaImpl.java: 1494)
> at
> org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2240)
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1205)
> at
> org.eclipse.xsd.impl.XSDSchemaImpl.setSchemaLocation(XSDSche maImpl.java:842)
> at
> org.eclipse.xsd.util.XSDResourceImpl.attached(XSDResourceImp l.java:410)
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl$ContentsELi st.inverseAdd(ResourceImpl.java:326)
> at
> org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:233)
> at org.eclipse.emf.common.util.BasicEList.add(BasicEList.java:5 70)
> at
> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:374)
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:881)
> at
> org.eclipse.xsd.impl.XSDSchemaDirectiveImpl.resolve(XSDSchem aDirectiveImpl.java:380)
> at
> org.eclipse.xsd.impl.XSDIncludeImpl.patch(XSDIncludeImpl.jav a:324)
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.patch(XSDConcr eteComponentImpl.java:513)
> at
> org.eclipse.xsd.impl.XSDSchemaImpl.patch(XSDSchemaImpl.java: 1494)
> at
> org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2240)
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1205)
> at
> org.eclipse.xsd.impl.XSDSchemaImpl.setSchemaLocation(XSDSche maImpl.java:842)
> at
> org.eclipse.xsd.util.XSDResourceImpl.attached(XSDResourceImp l.java:410)
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl$ContentsELi st.inverseAdd(ResourceImpl.java:326)
> at
> org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:233)
> at org.eclipse.emf.common.util.BasicEList.add(BasicEList.java:5 70)
> at
> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:374)
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:881)
> at
> org.eclipse.xsd.impl.XSDSchemaDirectiveImpl.resolve(XSDSchem aDirectiveImpl.java:380)
> at
> org.eclipse.xsd.impl.XSDIncludeImpl.patch(XSDIncludeImpl.jav a:324)
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.patch(XSDConcr eteComponentImpl.java:513)
> at
> org.eclipse.xsd.impl.XSDSchemaImpl.patch(XSDSchemaImpl.java: 1494)
> at
> org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2240)
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1205)
> at
> org.eclipse.xsd.impl.XSDSchemaImpl.setSchemaLocation(XSDSche maImpl.java:842)
> at
> org.eclipse.xsd.util.XSDResourceImpl.attached(XSDResourceImp l.java:410)
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl$ContentsELi st.inverseAdd(ResourceImpl.java:326)
> at
> org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:233)
> at org.eclipse.emf.common.util.BasicEList.add(BasicEList.java:5 70)
> at
> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:374)
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:881)
> at
> org.eclipse.xsd.impl.XSDSchemaDirectiveImpl.resolve(XSDSchem aDirectiveImpl.java:380)
> at
> org.eclipse.xsd.impl.XSDIncludeImpl.patch(XSDIncludeImpl.jav a:324)
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.patch(XSDConcr eteComponentImpl.java:513)
> at
> org.eclipse.xsd.impl.XSDSchemaImpl.patch(XSDSchemaImpl.java: 1494)
> at
> org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2240)
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1205)
> at
> org.eclipse.xsd.impl.XSDSchemaImpl.setSchemaLocation(XSDSche maImpl.java:842)
> at
> org.eclipse.xsd.util.XSDResourceImpl.attached(XSDResourceImp l.java:410)
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl$ContentsELi st.inverseAdd(ResourceImpl.java:326)
> at
> org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:233)
> at org.eclipse.emf.common.util.BasicEList.add(BasicEList.java:5 70)
> at
> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:374)
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:881)
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:755)
> at
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:220)
> at
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:286)
>
> Ed Merks wrote:
>
> > Mike,
>
> > You need to provide more detail, like a stack trace. I'm not a mind
> > reader...
>
> > mike wrote:
>
> > > I get this error when trying to load an xsd file.
> > > My question is : is there a workaround?
> > > A quick and dirty load?
> > >
> > > thanx,
> > >
> > > --mike


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: The 'no duplicates' constraint is violated [message #581871 is a reply to message #34450] Wed, 17 December 2003 16:03 Go to previous messageGo to next message
mike is currently offline mikeFriend
Messages: 35
Registered: July 2009
Member
I'm afraid I can't share this one, but I'll try to isolate the problem and
create a test file from it.

--mike

Ed Merks wrote:

> Mike,

> Hmmm. There's some interesting include stuff going on here. Could you
share the schemas that
> produce this problem? If I have a working (i.e., failing) test case, I can
get to the bottom of it
> quickly...


> mike wrote:

> > Yep sorry, I wasn't quiet sure my message would be read.
> > Below is the stacktrace.
> > Seems to be the BasicEList#add method which catches the xsd incorrectness
> > and
> > sends the error.
> >
> > --mike
> >
> > java.lang.IllegalArgumentException: The 'no duplicates' constraint is
> > violated
> > at org.eclipse.emf.common.util.BasicEList.add(BasicEList.java:6 12)
> > at
> >
org.eclipse.emf.common.util.BasicEList$EListIterator.add(Bas icEList.java:1399)
> > at
> >
org.eclipse.xsd.impl.XSDNamedComponentImpl.mergeToSortedList (XSDNamedComponentImpl.java:178)
> > at
> >
org.eclipse.xsd.impl.XSDSchemaImpl.propogateComponents(XSDSc hemaImpl.java:2862)
> > at
> > org.eclipse.xsd.impl.XSDSchemaImpl.incorporate(XSDSchemaImpl .java:3027)
> > at
> > org.eclipse.xsd.impl.XSDSchemaImpl.included(XSDSchemaImpl.ja va:2946)
> > at
> >
org.eclipse.xsd.impl.XSDIncludeImpl.handleResolvedSchema(XSD IncludeImpl.java:337)
> > at
> >
org.eclipse.xsd.impl.XSDSchemaDirectiveImpl.resolve(XSDSchem aDirectiveImpl.java:405)
> > at
> > org.eclipse.xsd.impl.XSDIncludeImpl.patch(XSDIncludeImpl.jav a:324)
> > at
> >
org.eclipse.xsd.impl.XSDConcreteComponentImpl.patch(XSDConcr eteComponentImpl.java:513)
> > at
> > org.eclipse.xsd.impl.XSDSchemaImpl.patch(XSDSchemaImpl.java: 1494)
> > at
> > org.eclipse.xsd.impl.XSDSchemaImpl.incorporate(XSDSchemaImpl .java:3025)
> > at
> > org.eclipse.xsd.impl.XSDSchemaImpl.included(XSDSchemaImpl.ja va:2946)
> > at
> >
org.eclipse.xsd.impl.XSDIncludeImpl.handleResolvedSchema(XSD IncludeImpl.java:337)
> > at
> >
org.eclipse.xsd.impl.XSDSchemaDirectiveImpl.resolve(XSDSchem aDirectiveImpl.java:405)
> > at
> > org.eclipse.xsd.impl.XSDIncludeImpl.patch(XSDIncludeImpl.jav a:324)
> > at
> >
org.eclipse.xsd.impl.XSDConcreteComponentImpl.patch(XSDConcr eteComponentImpl.java:513)
> > at
> > org.eclipse.xsd.impl.XSDSchemaImpl.patch(XSDSchemaImpl.java: 1494)
> > at
> > org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2240)
> > at
> >
org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1205)
> > at
> >
org.eclipse.xsd.impl.XSDSchemaImpl.setSchemaLocation(XSDSche maImpl.java:842)
> > at
> > org.eclipse.xsd.util.XSDResourceImpl.attached(XSDResourceImp l.java:410)
> > at
> >
org.eclipse.emf.ecore.resource.impl.ResourceImpl$ContentsELi st.inverseAdd(ResourceImpl.java:326)
> > at
> >
org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:233)
> > at org.eclipse.emf.common.util.BasicEList.add(BasicEList.java:5 70)
> > at
> > org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:374)
> > at
> >
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:881)
> > at
> >
org.eclipse.xsd.impl.XSDSchemaDirectiveImpl.resolve(XSDSchem aDirectiveImpl.java:380)
> > at
> > org.eclipse.xsd.impl.XSDIncludeImpl.patch(XSDIncludeImpl.jav a:324)
> > at
> >
org.eclipse.xsd.impl.XSDConcreteComponentImpl.patch(XSDConcr eteComponentImpl.java:513)
> > at
> > org.eclipse.xsd.impl.XSDSchemaImpl.patch(XSDSchemaImpl.java: 1494)
> > at
> > org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2240)
> > at
> >
org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1205)
> > at
> >
org.eclipse.xsd.impl.XSDSchemaImpl.setSchemaLocation(XSDSche maImpl.java:842)
> > at
> > org.eclipse.xsd.util.XSDResourceImpl.attached(XSDResourceImp l.java:410)
> > at
> >
org.eclipse.emf.ecore.resource.impl.ResourceImpl$ContentsELi st.inverseAdd(ResourceImpl.java:326)
> > at
> >
org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:233)
> > at org.eclipse.emf.common.util.BasicEList.add(BasicEList.java:5 70)
> > at
> > org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:374)
> > at
> >
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:881)
> > at
> >
org.eclipse.xsd.impl.XSDSchemaDirectiveImpl.resolve(XSDSchem aDirectiveImpl.java:380)
> > at
> > org.eclipse.xsd.impl.XSDIncludeImpl.patch(XSDIncludeImpl.jav a:324)
> > at
> >
org.eclipse.xsd.impl.XSDConcreteComponentImpl.patch(XSDConcr eteComponentImpl.java:513)
> > at
> > org.eclipse.xsd.impl.XSDSchemaImpl.patch(XSDSchemaImpl.java: 1494)
> > at
> > org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2240)
> > at
> >
org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1205)
> > at
> >
org.eclipse.xsd.impl.XSDSchemaImpl.setSchemaLocation(XSDSche maImpl.java:842)
> > at
> > org.eclipse.xsd.util.XSDResourceImpl.attached(XSDResourceImp l.java:410)
> > at
> >
org.eclipse.emf.ecore.resource.impl.ResourceImpl$ContentsELi st.inverseAdd(ResourceImpl.java:326)
> > at
> >
org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:233)
> > at org.eclipse.emf.common.util.BasicEList.add(BasicEList.java:5 70)
> > at
> > org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:374)
> > at
> >
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:881)
> > at
> >
org.eclipse.xsd.impl.XSDSchemaDirectiveImpl.resolve(XSDSchem aDirectiveImpl.java:380)
> > at
> > org.eclipse.xsd.impl.XSDIncludeImpl.patch(XSDIncludeImpl.jav a:324)
> > at
> >
org.eclipse.xsd.impl.XSDConcreteComponentImpl.patch(XSDConcr eteComponentImpl.java:513)
> > at
> > org.eclipse.xsd.impl.XSDSchemaImpl.patch(XSDSchemaImpl.java: 1494)
> > at
> > org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2240)
> > at
> >
org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1205)
> > at
> >
org.eclipse.xsd.impl.XSDSchemaImpl.setSchemaLocation(XSDSche maImpl.java:842)
> > at
> > org.eclipse.xsd.util.XSDResourceImpl.attached(XSDResourceImp l.java:410)
> > at
> >
org.eclipse.emf.ecore.resource.impl.ResourceImpl$ContentsELi st.inverseAdd(ResourceImpl.java:326)
> > at
> >
org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:233)
> > at org.eclipse.emf.common.util.BasicEList.add(BasicEList.java:5 70)
> > at
> > org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:374)
> > at
> >
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:881)
> > at
> >
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:755)
> > at
> >
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:220)
> > at
> >
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:286)
> >
> > Ed Merks wrote:
> >
> > > Mike,
> >
> > > You need to provide more detail, like a stack trace. I'm not a mind
> > > reader...
> >
> > > mike wrote:
> >
> > > > I get this error when trying to load an xsd file.
> > > > My question is : is there a workaround?
> > > > A quick and dirty load?
> > > >
> > > > thanx,
> > > >
> > > > --mike
Re: The 'no duplicates' constraint is violated [message #581885 is a reply to message #34484] Wed, 17 December 2003 16:11 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
Mike,

That would be much appreciated. I may be able to fix this for the 2.0 drop later this week if you
act quickly. ;-)

mike wrote:

> I'm afraid I can't share this one, but I'll try to isolate the problem and
> create a test file from it.
>
> --mike
>
> Ed Merks wrote:
>
> > Mike,
>
> > Hmmm. There's some interesting include stuff going on here. Could you
> share the schemas that
> > produce this problem? If I have a working (i.e., failing) test case, I can
> get to the bottom of it
> > quickly...
>
> > mike wrote:
>
> > > Yep sorry, I wasn't quiet sure my message would be read.
> > > Below is the stacktrace.
> > > Seems to be the BasicEList#add method which catches the xsd incorrectness
> > > and
> > > sends the error.
> > >
> > > --mike
> > >
> > > java.lang.IllegalArgumentException: The 'no duplicates' constraint is
> > > violated
> > > at org.eclipse.emf.common.util.BasicEList.add(BasicEList.java:6 12)
> > > at
> > >
> org.eclipse.emf.common.util.BasicEList$EListIterator.add(Bas icEList.java:1399)
> > > at
> > >
> org.eclipse.xsd.impl.XSDNamedComponentImpl.mergeToSortedList (XSDNamedComponentImpl.java:178)
> > > at
> > >
> org.eclipse.xsd.impl.XSDSchemaImpl.propogateComponents(XSDSc hemaImpl.java:2862)
> > > at
> > > org.eclipse.xsd.impl.XSDSchemaImpl.incorporate(XSDSchemaImpl .java:3027)
> > > at
> > > org.eclipse.xsd.impl.XSDSchemaImpl.included(XSDSchemaImpl.ja va:2946)
> > > at
> > >
> org.eclipse.xsd.impl.XSDIncludeImpl.handleResolvedSchema(XSD IncludeImpl.java:337)
> > > at
> > >
> org.eclipse.xsd.impl.XSDSchemaDirectiveImpl.resolve(XSDSchem aDirectiveImpl.java:405)
> > > at
> > > org.eclipse.xsd.impl.XSDIncludeImpl.patch(XSDIncludeImpl.jav a:324)
> > > at
> > >
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.patch(XSDConcr eteComponentImpl.java:513)
> > > at
> > > org.eclipse.xsd.impl.XSDSchemaImpl.patch(XSDSchemaImpl.java: 1494)
> > > at
> > > org.eclipse.xsd.impl.XSDSchemaImpl.incorporate(XSDSchemaImpl .java:3025)
> > > at
> > > org.eclipse.xsd.impl.XSDSchemaImpl.included(XSDSchemaImpl.ja va:2946)
> > > at
> > >
> org.eclipse.xsd.impl.XSDIncludeImpl.handleResolvedSchema(XSD IncludeImpl.java:337)
> > > at
> > >
> org.eclipse.xsd.impl.XSDSchemaDirectiveImpl.resolve(XSDSchem aDirectiveImpl.java:405)
> > > at
> > > org.eclipse.xsd.impl.XSDIncludeImpl.patch(XSDIncludeImpl.jav a:324)
> > > at
> > >
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.patch(XSDConcr eteComponentImpl.java:513)
> > > at
> > > org.eclipse.xsd.impl.XSDSchemaImpl.patch(XSDSchemaImpl.java: 1494)
> > > at
> > > org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2240)
> > > at
> > >
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1205)
> > > at
> > >
> org.eclipse.xsd.impl.XSDSchemaImpl.setSchemaLocation(XSDSche maImpl.java:842)
> > > at
> > > org.eclipse.xsd.util.XSDResourceImpl.attached(XSDResourceImp l.java:410)
> > > at
> > >
> org.eclipse.emf.ecore.resource.impl.ResourceImpl$ContentsELi st.inverseAdd(ResourceImpl.java:326)
> > > at
> > >
> org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:233)
> > > at org.eclipse.emf.common.util.BasicEList.add(BasicEList.java:5 70)
> > > at
> > > org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:374)
> > > at
> > >
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:881)
> > > at
> > >
> org.eclipse.xsd.impl.XSDSchemaDirectiveImpl.resolve(XSDSchem aDirectiveImpl.java:380)
> > > at
> > > org.eclipse.xsd.impl.XSDIncludeImpl.patch(XSDIncludeImpl.jav a:324)
> > > at
> > >
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.patch(XSDConcr eteComponentImpl.java:513)
> > > at
> > > org.eclipse.xsd.impl.XSDSchemaImpl.patch(XSDSchemaImpl.java: 1494)
> > > at
> > > org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2240)
> > > at
> > >
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1205)
> > > at
> > >
> org.eclipse.xsd.impl.XSDSchemaImpl.setSchemaLocation(XSDSche maImpl.java:842)
> > > at
> > > org.eclipse.xsd.util.XSDResourceImpl.attached(XSDResourceImp l.java:410)
> > > at
> > >
> org.eclipse.emf.ecore.resource.impl.ResourceImpl$ContentsELi st.inverseAdd(ResourceImpl.java:326)
> > > at
> > >
> org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:233)
> > > at org.eclipse.emf.common.util.BasicEList.add(BasicEList.java:5 70)
> > > at
> > > org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:374)
> > > at
> > >
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:881)
> > > at
> > >
> org.eclipse.xsd.impl.XSDSchemaDirectiveImpl.resolve(XSDSchem aDirectiveImpl.java:380)
> > > at
> > > org.eclipse.xsd.impl.XSDIncludeImpl.patch(XSDIncludeImpl.jav a:324)
> > > at
> > >
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.patch(XSDConcr eteComponentImpl.java:513)
> > > at
> > > org.eclipse.xsd.impl.XSDSchemaImpl.patch(XSDSchemaImpl.java: 1494)
> > > at
> > > org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2240)
> > > at
> > >
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1205)
> > > at
> > >
> org.eclipse.xsd.impl.XSDSchemaImpl.setSchemaLocation(XSDSche maImpl.java:842)
> > > at
> > > org.eclipse.xsd.util.XSDResourceImpl.attached(XSDResourceImp l.java:410)
> > > at
> > >
> org.eclipse.emf.ecore.resource.impl.ResourceImpl$ContentsELi st.inverseAdd(ResourceImpl.java:326)
> > > at
> > >
> org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:233)
> > > at org.eclipse.emf.common.util.BasicEList.add(BasicEList.java:5 70)
> > > at
> > > org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:374)
> > > at
> > >
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:881)
> > > at
> > >
> org.eclipse.xsd.impl.XSDSchemaDirectiveImpl.resolve(XSDSchem aDirectiveImpl.java:380)
> > > at
> > > org.eclipse.xsd.impl.XSDIncludeImpl.patch(XSDIncludeImpl.jav a:324)
> > > at
> > >
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.patch(XSDConcr eteComponentImpl.java:513)
> > > at
> > > org.eclipse.xsd.impl.XSDSchemaImpl.patch(XSDSchemaImpl.java: 1494)
> > > at
> > > org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2240)
> > > at
> > >
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1205)
> > > at
> > >
> org.eclipse.xsd.impl.XSDSchemaImpl.setSchemaLocation(XSDSche maImpl.java:842)
> > > at
> > > org.eclipse.xsd.util.XSDResourceImpl.attached(XSDResourceImp l.java:410)
> > > at
> > >
> org.eclipse.emf.ecore.resource.impl.ResourceImpl$ContentsELi st.inverseAdd(ResourceImpl.java:326)
> > > at
> > >
> org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:233)
> > > at org.eclipse.emf.common.util.BasicEList.add(BasicEList.java:5 70)
> > > at
> > > org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:374)
> > > at
> > >
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:881)
> > > at
> > >
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:755)
> > > at
> > >
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:220)
> > > at
> > >
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:286)
> > >
> > > Ed Merks wrote:
> > >
> > > > Mike,
> > >
> > > > You need to provide more detail, like a stack trace. I'm not a mind
> > > > reader...
> > >
> > > > mike wrote:
> > >
> > > > > I get this error when trying to load an xsd file.
> > > > > My question is : is there a workaround?
> > > > > A quick and dirty load?
> > > > >
> > > > > thanx,
> > > > >
> > > > > --mike


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: The 'no duplicates' constraint is violated [message #996360 is a reply to message #34246] Tue, 01 January 2013 22:21 Go to previous messageGo to next message
Max Bureck is currently offline Max BureckFriend
Messages: 9
Registered: January 2012
Junior Member
Hi,

I just found this old post. I have a problem with the same symptoms, and created a post (including an XSD file causing the problem) in a different forum:
http://www.eclipse.org/forums/index.php/t/445467/

BTW: What is the difference between the forum "Modeling » XSD" and "Eclipse Projects » XML Schema Definition (XSD)"?

I hope this helps resolving the issue.

Best Regards,
Max
Re: The 'no duplicates' constraint is violated [message #996655 is a reply to message #996360] Wed, 02 January 2013 16:06 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
Max,

The problem stems from duplicate union members:

<xs:union memberTypes="m:length m:length"/>

But we should diagnose that as an error not throw an exception. Please
open a bugzilla and attach the sample zip file.

I didn't know that at some point duplicate newsgroups were created. :-(

This is the original one and I didn't know about the other one so I have
only monitored this one. I've asked that the other one be terminated.


On 01/01/2013 11:21 PM, Max Bureck wrote:
> Hi,
>
> I just found this old post. I have a problem with the same symptoms,
> and created a post (including an XSD file causing the problem) in a
> different forum:
> http://www.eclipse.org/forums/index.php/t/445467/
>
> BTW: What is the difference between the forum "Modeling » XSD" and
> "Eclipse Projects » XML Schema Definition (XSD)"?
>
> I hope this helps resolving the issue.
>
> Best Regards,
> Max


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: The 'no duplicates' constraint is violated [message #996702 is a reply to message #996655] Wed, 02 January 2013 18:02 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
Max,

I was looking at how to fix it, which isn't hard, so I have a patch ready...

I also looked at the specification and I don't see any constraint that
says it's an error for them memberTypes attribute to specify the same
type more than once. If there were such a constraint, I would have had
a test case for it. So I think the semantic model is just supposed to
ignore duplicates, i.e., filter them out. I suppose it is bad style to
have duplicate, but not wrong, so that's how I'll handle the fix...


On 02/01/2013 5:06 PM, Ed Merks wrote:
> Max,
>
> The problem stems from duplicate union members:
>
> <xs:union memberTypes="m:length m:length"/>
>
> But we should diagnose that as an error not throw an exception. Please
> open a bugzilla and attach the sample zip file.
>
> I didn't know that at some point duplicate newsgroups were created. :-(
>
> This is the original one and I didn't know about the other one so I
> have only monitored this one. I've asked that the other one be
> terminated.
>
>
> On 01/01/2013 11:21 PM, Max Bureck wrote:
>> Hi,
>>
>> I just found this old post. I have a problem with the same symptoms,
>> and created a post (including an XSD file causing the problem) in a
>> different forum:
>> http://www.eclipse.org/forums/index.php/t/445467/
>>
>> BTW: What is the difference between the forum "Modeling » XSD" and
>> "Eclipse Projects » XML Schema Definition (XSD)"?
>>
>> I hope this helps resolving the issue.
>>
>> Best Regards,
>> Max
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: The 'no duplicates' constraint is violated [message #996939 is a reply to message #34246] Thu, 03 January 2013 08:51 Go to previous messageGo to next message
Max Bureck is currently offline Max BureckFriend
Messages: 9
Registered: January 2012
Junior Member
Hi Ed,

Thanks for the quick help! I created a bugzilla entry for this problem:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=397348
The MathML web page states that the XSD schema was derived from a RelaxNG schema, so maybe this duplicate was generated automatically.

Thanks again,
Max
Re: The 'no duplicates' constraint is violated [message #996976 is a reply to message #996939] Thu, 03 January 2013 10:20 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
Max,

Comments below.

On 03/01/2013 9:51 AM, Max Bureck wrote:
> Hi Ed,
>
> Thanks for the quick help!
You're welcome. It helps immensely to have a test case. It's amazing
how often people forget that...
> I created a bugzilla entry for this problem:
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=397348
I committed the fix for master. Not sure if you were looking for a fix
in the maintenance stream (2.7.x) as well? You indicated 2.6 in the
bugzilla, but we (I) don't have the capacity for maintaining more than
one released stream.
> The MathML web page states that the XSD schema was derived from a
> RelaxNG schema, so maybe this duplicate was generated automatically.
Yes, and if there is no constraint to indicate that it's wrong, it's
something that's easily overlooked...
>
> Thanks again,
> Max


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: The 'no duplicates' constraint is violated [message #996983 is a reply to message #34246] Thu, 03 January 2013 10:40 Go to previous message
Max Bureck is currently offline Max BureckFriend
Messages: 9
Registered: January 2012
Junior Member
Hello Ed,

I just selected 2.6, because it is the version the error occurred. I am fine with it being fixed in 2.7.x .
Previous Topic:Digram Editor loses focus on closing of MessageDialog in Graphiti
Next Topic:choice child under all
Goto Forum:
  


Current Time: Thu Mar 28 11:44:21 GMT 2024

Powered by FUDForum. Page generated in 0.03026 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top