Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » XML Schema Definition (XSD) » Error, "The element may not have duplicate name and target namespace"
Error, "The element may not have duplicate name and target namespace" [message #48065] Mon, 21 June 2004 12:28 Go to next message
No real name is currently offline No real nameFriend
Messages: 121
Registered: July 2009
Senior Member
Hi,

I am having difficulty tracking down an error whem loading an EMF model
from an XML Schema. Specifically, I receive an "Concversion Error" with
the following message:

XSD: The element may not have duplicate name and target namespace
'http://www.some.org/abc##SomeThing'


Note that the same error is displayed under "Problems" when opening the
schema file in the Sample XML Schema Editor.

However, when I open the same file in the WSAD 5.1 XML Schema editor,
there is not an error displayed.

I proceed anyhow with Model Generation, but that end sin a Null Pointer
Exception, which is shown at the end of this post.

This file imports schemas, none of which individually causes an error.
Any hints?

Thanks, chris

My versions:
EMF: Version: 2.0.0 Build id: 200406100948
XSD: Version: 2.0.0 Build id: 200406100948
Eclipse RC2: Version: 3.0.0 Build id: 200406111814


!ENTRY org.eclipse.emf.codegen.ecore.ui 2 0 Jun 21, 2004 14:20:53.357
!MESSAGE
!STACK 0
java.lang.NullPointerException
at
org.eclipse.emf.codegen.ecore.genmodel.impl.GenPackageImpl$D ependency
Helper.<init>(GenPackageImpl.java:1160)
at
org.eclipse.emf.codegen.ecore.genmodel.impl.GenPackageImpl.g enerate(G
enPackageImpl.java:1685)
at
org.eclipse.emf.codegen.ecore.genmodel.presentation.GenModel ActionBar
Contributor$3.generate(GenModelActionBarContributor.java:181 )
at
org.eclipse.emf.codegen.ecore.genmodel.presentation.GenModel ActionBar
Contributor$8.execute(GenModelActionBarContributor.java:305)
at
org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(Worksp aceModify
Operation.java:91)
at
org.eclipse.core.internal.resources.Workspace.run(Workspace. java:1673
)
at
org.eclipse.ui.actions.WorkspaceModifyOperation.run(Workspac eModifyOp
eration.java:105)
at
org.eclipse.jface.operation.ModalContext.runInCurrentThread( ModalCont
ext.java:303)
at
org.eclipse.jface.operation.ModalContext.run(ModalContext.ja va:253)
at
org.eclipse.jface.dialogs.ProgressMonitorDialog.run(Progress MonitorDi
alog.java:397)
at
org.eclipse.emf.codegen.ecore.genmodel.presentation.GenModel ActionBar
Contributor$GenerateAction.run(GenModelActionBarContributor. java:321)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:881 )
at
org.eclipse.jface.action.ActionContributionItem.handleWidget Selection
(ActionContributionItem.java:915)
at
org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContri
butionItem.java(Inlined Compiled Code))
at
org.eclipse.jface.action.ActionContributionItem$7.handleEven t(ActionC
ontributionItem.java(Compiled Code))
at
org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled
Code))
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java(Inlined
Compiled
Code))
at
org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va(Compil
ed Code))
at
org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled
Code))
at
org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a(Compile
d Code))
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1333)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.jav
a:252)
at
org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:141)
at
org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplicatio n.java:96
)
at
org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformAct
ivator.java:334)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.ja
va:272)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.ja
va:128)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.
java:79)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAcces
sorImpl.java:41)
at java.lang.reflect.Method.invoke(Method.java:386)
at org.eclipse.core.launcher.Main.basicRun(Main.java:185)
at org.eclipse.core.launcher.Main.run(Main.java:638)
at org.eclipse.core.launcher.Main.main(Main.java:622)
Re: Error, "The element may not have duplicate name and target namespace" [message #48125 is a reply to message #48065] Mon, 21 June 2004 14:37 Go to previous message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Chris,

It sounds like you have duplicate element declarations but without a sample,
I can only guess.


Chris Giblin wrote:

> Hi,
>
> I am having difficulty tracking down an error whem loading an EMF model
> from an XML Schema. Specifically, I receive an "Concversion Error" with
> the following message:
>
> XSD: The element may not have duplicate name and target namespace
> 'http://www.some.org/abc##SomeThing'
>
> Note that the same error is displayed under "Problems" when opening the
> schema file in the Sample XML Schema Editor.
>
> However, when I open the same file in the WSAD 5.1 XML Schema editor,
> there is not an error displayed.
>
> I proceed anyhow with Model Generation, but that end sin a Null Pointer
> Exception, which is shown at the end of this post.
>
> This file imports schemas, none of which individually causes an error.
> Any hints?
>
> Thanks, chris
>
> My versions:
> EMF: Version: 2.0.0 Build id: 200406100948
> XSD: Version: 2.0.0 Build id: 200406100948
> Eclipse RC2: Version: 3.0.0 Build id: 200406111814
>
> !ENTRY org.eclipse.emf.codegen.ecore.ui 2 0 Jun 21, 2004 14:20:53.357
> !MESSAGE
> !STACK 0
> java.lang.NullPointerException
> at
> org.eclipse.emf.codegen.ecore.genmodel.impl.GenPackageImpl$D ependency
> Helper.<init>(GenPackageImpl.java:1160)
> at
> org.eclipse.emf.codegen.ecore.genmodel.impl.GenPackageImpl.g enerate(G
> enPackageImpl.java:1685)
> at
> org.eclipse.emf.codegen.ecore.genmodel.presentation.GenModel ActionBar
> Contributor$3.generate(GenModelActionBarContributor.java:181 )
> at
> org.eclipse.emf.codegen.ecore.genmodel.presentation.GenModel ActionBar
> Contributor$8.execute(GenModelActionBarContributor.java:305)
> at
> org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(Worksp aceModify
> Operation.java:91)
> at
> org.eclipse.core.internal.resources.Workspace.run(Workspace. java:1673
> )
> at
> org.eclipse.ui.actions.WorkspaceModifyOperation.run(Workspac eModifyOp
> eration.java:105)
> at
> org.eclipse.jface.operation.ModalContext.runInCurrentThread( ModalCont
> ext.java:303)
> at
> org.eclipse.jface.operation.ModalContext.run(ModalContext.ja va:253)
> at
> org.eclipse.jface.dialogs.ProgressMonitorDialog.run(Progress MonitorDi
> alog.java:397)
> at
> org.eclipse.emf.codegen.ecore.genmodel.presentation.GenModel ActionBar
> Contributor$GenerateAction.run(GenModelActionBarContributor. java:321)
> at org.eclipse.jface.action.Action.runWithEvent(Action.java:881 )
> at
> org.eclipse.jface.action.ActionContributionItem.handleWidget Selection
> (ActionContributionItem.java:915)
> at
> org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContri
> butionItem.java(Inlined Compiled Code))
> at
> org.eclipse.jface.action.ActionContributionItem$7.handleEven t(ActionC
> ontributionItem.java(Compiled Code))
> at
> org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled
> Code))
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java(Inlined
> Compiled
> Code))
> at
> org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va(Compil
> ed Code))
> at
> org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled
> Code))
> at
> org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a(Compile
> d Code))
> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1333)
> at
> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.jav
> a:252)
> at
> org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:141)
> at
> org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplicatio n.java:96
> )
> at
> org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformAct
> ivator.java:334)
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.ja
> va:272)
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.ja
> va:128)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.
> java:79)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAcces
> sorImpl.java:41)
> at java.lang.reflect.Method.invoke(Method.java:386)
> at org.eclipse.core.launcher.Main.basicRun(Main.java:185)
> at org.eclipse.core.launcher.Main.run(Main.java:638)
> at org.eclipse.core.launcher.Main.main(Main.java:622)
Re: Error, "The element may not have duplicate name and target namespace" [message #589409 is a reply to message #48065] Mon, 21 June 2004 14:37 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 31536
Registered: July 2009
Senior Member
Chris,

It sounds like you have duplicate element declarations but without a sample,
I can only guess.


Chris Giblin wrote:

> Hi,
>
> I am having difficulty tracking down an error whem loading an EMF model
> from an XML Schema. Specifically, I receive an "Concversion Error" with
> the following message:
>
> XSD: The element may not have duplicate name and target namespace
> 'http://www.some.org/abc##SomeThing'
>
> Note that the same error is displayed under "Problems" when opening the
> schema file in the Sample XML Schema Editor.
>
> However, when I open the same file in the WSAD 5.1 XML Schema editor,
> there is not an error displayed.
>
> I proceed anyhow with Model Generation, but that end sin a Null Pointer
> Exception, which is shown at the end of this post.
>
> This file imports schemas, none of which individually causes an error.
> Any hints?
>
> Thanks, chris
>
> My versions:
> EMF: Version: 2.0.0 Build id: 200406100948
> XSD: Version: 2.0.0 Build id: 200406100948
> Eclipse RC2: Version: 3.0.0 Build id: 200406111814
>
> !ENTRY org.eclipse.emf.codegen.ecore.ui 2 0 Jun 21, 2004 14:20:53.357
> !MESSAGE
> !STACK 0
> java.lang.NullPointerException
> at
> org.eclipse.emf.codegen.ecore.genmodel.impl.GenPackageImpl$D ependency
> Helper.<init>(GenPackageImpl.java:1160)
> at
> org.eclipse.emf.codegen.ecore.genmodel.impl.GenPackageImpl.g enerate(G
> enPackageImpl.java:1685)
> at
> org.eclipse.emf.codegen.ecore.genmodel.presentation.GenModel ActionBar
> Contributor$3.generate(GenModelActionBarContributor.java:181 )
> at
> org.eclipse.emf.codegen.ecore.genmodel.presentation.GenModel ActionBar
> Contributor$8.execute(GenModelActionBarContributor.java:305)
> at
> org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(Worksp aceModify
> Operation.java:91)
> at
> org.eclipse.core.internal.resources.Workspace.run(Workspace. java:1673
> )
> at
> org.eclipse.ui.actions.WorkspaceModifyOperation.run(Workspac eModifyOp
> eration.java:105)
> at
> org.eclipse.jface.operation.ModalContext.runInCurrentThread( ModalCont
> ext.java:303)
> at
> org.eclipse.jface.operation.ModalContext.run(ModalContext.ja va:253)
> at
> org.eclipse.jface.dialogs.ProgressMonitorDialog.run(Progress MonitorDi
> alog.java:397)
> at
> org.eclipse.emf.codegen.ecore.genmodel.presentation.GenModel ActionBar
> Contributor$GenerateAction.run(GenModelActionBarContributor. java:321)
> at org.eclipse.jface.action.Action.runWithEvent(Action.java:881 )
> at
> org.eclipse.jface.action.ActionContributionItem.handleWidget Selection
> (ActionContributionItem.java:915)
> at
> org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContri
> butionItem.java(Inlined Compiled Code))
> at
> org.eclipse.jface.action.ActionContributionItem$7.handleEven t(ActionC
> ontributionItem.java(Compiled Code))
> at
> org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled
> Code))
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java(Inlined
> Compiled
> Code))
> at
> org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va(Compil
> ed Code))
> at
> org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled
> Code))
> at
> org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a(Compile
> d Code))
> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1333)
> at
> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.jav
> a:252)
> at
> org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:141)
> at
> org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplicatio n.java:96
> )
> at
> org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformAct
> ivator.java:334)
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.ja
> va:272)
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.ja
> va:128)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.
> java:79)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAcces
> sorImpl.java:41)
> at java.lang.reflect.Method.invoke(Method.java:386)
> at org.eclipse.core.launcher.Main.basicRun(Main.java:185)
> at org.eclipse.core.launcher.Main.run(Main.java:638)
> at org.eclipse.core.launcher.Main.main(Main.java:622)


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Error, "The element may not have duplicate name and target namespace"
Next Topic:XPATH
Goto Forum:
  


Current Time: Tue Oct 20 10:00:51 GMT 2020

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

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

Back to the top