[
https://issues.jboss.org/browse/TEIIDDES-2120?page=com.atlassian.jira.plu...
]
Paul Richardson commented on TEIIDDES-2120:
-------------------------------------------
The offending constraint was added to the [vdb-deployer
schema|https://github.com/Teiid-Designer/teiid-designer/blob/8.3.x/plugin...]
for commit ["TEIIDDES-1209 upgraded Teiid jars to 8.1
Beta1"|https://github.com/Teiid-Designer/teiid-designer/commit/1e044...].
Specifically, this added the following schema constraint:
{code:xml}
<xs:unique name="modelNameUnique">
<xs:selector xpath="model"/>
<xs:field xpath="@name"/>
</xs:unique>
{code}
This constraint is used by the java's xerces marshaller and validator to check whether
each model in the vdb has an unique name.
By changing it to the following it is possible to allow models from different directories
to be added to the vdb:
{code:xml}
<xs:unique name="modelNameUnique">
<xs:selector xpath="model"/>
<xs:field xpath="@name"/>
<xs:field xpath="@path"/>
</xs:unique>
{code}
The question remains where do the rules for vdb-deployer.xsd come from, ie. are these
imported from teiid? If the answer is yes then by allowing duplicate names in the vdb
client-side, are we not just moving the problem server-side when the vdb is deployed?
unable to reference same name .xsd when saving .vdb
---------------------------------------------------
Key: TEIIDDES-2120
URL:
https://issues.jboss.org/browse/TEIIDDES-2120
Project: Teiid Designer
Issue Type: Bug
Components: VDB & Execution
Affects Versions: 8.3
Reporter: Johnathon Lee
Assignee: Paul Richardson
Fix For: 8.5, 8.3.3
User can no longer add same name .xsd to a vdb (name same, location(s) different).
Results in:
java.lang.RuntimeException: javax.xml.bind.UnmarshalException
- with linked exception:
[org.xml.sax.SAXParseException; lineNumber: 61; columnNumber: 168; Duplicate unique value
[<name>] declared for identity constraint of element "vdb".]
at
org.teiid.core.designer.CoreModelerPlugin.toRuntimeException(CoreModelerPlugin.java:76)
at org.teiid.core.designer.util.OperationUtil.perform(OperationUtil.java:50)
at org.teiid.designer.vdb.VdbUtil.getVdbManifest(VdbUtil.java:178)
at org.teiid.designer.vdb.VdbUtil.isPreviewVdb(VdbUtil.java:120)
at
org.teiid.designer.runtime.preview.PreviewManager.isPreviewVdb(PreviewManager.java:267)
at
org.teiid.designer.runtime.preview.PreviewManager.findPvdbs(PreviewManager.java:656)
at
org.teiid.designer.runtime.preview.PreviewManager.handleModelProjectOpened(PreviewManager.java:895)
at org.teiid.designer.runtime.preview.PreviewManager.done(PreviewManager.java:466)
at org.eclipse.core.internal.jobs.JobListeners$3.notify(JobListeners.java:39)
at org.eclipse.core.internal.jobs.JobListeners.doNotify(JobListeners.java:112)
at org.eclipse.core.internal.jobs.JobListeners.done(JobListeners.java:152)
at org.eclipse.core.internal.jobs.JobManager.endJob(JobManager.java:647)
at org.eclipse.core.internal.jobs.WorkerPool.endJob(WorkerPool.java:105)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:70)
Caused by: javax.xml.bind.UnmarshalException
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira