Home » Modeling » EMF » InvocationTargetException during conversion of an eDataType
|
Re: InvocationTargetException during conversion of an eDataType [message #497158 is a reply to message #497139] |
Thu, 12 November 2009 17:20 |
Ed Merks Messages: 33218 Registered: July 2009 |
Senior Member |
|
|
Timothy,
It sounds like the name of this EDatType is likely the empty string,
which isn't valid. Or maybe the XML name is set to the empty string,
which marks it as the document root, which it clearly is not.
Timothy Marc wrote:
> Hi,
>
> i've tried to convert an UML model into Ecore, which works quite well
> except one problem. I've defined a PrimitiveType Long, stereotyped it
> with EcoreProfile eDataType{instanceTypeName = java.lang.Long;
> dataTypeName = Long}. There are other primitive types too in the
> model, but for this long type, the generator throws the following
> exception:
>
> java.lang.ClassCastException: org.eclipse.emf.ecore.impl.EDataTypeImpl
> cannot be cast to org.eclipse.emf.ecore.EClass
> at
> org.eclipse.emf.ecore.util.BasicExtendedMetaData.getDocument Root(BasicExtendedMetaData.java:136)
>
> at
> org.eclipse.emf.codegen.ecore.genmodel.impl.GenClassImpl.isD ocumentRoot(GenClassImpl.java:2910)
>
> at
> org.eclipse.emf.codegen.ecore.genmodel.impl.GenFeatureImpl.i nitialize(GenFeatureImpl.java:1528)
>
> at
> org.eclipse.uml2.codegen.ecore.genmodel.impl.GenFeatureImpl. initialize(GenFeatureImpl.java:809)
>
> at
> org.eclipse.emf.codegen.ecore.genmodel.impl.GenClassImpl.ini tialize(GenClassImpl.java:1618)
>
> at
> org.eclipse.emf.codegen.ecore.genmodel.impl.GenPackageImpl.i nitialize(GenPackageImpl.java:2815)
>
> at
> org.eclipse.emf.codegen.ecore.genmodel.impl.GenModelImpl.ini tialize(GenModelImpl.java:2221)
>
> at
> org.eclipse.emf.importer.ModelImporter.prepareGenModelAndEPa ckages(ModelImporter.java:714)
>
> at
> org.eclipse.uml2.uml.ecore.importer.UMLImporter.prepareGenMo delAndEPackages(UMLImporter.java:311)
>
> at
> org.eclipse.emf.importer.ui.contribution.base.ModelImporterW izard.doPerformFinish(ModelImporterWizard.java:149)
>
> at
> org.eclipse.emf.converter.ui.contribution.base.ModelConverte rWizard$1.execute(ModelConverterWizard.java:228)
>
> at
> org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(Worksp aceModifyOperation.java:106
>
>
>
> I really didn't know, why this particular primitve type causes the
> exception. Any help would be appreciated.
>
> Regards Timothy
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Re: InvocationTargetException during conversion of an eDataType [message #497640 is a reply to message #497158] |
Fri, 13 November 2009 10:04 |
Timothy Marc Messages: 547 Registered: July 2009 |
Senior Member |
|
|
Hi Ed,
strange, i've unapplied and reapplied the stereotype and i've ensured,
that none of the possible issue, you mentioned, occurred. It fails
again. Then, i applied the stereotypes and the names programmatically.
That was successfull. Now, it works quite well...
Timothy
Ed Merks schrieb:
> Timothy,
>
> It sounds like the name of this EDatType is likely the empty string,
> which isn't valid. Or maybe the XML name is set to the empty string,
> which marks it as the document root, which it clearly is not.
>
>
> Timothy Marc wrote:
>> Hi,
>>
>> i've tried to convert an UML model into Ecore, which works quite well
>> except one problem. I've defined a PrimitiveType Long, stereotyped it
>> with EcoreProfile eDataType{instanceTypeName = java.lang.Long;
>> dataTypeName = Long}. There are other primitive types too in the
>> model, but for this long type, the generator throws the following
>> exception:
>>
>> java.lang.ClassCastException: org.eclipse.emf.ecore.impl.EDataTypeImpl
>> cannot be cast to org.eclipse.emf.ecore.EClass
>> at
>> org.eclipse.emf.ecore.util.BasicExtendedMetaData.getDocument Root(BasicExtendedMetaData.java:136)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenClassImpl.isD ocumentRoot(GenClassImpl.java:2910)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenFeatureImpl.i nitialize(GenFeatureImpl.java:1528)
>>
>> at
>> org.eclipse.uml2.codegen.ecore.genmodel.impl.GenFeatureImpl. initialize(GenFeatureImpl.java:809)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenClassImpl.ini tialize(GenClassImpl.java:1618)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenPackageImpl.i nitialize(GenPackageImpl.java:2815)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenModelImpl.ini tialize(GenModelImpl.java:2221)
>>
>> at
>> org.eclipse.emf.importer.ModelImporter.prepareGenModelAndEPa ckages(ModelImporter.java:714)
>>
>> at
>> org.eclipse.uml2.uml.ecore.importer.UMLImporter.prepareGenMo delAndEPackages(UMLImporter.java:311)
>>
>> at
>> org.eclipse.emf.importer.ui.contribution.base.ModelImporterW izard.doPerformFinish(ModelImporterWizard.java:149)
>>
>> at
>> org.eclipse.emf.converter.ui.contribution.base.ModelConverte rWizard$1.execute(ModelConverterWizard.java:228)
>>
>> at
>> org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(Worksp aceModifyOperation.java:106
>>
>>
>>
>> I really didn't know, why this particular primitve type causes the
>> exception. Any help would be appreciated.
>>
>> Regards Timothy
|
|
|
Re: InvocationTargetException during conversion of an eDataType [message #497648 is a reply to message #497158] |
Fri, 13 November 2009 10:04 |
Timothy Marc Messages: 547 Registered: July 2009 |
Senior Member |
|
|
Hi Ed,
strange, i've unapplied and reapplied the stereotype and i've ensured,
that none of the possible issue, you mentioned, occurred. It fails
again. Then, i applied the stereotypes and the names programmatically.
That was successfull. Now, it works quite well...
Timothy
Ed Merks schrieb:
> Timothy,
>
> It sounds like the name of this EDatType is likely the empty string,
> which isn't valid. Or maybe the XML name is set to the empty string,
> which marks it as the document root, which it clearly is not.
>
>
> Timothy Marc wrote:
>> Hi,
>>
>> i've tried to convert an UML model into Ecore, which works quite well
>> except one problem. I've defined a PrimitiveType Long, stereotyped it
>> with EcoreProfile eDataType{instanceTypeName = java.lang.Long;
>> dataTypeName = Long}. There are other primitive types too in the
>> model, but for this long type, the generator throws the following
>> exception:
>>
>> java.lang.ClassCastException: org.eclipse.emf.ecore.impl.EDataTypeImpl
>> cannot be cast to org.eclipse.emf.ecore.EClass
>> at
>> org.eclipse.emf.ecore.util.BasicExtendedMetaData.getDocument Root(BasicExtendedMetaData.java:136)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenClassImpl.isD ocumentRoot(GenClassImpl.java:2910)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenFeatureImpl.i nitialize(GenFeatureImpl.java:1528)
>>
>> at
>> org.eclipse.uml2.codegen.ecore.genmodel.impl.GenFeatureImpl. initialize(GenFeatureImpl.java:809)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenClassImpl.ini tialize(GenClassImpl.java:1618)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenPackageImpl.i nitialize(GenPackageImpl.java:2815)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenModelImpl.ini tialize(GenModelImpl.java:2221)
>>
>> at
>> org.eclipse.emf.importer.ModelImporter.prepareGenModelAndEPa ckages(ModelImporter.java:714)
>>
>> at
>> org.eclipse.uml2.uml.ecore.importer.UMLImporter.prepareGenMo delAndEPackages(UMLImporter.java:311)
>>
>> at
>> org.eclipse.emf.importer.ui.contribution.base.ModelImporterW izard.doPerformFinish(ModelImporterWizard.java:149)
>>
>> at
>> org.eclipse.emf.converter.ui.contribution.base.ModelConverte rWizard$1.execute(ModelConverterWizard.java:228)
>>
>> at
>> org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(Worksp aceModifyOperation.java:106
>>
>>
>>
>> I really didn't know, why this particular primitve type causes the
>> exception. Any help would be appreciated.
>>
>> Regards Timothy
|
|
|
Re: InvocationTargetException during conversion of an eDataType [message #497649 is a reply to message #497158] |
Fri, 13 November 2009 10:04 |
Timothy Marc Messages: 547 Registered: July 2009 |
Senior Member |
|
|
Hi Ed,
strange, i've unapplied and reapplied the stereotype and i've ensured,
that none of the possible issue, you mentioned, occurred. It fails
again. Then, i applied the stereotypes and the names programmatically.
That was successfull. Now, it works quite well...
Timothy
Ed Merks schrieb:
> Timothy,
>
> It sounds like the name of this EDatType is likely the empty string,
> which isn't valid. Or maybe the XML name is set to the empty string,
> which marks it as the document root, which it clearly is not.
>
>
> Timothy Marc wrote:
>> Hi,
>>
>> i've tried to convert an UML model into Ecore, which works quite well
>> except one problem. I've defined a PrimitiveType Long, stereotyped it
>> with EcoreProfile eDataType{instanceTypeName = java.lang.Long;
>> dataTypeName = Long}. There are other primitive types too in the
>> model, but for this long type, the generator throws the following
>> exception:
>>
>> java.lang.ClassCastException: org.eclipse.emf.ecore.impl.EDataTypeImpl
>> cannot be cast to org.eclipse.emf.ecore.EClass
>> at
>> org.eclipse.emf.ecore.util.BasicExtendedMetaData.getDocument Root(BasicExtendedMetaData.java:136)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenClassImpl.isD ocumentRoot(GenClassImpl.java:2910)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenFeatureImpl.i nitialize(GenFeatureImpl.java:1528)
>>
>> at
>> org.eclipse.uml2.codegen.ecore.genmodel.impl.GenFeatureImpl. initialize(GenFeatureImpl.java:809)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenClassImpl.ini tialize(GenClassImpl.java:1618)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenPackageImpl.i nitialize(GenPackageImpl.java:2815)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenModelImpl.ini tialize(GenModelImpl.java:2221)
>>
>> at
>> org.eclipse.emf.importer.ModelImporter.prepareGenModelAndEPa ckages(ModelImporter.java:714)
>>
>> at
>> org.eclipse.uml2.uml.ecore.importer.UMLImporter.prepareGenMo delAndEPackages(UMLImporter.java:311)
>>
>> at
>> org.eclipse.emf.importer.ui.contribution.base.ModelImporterW izard.doPerformFinish(ModelImporterWizard.java:149)
>>
>> at
>> org.eclipse.emf.converter.ui.contribution.base.ModelConverte rWizard$1.execute(ModelConverterWizard.java:228)
>>
>> at
>> org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(Worksp aceModifyOperation.java:106
>>
>>
>>
>> I really didn't know, why this particular primitve type causes the
>> exception. Any help would be appreciated.
>>
>> Regards Timothy
|
|
|
Re: InvocationTargetException during conversion of an eDataType [message #497663 is a reply to message #497158] |
Fri, 13 November 2009 10:04 |
Timothy Marc Messages: 547 Registered: July 2009 |
Senior Member |
|
|
Hi Ed,
strange, i've unapplied and reapplied the stereotype and i've ensured,
that none of the possible issue, you mentioned, occurred. It fails
again. Then, i applied the stereotypes and the names programmatically.
That was successfull. Now, it works quite well...
Timothy
Ed Merks schrieb:
> Timothy,
>
> It sounds like the name of this EDatType is likely the empty string,
> which isn't valid. Or maybe the XML name is set to the empty string,
> which marks it as the document root, which it clearly is not.
>
>
> Timothy Marc wrote:
>> Hi,
>>
>> i've tried to convert an UML model into Ecore, which works quite well
>> except one problem. I've defined a PrimitiveType Long, stereotyped it
>> with EcoreProfile eDataType{instanceTypeName = java.lang.Long;
>> dataTypeName = Long}. There are other primitive types too in the
>> model, but for this long type, the generator throws the following
>> exception:
>>
>> java.lang.ClassCastException: org.eclipse.emf.ecore.impl.EDataTypeImpl
>> cannot be cast to org.eclipse.emf.ecore.EClass
>> at
>> org.eclipse.emf.ecore.util.BasicExtendedMetaData.getDocument Root(BasicExtendedMetaData.java:136)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenClassImpl.isD ocumentRoot(GenClassImpl.java:2910)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenFeatureImpl.i nitialize(GenFeatureImpl.java:1528)
>>
>> at
>> org.eclipse.uml2.codegen.ecore.genmodel.impl.GenFeatureImpl. initialize(GenFeatureImpl.java:809)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenClassImpl.ini tialize(GenClassImpl.java:1618)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenPackageImpl.i nitialize(GenPackageImpl.java:2815)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenModelImpl.ini tialize(GenModelImpl.java:2221)
>>
>> at
>> org.eclipse.emf.importer.ModelImporter.prepareGenModelAndEPa ckages(ModelImporter.java:714)
>>
>> at
>> org.eclipse.uml2.uml.ecore.importer.UMLImporter.prepareGenMo delAndEPackages(UMLImporter.java:311)
>>
>> at
>> org.eclipse.emf.importer.ui.contribution.base.ModelImporterW izard.doPerformFinish(ModelImporterWizard.java:149)
>>
>> at
>> org.eclipse.emf.converter.ui.contribution.base.ModelConverte rWizard$1.execute(ModelConverterWizard.java:228)
>>
>> at
>> org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(Worksp aceModifyOperation.java:106
>>
>>
>>
>> I really didn't know, why this particular primitve type causes the
>> exception. Any help would be appreciated.
>>
>> Regards Timothy
|
|
|
Re: InvocationTargetException during conversion of an eDataType [message #497679 is a reply to message #497158] |
Fri, 13 November 2009 10:04 |
Timothy Marc Messages: 547 Registered: July 2009 |
Senior Member |
|
|
Hi Ed,
strange, i've unapplied and reapplied the stereotype and i've ensured,
that none of the possible issue, you mentioned, occurred. It fails
again. Then, i applied the stereotypes and the names programmatically.
That was successfull. Now, it works quite well...
Timothy
Ed Merks schrieb:
> Timothy,
>
> It sounds like the name of this EDatType is likely the empty string,
> which isn't valid. Or maybe the XML name is set to the empty string,
> which marks it as the document root, which it clearly is not.
>
>
> Timothy Marc wrote:
>> Hi,
>>
>> i've tried to convert an UML model into Ecore, which works quite well
>> except one problem. I've defined a PrimitiveType Long, stereotyped it
>> with EcoreProfile eDataType{instanceTypeName = java.lang.Long;
>> dataTypeName = Long}. There are other primitive types too in the
>> model, but for this long type, the generator throws the following
>> exception:
>>
>> java.lang.ClassCastException: org.eclipse.emf.ecore.impl.EDataTypeImpl
>> cannot be cast to org.eclipse.emf.ecore.EClass
>> at
>> org.eclipse.emf.ecore.util.BasicExtendedMetaData.getDocument Root(BasicExtendedMetaData.java:136)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenClassImpl.isD ocumentRoot(GenClassImpl.java:2910)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenFeatureImpl.i nitialize(GenFeatureImpl.java:1528)
>>
>> at
>> org.eclipse.uml2.codegen.ecore.genmodel.impl.GenFeatureImpl. initialize(GenFeatureImpl.java:809)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenClassImpl.ini tialize(GenClassImpl.java:1618)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenPackageImpl.i nitialize(GenPackageImpl.java:2815)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenModelImpl.ini tialize(GenModelImpl.java:2221)
>>
>> at
>> org.eclipse.emf.importer.ModelImporter.prepareGenModelAndEPa ckages(ModelImporter.java:714)
>>
>> at
>> org.eclipse.uml2.uml.ecore.importer.UMLImporter.prepareGenMo delAndEPackages(UMLImporter.java:311)
>>
>> at
>> org.eclipse.emf.importer.ui.contribution.base.ModelImporterW izard.doPerformFinish(ModelImporterWizard.java:149)
>>
>> at
>> org.eclipse.emf.converter.ui.contribution.base.ModelConverte rWizard$1.execute(ModelConverterWizard.java:228)
>>
>> at
>> org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(Worksp aceModifyOperation.java:106
>>
>>
>>
>> I really didn't know, why this particular primitve type causes the
>> exception. Any help would be appreciated.
>>
>> Regards Timothy
|
|
|
Re: InvocationTargetException during conversion of an eDataType [message #497685 is a reply to message #497158] |
Fri, 13 November 2009 10:04 |
Timothy Marc Messages: 547 Registered: July 2009 |
Senior Member |
|
|
Hi Ed,
strange, i've unapplied and reapplied the stereotype and i've ensured,
that none of the possible issue, you mentioned, occurred. It fails
again. Then, i applied the stereotypes and the names programmatically.
That was successfull. Now, it works quite well...
Timothy
Ed Merks schrieb:
> Timothy,
>
> It sounds like the name of this EDatType is likely the empty string,
> which isn't valid. Or maybe the XML name is set to the empty string,
> which marks it as the document root, which it clearly is not.
>
>
> Timothy Marc wrote:
>> Hi,
>>
>> i've tried to convert an UML model into Ecore, which works quite well
>> except one problem. I've defined a PrimitiveType Long, stereotyped it
>> with EcoreProfile eDataType{instanceTypeName = java.lang.Long;
>> dataTypeName = Long}. There are other primitive types too in the
>> model, but for this long type, the generator throws the following
>> exception:
>>
>> java.lang.ClassCastException: org.eclipse.emf.ecore.impl.EDataTypeImpl
>> cannot be cast to org.eclipse.emf.ecore.EClass
>> at
>> org.eclipse.emf.ecore.util.BasicExtendedMetaData.getDocument Root(BasicExtendedMetaData.java:136)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenClassImpl.isD ocumentRoot(GenClassImpl.java:2910)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenFeatureImpl.i nitialize(GenFeatureImpl.java:1528)
>>
>> at
>> org.eclipse.uml2.codegen.ecore.genmodel.impl.GenFeatureImpl. initialize(GenFeatureImpl.java:809)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenClassImpl.ini tialize(GenClassImpl.java:1618)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenPackageImpl.i nitialize(GenPackageImpl.java:2815)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenModelImpl.ini tialize(GenModelImpl.java:2221)
>>
>> at
>> org.eclipse.emf.importer.ModelImporter.prepareGenModelAndEPa ckages(ModelImporter.java:714)
>>
>> at
>> org.eclipse.uml2.uml.ecore.importer.UMLImporter.prepareGenMo delAndEPackages(UMLImporter.java:311)
>>
>> at
>> org.eclipse.emf.importer.ui.contribution.base.ModelImporterW izard.doPerformFinish(ModelImporterWizard.java:149)
>>
>> at
>> org.eclipse.emf.converter.ui.contribution.base.ModelConverte rWizard$1.execute(ModelConverterWizard.java:228)
>>
>> at
>> org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(Worksp aceModifyOperation.java:106
>>
>>
>>
>> I really didn't know, why this particular primitve type causes the
>> exception. Any help would be appreciated.
>>
>> Regards Timothy
|
|
|
Re: InvocationTargetException during conversion of an eDataType [message #497691 is a reply to message #497158] |
Fri, 13 November 2009 10:04 |
Timothy Marc Messages: 547 Registered: July 2009 |
Senior Member |
|
|
Hi Ed,
strange, i've unapplied and reapplied the stereotype and i've ensured,
that none of the possible issue, you mentioned, occurred. It fails
again. Then, i applied the stereotypes and the names programmatically.
That was successfull. Now, it works quite well...
Timothy
Ed Merks schrieb:
> Timothy,
>
> It sounds like the name of this EDatType is likely the empty string,
> which isn't valid. Or maybe the XML name is set to the empty string,
> which marks it as the document root, which it clearly is not.
>
>
> Timothy Marc wrote:
>> Hi,
>>
>> i've tried to convert an UML model into Ecore, which works quite well
>> except one problem. I've defined a PrimitiveType Long, stereotyped it
>> with EcoreProfile eDataType{instanceTypeName = java.lang.Long;
>> dataTypeName = Long}. There are other primitive types too in the
>> model, but for this long type, the generator throws the following
>> exception:
>>
>> java.lang.ClassCastException: org.eclipse.emf.ecore.impl.EDataTypeImpl
>> cannot be cast to org.eclipse.emf.ecore.EClass
>> at
>> org.eclipse.emf.ecore.util.BasicExtendedMetaData.getDocument Root(BasicExtendedMetaData.java:136)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenClassImpl.isD ocumentRoot(GenClassImpl.java:2910)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenFeatureImpl.i nitialize(GenFeatureImpl.java:1528)
>>
>> at
>> org.eclipse.uml2.codegen.ecore.genmodel.impl.GenFeatureImpl. initialize(GenFeatureImpl.java:809)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenClassImpl.ini tialize(GenClassImpl.java:1618)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenPackageImpl.i nitialize(GenPackageImpl.java:2815)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenModelImpl.ini tialize(GenModelImpl.java:2221)
>>
>> at
>> org.eclipse.emf.importer.ModelImporter.prepareGenModelAndEPa ckages(ModelImporter.java:714)
>>
>> at
>> org.eclipse.uml2.uml.ecore.importer.UMLImporter.prepareGenMo delAndEPackages(UMLImporter.java:311)
>>
>> at
>> org.eclipse.emf.importer.ui.contribution.base.ModelImporterW izard.doPerformFinish(ModelImporterWizard.java:149)
>>
>> at
>> org.eclipse.emf.converter.ui.contribution.base.ModelConverte rWizard$1.execute(ModelConverterWizard.java:228)
>>
>> at
>> org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(Worksp aceModifyOperation.java:106
>>
>>
>>
>> I really didn't know, why this particular primitve type causes the
>> exception. Any help would be appreciated.
>>
>> Regards Timothy
|
|
|
Re: InvocationTargetException during conversion of an eDataType [message #497704 is a reply to message #497158] |
Fri, 13 November 2009 10:04 |
Timothy Marc Messages: 547 Registered: July 2009 |
Senior Member |
|
|
Hi Ed,
strange, i've unapplied and reapplied the stereotype and i've ensured,
that none of the possible issue, you mentioned, occurred. It fails
again. Then, i applied the stereotypes and the names programmatically.
That was successfull. Now, it works quite well...
Timothy
Ed Merks schrieb:
> Timothy,
>
> It sounds like the name of this EDatType is likely the empty string,
> which isn't valid. Or maybe the XML name is set to the empty string,
> which marks it as the document root, which it clearly is not.
>
>
> Timothy Marc wrote:
>> Hi,
>>
>> i've tried to convert an UML model into Ecore, which works quite well
>> except one problem. I've defined a PrimitiveType Long, stereotyped it
>> with EcoreProfile eDataType{instanceTypeName = java.lang.Long;
>> dataTypeName = Long}. There are other primitive types too in the
>> model, but for this long type, the generator throws the following
>> exception:
>>
>> java.lang.ClassCastException: org.eclipse.emf.ecore.impl.EDataTypeImpl
>> cannot be cast to org.eclipse.emf.ecore.EClass
>> at
>> org.eclipse.emf.ecore.util.BasicExtendedMetaData.getDocument Root(BasicExtendedMetaData.java:136)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenClassImpl.isD ocumentRoot(GenClassImpl.java:2910)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenFeatureImpl.i nitialize(GenFeatureImpl.java:1528)
>>
>> at
>> org.eclipse.uml2.codegen.ecore.genmodel.impl.GenFeatureImpl. initialize(GenFeatureImpl.java:809)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenClassImpl.ini tialize(GenClassImpl.java:1618)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenPackageImpl.i nitialize(GenPackageImpl.java:2815)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenModelImpl.ini tialize(GenModelImpl.java:2221)
>>
>> at
>> org.eclipse.emf.importer.ModelImporter.prepareGenModelAndEPa ckages(ModelImporter.java:714)
>>
>> at
>> org.eclipse.uml2.uml.ecore.importer.UMLImporter.prepareGenMo delAndEPackages(UMLImporter.java:311)
>>
>> at
>> org.eclipse.emf.importer.ui.contribution.base.ModelImporterW izard.doPerformFinish(ModelImporterWizard.java:149)
>>
>> at
>> org.eclipse.emf.converter.ui.contribution.base.ModelConverte rWizard$1.execute(ModelConverterWizard.java:228)
>>
>> at
>> org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(Worksp aceModifyOperation.java:106
>>
>>
>>
>> I really didn't know, why this particular primitve type causes the
>> exception. Any help would be appreciated.
>>
>> Regards Timothy
|
|
|
Re: InvocationTargetException during conversion of an eDataType [message #497706 is a reply to message #497158] |
Fri, 13 November 2009 10:04 |
Timothy Marc Messages: 547 Registered: July 2009 |
Senior Member |
|
|
Hi Ed,
strange, i've unapplied and reapplied the stereotype and i've ensured,
that none of the possible issue, you mentioned, occurred. It fails
again. Then, i applied the stereotypes and the names programmatically.
That was successfull. Now, it works quite well...
Timothy
Ed Merks schrieb:
> Timothy,
>
> It sounds like the name of this EDatType is likely the empty string,
> which isn't valid. Or maybe the XML name is set to the empty string,
> which marks it as the document root, which it clearly is not.
>
>
> Timothy Marc wrote:
>> Hi,
>>
>> i've tried to convert an UML model into Ecore, which works quite well
>> except one problem. I've defined a PrimitiveType Long, stereotyped it
>> with EcoreProfile eDataType{instanceTypeName = java.lang.Long;
>> dataTypeName = Long}. There are other primitive types too in the
>> model, but for this long type, the generator throws the following
>> exception:
>>
>> java.lang.ClassCastException: org.eclipse.emf.ecore.impl.EDataTypeImpl
>> cannot be cast to org.eclipse.emf.ecore.EClass
>> at
>> org.eclipse.emf.ecore.util.BasicExtendedMetaData.getDocument Root(BasicExtendedMetaData.java:136)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenClassImpl.isD ocumentRoot(GenClassImpl.java:2910)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenFeatureImpl.i nitialize(GenFeatureImpl.java:1528)
>>
>> at
>> org.eclipse.uml2.codegen.ecore.genmodel.impl.GenFeatureImpl. initialize(GenFeatureImpl.java:809)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenClassImpl.ini tialize(GenClassImpl.java:1618)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenPackageImpl.i nitialize(GenPackageImpl.java:2815)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenModelImpl.ini tialize(GenModelImpl.java:2221)
>>
>> at
>> org.eclipse.emf.importer.ModelImporter.prepareGenModelAndEPa ckages(ModelImporter.java:714)
>>
>> at
>> org.eclipse.uml2.uml.ecore.importer.UMLImporter.prepareGenMo delAndEPackages(UMLImporter.java:311)
>>
>> at
>> org.eclipse.emf.importer.ui.contribution.base.ModelImporterW izard.doPerformFinish(ModelImporterWizard.java:149)
>>
>> at
>> org.eclipse.emf.converter.ui.contribution.base.ModelConverte rWizard$1.execute(ModelConverterWizard.java:228)
>>
>> at
>> org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(Worksp aceModifyOperation.java:106
>>
>>
>>
>> I really didn't know, why this particular primitve type causes the
>> exception. Any help would be appreciated.
>>
>> Regards Timothy
|
|
|
Re: InvocationTargetException during conversion of an eDataType [message #497731 is a reply to message #497158] |
Fri, 13 November 2009 10:04 |
Timothy Marc Messages: 547 Registered: July 2009 |
Senior Member |
|
|
Hi Ed,
strange, i've unapplied and reapplied the stereotype and i've ensured,
that none of the possible issue, you mentioned, occurred. It fails
again. Then, i applied the stereotypes and the names programmatically.
That was successfull. Now, it works quite well...
Timothy
Ed Merks schrieb:
> Timothy,
>
> It sounds like the name of this EDatType is likely the empty string,
> which isn't valid. Or maybe the XML name is set to the empty string,
> which marks it as the document root, which it clearly is not.
>
>
> Timothy Marc wrote:
>> Hi,
>>
>> i've tried to convert an UML model into Ecore, which works quite well
>> except one problem. I've defined a PrimitiveType Long, stereotyped it
>> with EcoreProfile eDataType{instanceTypeName = java.lang.Long;
>> dataTypeName = Long}. There are other primitive types too in the
>> model, but for this long type, the generator throws the following
>> exception:
>>
>> java.lang.ClassCastException: org.eclipse.emf.ecore.impl.EDataTypeImpl
>> cannot be cast to org.eclipse.emf.ecore.EClass
>> at
>> org.eclipse.emf.ecore.util.BasicExtendedMetaData.getDocument Root(BasicExtendedMetaData.java:136)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenClassImpl.isD ocumentRoot(GenClassImpl.java:2910)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenFeatureImpl.i nitialize(GenFeatureImpl.java:1528)
>>
>> at
>> org.eclipse.uml2.codegen.ecore.genmodel.impl.GenFeatureImpl. initialize(GenFeatureImpl.java:809)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenClassImpl.ini tialize(GenClassImpl.java:1618)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenPackageImpl.i nitialize(GenPackageImpl.java:2815)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenModelImpl.ini tialize(GenModelImpl.java:2221)
>>
>> at
>> org.eclipse.emf.importer.ModelImporter.prepareGenModelAndEPa ckages(ModelImporter.java:714)
>>
>> at
>> org.eclipse.uml2.uml.ecore.importer.UMLImporter.prepareGenMo delAndEPackages(UMLImporter.java:311)
>>
>> at
>> org.eclipse.emf.importer.ui.contribution.base.ModelImporterW izard.doPerformFinish(ModelImporterWizard.java:149)
>>
>> at
>> org.eclipse.emf.converter.ui.contribution.base.ModelConverte rWizard$1.execute(ModelConverterWizard.java:228)
>>
>> at
>> org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(Worksp aceModifyOperation.java:106
>>
>>
>>
>> I really didn't know, why this particular primitve type causes the
>> exception. Any help would be appreciated.
>>
>> Regards Timothy
|
|
|
Re: InvocationTargetException during conversion of an eDataType [message #497736 is a reply to message #497158] |
Fri, 13 November 2009 10:04 |
Timothy Marc Messages: 547 Registered: July 2009 |
Senior Member |
|
|
Hi Ed,
strange, i've unapplied and reapplied the stereotype and i've ensured,
that none of the possible issue, you mentioned, occurred. It fails
again. Then, i applied the stereotypes and the names programmatically.
That was successfull. Now, it works quite well...
Timothy
Ed Merks schrieb:
> Timothy,
>
> It sounds like the name of this EDatType is likely the empty string,
> which isn't valid. Or maybe the XML name is set to the empty string,
> which marks it as the document root, which it clearly is not.
>
>
> Timothy Marc wrote:
>> Hi,
>>
>> i've tried to convert an UML model into Ecore, which works quite well
>> except one problem. I've defined a PrimitiveType Long, stereotyped it
>> with EcoreProfile eDataType{instanceTypeName = java.lang.Long;
>> dataTypeName = Long}. There are other primitive types too in the
>> model, but for this long type, the generator throws the following
>> exception:
>>
>> java.lang.ClassCastException: org.eclipse.emf.ecore.impl.EDataTypeImpl
>> cannot be cast to org.eclipse.emf.ecore.EClass
>> at
>> org.eclipse.emf.ecore.util.BasicExtendedMetaData.getDocument Root(BasicExtendedMetaData.java:136)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenClassImpl.isD ocumentRoot(GenClassImpl.java:2910)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenFeatureImpl.i nitialize(GenFeatureImpl.java:1528)
>>
>> at
>> org.eclipse.uml2.codegen.ecore.genmodel.impl.GenFeatureImpl. initialize(GenFeatureImpl.java:809)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenClassImpl.ini tialize(GenClassImpl.java:1618)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenPackageImpl.i nitialize(GenPackageImpl.java:2815)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenModelImpl.ini tialize(GenModelImpl.java:2221)
>>
>> at
>> org.eclipse.emf.importer.ModelImporter.prepareGenModelAndEPa ckages(ModelImporter.java:714)
>>
>> at
>> org.eclipse.uml2.uml.ecore.importer.UMLImporter.prepareGenMo delAndEPackages(UMLImporter.java:311)
>>
>> at
>> org.eclipse.emf.importer.ui.contribution.base.ModelImporterW izard.doPerformFinish(ModelImporterWizard.java:149)
>>
>> at
>> org.eclipse.emf.converter.ui.contribution.base.ModelConverte rWizard$1.execute(ModelConverterWizard.java:228)
>>
>> at
>> org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(Worksp aceModifyOperation.java:106
>>
>>
>>
>> I really didn't know, why this particular primitve type causes the
>> exception. Any help would be appreciated.
>>
>> Regards Timothy
|
|
|
Re: InvocationTargetException during conversion of an eDataType [message #497737 is a reply to message #497158] |
Fri, 13 November 2009 10:04 |
Timothy Marc Messages: 547 Registered: July 2009 |
Senior Member |
|
|
Hi Ed,
strange, i've unapplied and reapplied the stereotype and i've ensured,
that none of the possible issue, you mentioned, occurred. It fails
again. Then, i applied the stereotypes and the names programmatically.
That was successfull. Now, it works quite well...
Timothy
Ed Merks schrieb:
> Timothy,
>
> It sounds like the name of this EDatType is likely the empty string,
> which isn't valid. Or maybe the XML name is set to the empty string,
> which marks it as the document root, which it clearly is not.
>
>
> Timothy Marc wrote:
>> Hi,
>>
>> i've tried to convert an UML model into Ecore, which works quite well
>> except one problem. I've defined a PrimitiveType Long, stereotyped it
>> with EcoreProfile eDataType{instanceTypeName = java.lang.Long;
>> dataTypeName = Long}. There are other primitive types too in the
>> model, but for this long type, the generator throws the following
>> exception:
>>
>> java.lang.ClassCastException: org.eclipse.emf.ecore.impl.EDataTypeImpl
>> cannot be cast to org.eclipse.emf.ecore.EClass
>> at
>> org.eclipse.emf.ecore.util.BasicExtendedMetaData.getDocument Root(BasicExtendedMetaData.java:136)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenClassImpl.isD ocumentRoot(GenClassImpl.java:2910)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenFeatureImpl.i nitialize(GenFeatureImpl.java:1528)
>>
>> at
>> org.eclipse.uml2.codegen.ecore.genmodel.impl.GenFeatureImpl. initialize(GenFeatureImpl.java:809)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenClassImpl.ini tialize(GenClassImpl.java:1618)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenPackageImpl.i nitialize(GenPackageImpl.java:2815)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenModelImpl.ini tialize(GenModelImpl.java:2221)
>>
>> at
>> org.eclipse.emf.importer.ModelImporter.prepareGenModelAndEPa ckages(ModelImporter.java:714)
>>
>> at
>> org.eclipse.uml2.uml.ecore.importer.UMLImporter.prepareGenMo delAndEPackages(UMLImporter.java:311)
>>
>> at
>> org.eclipse.emf.importer.ui.contribution.base.ModelImporterW izard.doPerformFinish(ModelImporterWizard.java:149)
>>
>> at
>> org.eclipse.emf.converter.ui.contribution.base.ModelConverte rWizard$1.execute(ModelConverterWizard.java:228)
>>
>> at
>> org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(Worksp aceModifyOperation.java:106
>>
>>
>>
>> I really didn't know, why this particular primitve type causes the
>> exception. Any help would be appreciated.
>>
>> Regards Timothy
|
|
|
Re: InvocationTargetException during conversion of an eDataType [message #497739 is a reply to message #497158] |
Fri, 13 November 2009 10:04 |
Timothy Marc Messages: 547 Registered: July 2009 |
Senior Member |
|
|
Hi Ed,
strange, i've unapplied and reapplied the stereotype and i've ensured,
that none of the possible issue, you mentioned, occurred. It fails
again. Then, i applied the stereotypes and the names programmatically.
That was successfull. Now, it works quite well...
Timothy
Ed Merks schrieb:
> Timothy,
>
> It sounds like the name of this EDatType is likely the empty string,
> which isn't valid. Or maybe the XML name is set to the empty string,
> which marks it as the document root, which it clearly is not.
>
>
> Timothy Marc wrote:
>> Hi,
>>
>> i've tried to convert an UML model into Ecore, which works quite well
>> except one problem. I've defined a PrimitiveType Long, stereotyped it
>> with EcoreProfile eDataType{instanceTypeName = java.lang.Long;
>> dataTypeName = Long}. There are other primitive types too in the
>> model, but for this long type, the generator throws the following
>> exception:
>>
>> java.lang.ClassCastException: org.eclipse.emf.ecore.impl.EDataTypeImpl
>> cannot be cast to org.eclipse.emf.ecore.EClass
>> at
>> org.eclipse.emf.ecore.util.BasicExtendedMetaData.getDocument Root(BasicExtendedMetaData.java:136)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenClassImpl.isD ocumentRoot(GenClassImpl.java:2910)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenFeatureImpl.i nitialize(GenFeatureImpl.java:1528)
>>
>> at
>> org.eclipse.uml2.codegen.ecore.genmodel.impl.GenFeatureImpl. initialize(GenFeatureImpl.java:809)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenClassImpl.ini tialize(GenClassImpl.java:1618)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenPackageImpl.i nitialize(GenPackageImpl.java:2815)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenModelImpl.ini tialize(GenModelImpl.java:2221)
>>
>> at
>> org.eclipse.emf.importer.ModelImporter.prepareGenModelAndEPa ckages(ModelImporter.java:714)
>>
>> at
>> org.eclipse.uml2.uml.ecore.importer.UMLImporter.prepareGenMo delAndEPackages(UMLImporter.java:311)
>>
>> at
>> org.eclipse.emf.importer.ui.contribution.base.ModelImporterW izard.doPerformFinish(ModelImporterWizard.java:149)
>>
>> at
>> org.eclipse.emf.converter.ui.contribution.base.ModelConverte rWizard$1.execute(ModelConverterWizard.java:228)
>>
>> at
>> org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(Worksp aceModifyOperation.java:106
>>
>>
>>
>> I really didn't know, why this particular primitve type causes the
>> exception. Any help would be appreciated.
>>
>> Regards Timothy
|
|
|
Re: InvocationTargetException during conversion of an eDataType [message #497774 is a reply to message #497158] |
Fri, 13 November 2009 10:04 |
Timothy Marc Messages: 547 Registered: July 2009 |
Senior Member |
|
|
Hi Ed,
strange, i've unapplied and reapplied the stereotype and i've ensured,
that none of the possible issue, you mentioned, occurred. It fails
again. Then, i applied the stereotypes and the names programmatically.
That was successfull. Now, it works quite well...
Timothy
Ed Merks schrieb:
> Timothy,
>
> It sounds like the name of this EDatType is likely the empty string,
> which isn't valid. Or maybe the XML name is set to the empty string,
> which marks it as the document root, which it clearly is not.
>
>
> Timothy Marc wrote:
>> Hi,
>>
>> i've tried to convert an UML model into Ecore, which works quite well
>> except one problem. I've defined a PrimitiveType Long, stereotyped it
>> with EcoreProfile eDataType{instanceTypeName = java.lang.Long;
>> dataTypeName = Long}. There are other primitive types too in the
>> model, but for this long type, the generator throws the following
>> exception:
>>
>> java.lang.ClassCastException: org.eclipse.emf.ecore.impl.EDataTypeImpl
>> cannot be cast to org.eclipse.emf.ecore.EClass
>> at
>> org.eclipse.emf.ecore.util.BasicExtendedMetaData.getDocument Root(BasicExtendedMetaData.java:136)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenClassImpl.isD ocumentRoot(GenClassImpl.java:2910)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenFeatureImpl.i nitialize(GenFeatureImpl.java:1528)
>>
>> at
>> org.eclipse.uml2.codegen.ecore.genmodel.impl.GenFeatureImpl. initialize(GenFeatureImpl.java:809)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenClassImpl.ini tialize(GenClassImpl.java:1618)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenPackageImpl.i nitialize(GenPackageImpl.java:2815)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenModelImpl.ini tialize(GenModelImpl.java:2221)
>>
>> at
>> org.eclipse.emf.importer.ModelImporter.prepareGenModelAndEPa ckages(ModelImporter.java:714)
>>
>> at
>> org.eclipse.uml2.uml.ecore.importer.UMLImporter.prepareGenMo delAndEPackages(UMLImporter.java:311)
>>
>> at
>> org.eclipse.emf.importer.ui.contribution.base.ModelImporterW izard.doPerformFinish(ModelImporterWizard.java:149)
>>
>> at
>> org.eclipse.emf.converter.ui.contribution.base.ModelConverte rWizard$1.execute(ModelConverterWizard.java:228)
>>
>> at
>> org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(Worksp aceModifyOperation.java:106
>>
>>
>>
>> I really didn't know, why this particular primitve type causes the
>> exception. Any help would be appreciated.
>>
>> Regards Timothy
|
|
|
Re: InvocationTargetException during conversion of an eDataType [message #497782 is a reply to message #497158] |
Fri, 13 November 2009 10:04 |
Timothy Marc Messages: 547 Registered: July 2009 |
Senior Member |
|
|
Hi Ed,
strange, i've unapplied and reapplied the stereotype and i've ensured,
that none of the possible issue, you mentioned, occurred. It fails
again. Then, i applied the stereotypes and the names programmatically.
That was successfull. Now, it works quite well...
Timothy
Ed Merks schrieb:
> Timothy,
>
> It sounds like the name of this EDatType is likely the empty string,
> which isn't valid. Or maybe the XML name is set to the empty string,
> which marks it as the document root, which it clearly is not.
>
>
> Timothy Marc wrote:
>> Hi,
>>
>> i've tried to convert an UML model into Ecore, which works quite well
>> except one problem. I've defined a PrimitiveType Long, stereotyped it
>> with EcoreProfile eDataType{instanceTypeName = java.lang.Long;
>> dataTypeName = Long}. There are other primitive types too in the
>> model, but for this long type, the generator throws the following
>> exception:
>>
>> java.lang.ClassCastException: org.eclipse.emf.ecore.impl.EDataTypeImpl
>> cannot be cast to org.eclipse.emf.ecore.EClass
>> at
>> org.eclipse.emf.ecore.util.BasicExtendedMetaData.getDocument Root(BasicExtendedMetaData.java:136)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenClassImpl.isD ocumentRoot(GenClassImpl.java:2910)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenFeatureImpl.i nitialize(GenFeatureImpl.java:1528)
>>
>> at
>> org.eclipse.uml2.codegen.ecore.genmodel.impl.GenFeatureImpl. initialize(GenFeatureImpl.java:809)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenClassImpl.ini tialize(GenClassImpl.java:1618)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenPackageImpl.i nitialize(GenPackageImpl.java:2815)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenModelImpl.ini tialize(GenModelImpl.java:2221)
>>
>> at
>> org.eclipse.emf.importer.ModelImporter.prepareGenModelAndEPa ckages(ModelImporter.java:714)
>>
>> at
>> org.eclipse.uml2.uml.ecore.importer.UMLImporter.prepareGenMo delAndEPackages(UMLImporter.java:311)
>>
>> at
>> org.eclipse.emf.importer.ui.contribution.base.ModelImporterW izard.doPerformFinish(ModelImporterWizard.java:149)
>>
>> at
>> org.eclipse.emf.converter.ui.contribution.base.ModelConverte rWizard$1.execute(ModelConverterWizard.java:228)
>>
>> at
>> org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(Worksp aceModifyOperation.java:106
>>
>>
>>
>> I really didn't know, why this particular primitve type causes the
>> exception. Any help would be appreciated.
>>
>> Regards Timothy
|
|
|
Re: InvocationTargetException during conversion of an eDataType [message #497784 is a reply to message #497158] |
Fri, 13 November 2009 10:04 |
Timothy Marc Messages: 547 Registered: July 2009 |
Senior Member |
|
|
Hi Ed,
strange, i've unapplied and reapplied the stereotype and i've ensured,
that none of the possible issue, you mentioned, occurred. It fails
again. Then, i applied the stereotypes and the names programmatically.
That was successfull. Now, it works quite well...
Timothy
Ed Merks schrieb:
> Timothy,
>
> It sounds like the name of this EDatType is likely the empty string,
> which isn't valid. Or maybe the XML name is set to the empty string,
> which marks it as the document root, which it clearly is not.
>
>
> Timothy Marc wrote:
>> Hi,
>>
>> i've tried to convert an UML model into Ecore, which works quite well
>> except one problem. I've defined a PrimitiveType Long, stereotyped it
>> with EcoreProfile eDataType{instanceTypeName = java.lang.Long;
>> dataTypeName = Long}. There are other primitive types too in the
>> model, but for this long type, the generator throws the following
>> exception:
>>
>> java.lang.ClassCastException: org.eclipse.emf.ecore.impl.EDataTypeImpl
>> cannot be cast to org.eclipse.emf.ecore.EClass
>> at
>> org.eclipse.emf.ecore.util.BasicExtendedMetaData.getDocument Root(BasicExtendedMetaData.java:136)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenClassImpl.isD ocumentRoot(GenClassImpl.java:2910)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenFeatureImpl.i nitialize(GenFeatureImpl.java:1528)
>>
>> at
>> org.eclipse.uml2.codegen.ecore.genmodel.impl.GenFeatureImpl. initialize(GenFeatureImpl.java:809)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenClassImpl.ini tialize(GenClassImpl.java:1618)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenPackageImpl.i nitialize(GenPackageImpl.java:2815)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenModelImpl.ini tialize(GenModelImpl.java:2221)
>>
>> at
>> org.eclipse.emf.importer.ModelImporter.prepareGenModelAndEPa ckages(ModelImporter.java:714)
>>
>> at
>> org.eclipse.uml2.uml.ecore.importer.UMLImporter.prepareGenMo delAndEPackages(UMLImporter.java:311)
>>
>> at
>> org.eclipse.emf.importer.ui.contribution.base.ModelImporterW izard.doPerformFinish(ModelImporterWizard.java:149)
>>
>> at
>> org.eclipse.emf.converter.ui.contribution.base.ModelConverte rWizard$1.execute(ModelConverterWizard.java:228)
>>
>> at
>> org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(Worksp aceModifyOperation.java:106
>>
>>
>>
>> I really didn't know, why this particular primitve type causes the
>> exception. Any help would be appreciated.
>>
>> Regards Timothy
|
|
|
Re: InvocationTargetException during conversion of an eDataType [message #497798 is a reply to message #497158] |
Fri, 13 November 2009 10:04 |
Timothy Marc Messages: 547 Registered: July 2009 |
Senior Member |
|
|
Hi Ed,
strange, i've unapplied and reapplied the stereotype and i've ensured,
that none of the possible issue, you mentioned, occurred. It fails
again. Then, i applied the stereotypes and the names programmatically.
That was successfull. Now, it works quite well...
Timothy
Ed Merks schrieb:
> Timothy,
>
> It sounds like the name of this EDatType is likely the empty string,
> which isn't valid. Or maybe the XML name is set to the empty string,
> which marks it as the document root, which it clearly is not.
>
>
> Timothy Marc wrote:
>> Hi,
>>
>> i've tried to convert an UML model into Ecore, which works quite well
>> except one problem. I've defined a PrimitiveType Long, stereotyped it
>> with EcoreProfile eDataType{instanceTypeName = java.lang.Long;
>> dataTypeName = Long}. There are other primitive types too in the
>> model, but for this long type, the generator throws the following
>> exception:
>>
>> java.lang.ClassCastException: org.eclipse.emf.ecore.impl.EDataTypeImpl
>> cannot be cast to org.eclipse.emf.ecore.EClass
>> at
>> org.eclipse.emf.ecore.util.BasicExtendedMetaData.getDocument Root(BasicExtendedMetaData.java:136)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenClassImpl.isD ocumentRoot(GenClassImpl.java:2910)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenFeatureImpl.i nitialize(GenFeatureImpl.java:1528)
>>
>> at
>> org.eclipse.uml2.codegen.ecore.genmodel.impl.GenFeatureImpl. initialize(GenFeatureImpl.java:809)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenClassImpl.ini tialize(GenClassImpl.java:1618)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenPackageImpl.i nitialize(GenPackageImpl.java:2815)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenModelImpl.ini tialize(GenModelImpl.java:2221)
>>
>> at
>> org.eclipse.emf.importer.ModelImporter.prepareGenModelAndEPa ckages(ModelImporter.java:714)
>>
>> at
>> org.eclipse.uml2.uml.ecore.importer.UMLImporter.prepareGenMo delAndEPackages(UMLImporter.java:311)
>>
>> at
>> org.eclipse.emf.importer.ui.contribution.base.ModelImporterW izard.doPerformFinish(ModelImporterWizard.java:149)
>>
>> at
>> org.eclipse.emf.converter.ui.contribution.base.ModelConverte rWizard$1.execute(ModelConverterWizard.java:228)
>>
>> at
>> org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(Worksp aceModifyOperation.java:106
>>
>>
>>
>> I really didn't know, why this particular primitve type causes the
>> exception. Any help would be appreciated.
>>
>> Regards Timothy
|
|
|
Re: InvocationTargetException during conversion of an eDataType [message #497800 is a reply to message #497158] |
Fri, 13 November 2009 10:04 |
Timothy Marc Messages: 547 Registered: July 2009 |
Senior Member |
|
|
Hi Ed,
strange, i've unapplied and reapplied the stereotype and i've ensured,
that none of the possible issue, you mentioned, occurred. It fails
again. Then, i applied the stereotypes and the names programmatically.
That was successfull. Now, it works quite well...
Timothy
Ed Merks schrieb:
> Timothy,
>
> It sounds like the name of this EDatType is likely the empty string,
> which isn't valid. Or maybe the XML name is set to the empty string,
> which marks it as the document root, which it clearly is not.
>
>
> Timothy Marc wrote:
>> Hi,
>>
>> i've tried to convert an UML model into Ecore, which works quite well
>> except one problem. I've defined a PrimitiveType Long, stereotyped it
>> with EcoreProfile eDataType{instanceTypeName = java.lang.Long;
>> dataTypeName = Long}. There are other primitive types too in the
>> model, but for this long type, the generator throws the following
>> exception:
>>
>> java.lang.ClassCastException: org.eclipse.emf.ecore.impl.EDataTypeImpl
>> cannot be cast to org.eclipse.emf.ecore.EClass
>> at
>> org.eclipse.emf.ecore.util.BasicExtendedMetaData.getDocument Root(BasicExtendedMetaData.java:136)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenClassImpl.isD ocumentRoot(GenClassImpl.java:2910)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenFeatureImpl.i nitialize(GenFeatureImpl.java:1528)
>>
>> at
>> org.eclipse.uml2.codegen.ecore.genmodel.impl.GenFeatureImpl. initialize(GenFeatureImpl.java:809)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenClassImpl.ini tialize(GenClassImpl.java:1618)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenPackageImpl.i nitialize(GenPackageImpl.java:2815)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenModelImpl.ini tialize(GenModelImpl.java:2221)
>>
>> at
>> org.eclipse.emf.importer.ModelImporter.prepareGenModelAndEPa ckages(ModelImporter.java:714)
>>
>> at
>> org.eclipse.uml2.uml.ecore.importer.UMLImporter.prepareGenMo delAndEPackages(UMLImporter.java:311)
>>
>> at
>> org.eclipse.emf.importer.ui.contribution.base.ModelImporterW izard.doPerformFinish(ModelImporterWizard.java:149)
>>
>> at
>> org.eclipse.emf.converter.ui.contribution.base.ModelConverte rWizard$1.execute(ModelConverterWizard.java:228)
>>
>> at
>> org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(Worksp aceModifyOperation.java:106
>>
>>
>>
>> I really didn't know, why this particular primitve type causes the
>> exception. Any help would be appreciated.
>>
>> Regards Timothy
|
|
|
Re: InvocationTargetException during conversion of an eDataType [message #497815 is a reply to message #497158] |
Fri, 13 November 2009 10:04 |
Timothy Marc Messages: 547 Registered: July 2009 |
Senior Member |
|
|
Hi Ed,
strange, i've unapplied and reapplied the stereotype and i've ensured,
that none of the possible issue, you mentioned, occurred. It fails
again. Then, i applied the stereotypes and the names programmatically.
That was successfull. Now, it works quite well...
Timothy
Ed Merks schrieb:
> Timothy,
>
> It sounds like the name of this EDatType is likely the empty string,
> which isn't valid. Or maybe the XML name is set to the empty string,
> which marks it as the document root, which it clearly is not.
>
>
> Timothy Marc wrote:
>> Hi,
>>
>> i've tried to convert an UML model into Ecore, which works quite well
>> except one problem. I've defined a PrimitiveType Long, stereotyped it
>> with EcoreProfile eDataType{instanceTypeName = java.lang.Long;
>> dataTypeName = Long}. There are other primitive types too in the
>> model, but for this long type, the generator throws the following
>> exception:
>>
>> java.lang.ClassCastException: org.eclipse.emf.ecore.impl.EDataTypeImpl
>> cannot be cast to org.eclipse.emf.ecore.EClass
>> at
>> org.eclipse.emf.ecore.util.BasicExtendedMetaData.getDocument Root(BasicExtendedMetaData.java:136)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenClassImpl.isD ocumentRoot(GenClassImpl.java:2910)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenFeatureImpl.i nitialize(GenFeatureImpl.java:1528)
>>
>> at
>> org.eclipse.uml2.codegen.ecore.genmodel.impl.GenFeatureImpl. initialize(GenFeatureImpl.java:809)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenClassImpl.ini tialize(GenClassImpl.java:1618)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenPackageImpl.i nitialize(GenPackageImpl.java:2815)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenModelImpl.ini tialize(GenModelImpl.java:2221)
>>
>> at
>> org.eclipse.emf.importer.ModelImporter.prepareGenModelAndEPa ckages(ModelImporter.java:714)
>>
>> at
>> org.eclipse.uml2.uml.ecore.importer.UMLImporter.prepareGenMo delAndEPackages(UMLImporter.java:311)
>>
>> at
>> org.eclipse.emf.importer.ui.contribution.base.ModelImporterW izard.doPerformFinish(ModelImporterWizard.java:149)
>>
>> at
>> org.eclipse.emf.converter.ui.contribution.base.ModelConverte rWizard$1.execute(ModelConverterWizard.java:228)
>>
>> at
>> org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(Worksp aceModifyOperation.java:106
>>
>>
>>
>> I really didn't know, why this particular primitve type causes the
>> exception. Any help would be appreciated.
>>
>> Regards Timothy
|
|
|
Re: InvocationTargetException during conversion of an eDataType [message #497820 is a reply to message #497158] |
Fri, 13 November 2009 10:04 |
Timothy Marc Messages: 547 Registered: July 2009 |
Senior Member |
|
|
Hi Ed,
strange, i've unapplied and reapplied the stereotype and i've ensured,
that none of the possible issue, you mentioned, occurred. It fails
again. Then, i applied the stereotypes and the names programmatically.
That was successfull. Now, it works quite well...
Timothy
Ed Merks schrieb:
> Timothy,
>
> It sounds like the name of this EDatType is likely the empty string,
> which isn't valid. Or maybe the XML name is set to the empty string,
> which marks it as the document root, which it clearly is not.
>
>
> Timothy Marc wrote:
>> Hi,
>>
>> i've tried to convert an UML model into Ecore, which works quite well
>> except one problem. I've defined a PrimitiveType Long, stereotyped it
>> with EcoreProfile eDataType{instanceTypeName = java.lang.Long;
>> dataTypeName = Long}. There are other primitive types too in the
>> model, but for this long type, the generator throws the following
>> exception:
>>
>> java.lang.ClassCastException: org.eclipse.emf.ecore.impl.EDataTypeImpl
>> cannot be cast to org.eclipse.emf.ecore.EClass
>> at
>> org.eclipse.emf.ecore.util.BasicExtendedMetaData.getDocument Root(BasicExtendedMetaData.java:136)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenClassImpl.isD ocumentRoot(GenClassImpl.java:2910)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenFeatureImpl.i nitialize(GenFeatureImpl.java:1528)
>>
>> at
>> org.eclipse.uml2.codegen.ecore.genmodel.impl.GenFeatureImpl. initialize(GenFeatureImpl.java:809)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenClassImpl.ini tialize(GenClassImpl.java:1618)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenPackageImpl.i nitialize(GenPackageImpl.java:2815)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenModelImpl.ini tialize(GenModelImpl.java:2221)
>>
>> at
>> org.eclipse.emf.importer.ModelImporter.prepareGenModelAndEPa ckages(ModelImporter.java:714)
>>
>> at
>> org.eclipse.uml2.uml.ecore.importer.UMLImporter.prepareGenMo delAndEPackages(UMLImporter.java:311)
>>
>> at
>> org.eclipse.emf.importer.ui.contribution.base.ModelImporterW izard.doPerformFinish(ModelImporterWizard.java:149)
>>
>> at
>> org.eclipse.emf.converter.ui.contribution.base.ModelConverte rWizard$1.execute(ModelConverterWizard.java:228)
>>
>> at
>> org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(Worksp aceModifyOperation.java:106
>>
>>
>>
>> I really didn't know, why this particular primitve type causes the
>> exception. Any help would be appreciated.
>>
>> Regards Timothy
|
|
|
Re: InvocationTargetException during conversion of an eDataType [message #497827 is a reply to message #497158] |
Fri, 13 November 2009 10:04 |
Timothy Marc Messages: 547 Registered: July 2009 |
Senior Member |
|
|
Hi Ed,
strange, i've unapplied and reapplied the stereotype and i've ensured,
that none of the possible issue, you mentioned, occurred. It fails
again. Then, i applied the stereotypes and the names programmatically.
That was successfull. Now, it works quite well...
Timothy
Ed Merks schrieb:
> Timothy,
>
> It sounds like the name of this EDatType is likely the empty string,
> which isn't valid. Or maybe the XML name is set to the empty string,
> which marks it as the document root, which it clearly is not.
>
>
> Timothy Marc wrote:
>> Hi,
>>
>> i've tried to convert an UML model into Ecore, which works quite well
>> except one problem. I've defined a PrimitiveType Long, stereotyped it
>> with EcoreProfile eDataType{instanceTypeName = java.lang.Long;
>> dataTypeName = Long}. There are other primitive types too in the
>> model, but for this long type, the generator throws the following
>> exception:
>>
>> java.lang.ClassCastException: org.eclipse.emf.ecore.impl.EDataTypeImpl
>> cannot be cast to org.eclipse.emf.ecore.EClass
>> at
>> org.eclipse.emf.ecore.util.BasicExtendedMetaData.getDocument Root(BasicExtendedMetaData.java:136)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenClassImpl.isD ocumentRoot(GenClassImpl.java:2910)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenFeatureImpl.i nitialize(GenFeatureImpl.java:1528)
>>
>> at
>> org.eclipse.uml2.codegen.ecore.genmodel.impl.GenFeatureImpl. initialize(GenFeatureImpl.java:809)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenClassImpl.ini tialize(GenClassImpl.java:1618)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenPackageImpl.i nitialize(GenPackageImpl.java:2815)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenModelImpl.ini tialize(GenModelImpl.java:2221)
>>
>> at
>> org.eclipse.emf.importer.ModelImporter.prepareGenModelAndEPa ckages(ModelImporter.java:714)
>>
>> at
>> org.eclipse.uml2.uml.ecore.importer.UMLImporter.prepareGenMo delAndEPackages(UMLImporter.java:311)
>>
>> at
>> org.eclipse.emf.importer.ui.contribution.base.ModelImporterW izard.doPerformFinish(ModelImporterWizard.java:149)
>>
>> at
>> org.eclipse.emf.converter.ui.contribution.base.ModelConverte rWizard$1.execute(ModelConverterWizard.java:228)
>>
>> at
>> org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(Worksp aceModifyOperation.java:106
>>
>>
>>
>> I really didn't know, why this particular primitve type causes the
>> exception. Any help would be appreciated.
>>
>> Regards Timothy
|
|
|
Re: InvocationTargetException during conversion of an eDataType [message #497833 is a reply to message #497158] |
Fri, 13 November 2009 10:04 |
Timothy Marc Messages: 547 Registered: July 2009 |
Senior Member |
|
|
Hi Ed,
strange, i've unapplied and reapplied the stereotype and i've ensured,
that none of the possible issue, you mentioned, occurred. It fails
again. Then, i applied the stereotypes and the names programmatically.
That was successfull. Now, it works quite well...
Timothy
Ed Merks schrieb:
> Timothy,
>
> It sounds like the name of this EDatType is likely the empty string,
> which isn't valid. Or maybe the XML name is set to the empty string,
> which marks it as the document root, which it clearly is not.
>
>
> Timothy Marc wrote:
>> Hi,
>>
>> i've tried to convert an UML model into Ecore, which works quite well
>> except one problem. I've defined a PrimitiveType Long, stereotyped it
>> with EcoreProfile eDataType{instanceTypeName = java.lang.Long;
>> dataTypeName = Long}. There are other primitive types too in the
>> model, but for this long type, the generator throws the following
>> exception:
>>
>> java.lang.ClassCastException: org.eclipse.emf.ecore.impl.EDataTypeImpl
>> cannot be cast to org.eclipse.emf.ecore.EClass
>> at
>> org.eclipse.emf.ecore.util.BasicExtendedMetaData.getDocument Root(BasicExtendedMetaData.java:136)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenClassImpl.isD ocumentRoot(GenClassImpl.java:2910)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenFeatureImpl.i nitialize(GenFeatureImpl.java:1528)
>>
>> at
>> org.eclipse.uml2.codegen.ecore.genmodel.impl.GenFeatureImpl. initialize(GenFeatureImpl.java:809)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenClassImpl.ini tialize(GenClassImpl.java:1618)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenPackageImpl.i nitialize(GenPackageImpl.java:2815)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenModelImpl.ini tialize(GenModelImpl.java:2221)
>>
>> at
>> org.eclipse.emf.importer.ModelImporter.prepareGenModelAndEPa ckages(ModelImporter.java:714)
>>
>> at
>> org.eclipse.uml2.uml.ecore.importer.UMLImporter.prepareGenMo delAndEPackages(UMLImporter.java:311)
>>
>> at
>> org.eclipse.emf.importer.ui.contribution.base.ModelImporterW izard.doPerformFinish(ModelImporterWizard.java:149)
>>
>> at
>> org.eclipse.emf.converter.ui.contribution.base.ModelConverte rWizard$1.execute(ModelConverterWizard.java:228)
>>
>> at
>> org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(Worksp aceModifyOperation.java:106
>>
>>
>>
>> I really didn't know, why this particular primitve type causes the
>> exception. Any help would be appreciated.
>>
>> Regards Timothy
|
|
|
Re: InvocationTargetException during conversion of an eDataType [message #497847 is a reply to message #497158] |
Fri, 13 November 2009 10:04 |
Timothy Marc Messages: 547 Registered: July 2009 |
Senior Member |
|
|
Hi Ed,
strange, i've unapplied and reapplied the stereotype and i've ensured,
that none of the possible issue, you mentioned, occurred. It fails
again. Then, i applied the stereotypes and the names programmatically.
That was successfull. Now, it works quite well...
Timothy
Ed Merks schrieb:
> Timothy,
>
> It sounds like the name of this EDatType is likely the empty string,
> which isn't valid. Or maybe the XML name is set to the empty string,
> which marks it as the document root, which it clearly is not.
>
>
> Timothy Marc wrote:
>> Hi,
>>
>> i've tried to convert an UML model into Ecore, which works quite well
>> except one problem. I've defined a PrimitiveType Long, stereotyped it
>> with EcoreProfile eDataType{instanceTypeName = java.lang.Long;
>> dataTypeName = Long}. There are other primitive types too in the
>> model, but for this long type, the generator throws the following
>> exception:
>>
>> java.lang.ClassCastException: org.eclipse.emf.ecore.impl.EDataTypeImpl
>> cannot be cast to org.eclipse.emf.ecore.EClass
>> at
>> org.eclipse.emf.ecore.util.BasicExtendedMetaData.getDocument Root(BasicExtendedMetaData.java:136)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenClassImpl.isD ocumentRoot(GenClassImpl.java:2910)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenFeatureImpl.i nitialize(GenFeatureImpl.java:1528)
>>
>> at
>> org.eclipse.uml2.codegen.ecore.genmodel.impl.GenFeatureImpl. initialize(GenFeatureImpl.java:809)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenClassImpl.ini tialize(GenClassImpl.java:1618)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenPackageImpl.i nitialize(GenPackageImpl.java:2815)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenModelImpl.ini tialize(GenModelImpl.java:2221)
>>
>> at
>> org.eclipse.emf.importer.ModelImporter.prepareGenModelAndEPa ckages(ModelImporter.java:714)
>>
>> at
>> org.eclipse.uml2.uml.ecore.importer.UMLImporter.prepareGenMo delAndEPackages(UMLImporter.java:311)
>>
>> at
>> org.eclipse.emf.importer.ui.contribution.base.ModelImporterW izard.doPerformFinish(ModelImporterWizard.java:149)
>>
>> at
>> org.eclipse.emf.converter.ui.contribution.base.ModelConverte rWizard$1.execute(ModelConverterWizard.java:228)
>>
>> at
>> org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(Worksp aceModifyOperation.java:106
>>
>>
>>
>> I really didn't know, why this particular primitve type causes the
>> exception. Any help would be appreciated.
>>
>> Regards Timothy
|
|
|
Re: InvocationTargetException during conversion of an eDataType [message #497850 is a reply to message #497158] |
Fri, 13 November 2009 10:04 |
Timothy Marc Messages: 547 Registered: July 2009 |
Senior Member |
|
|
Hi Ed,
strange, i've unapplied and reapplied the stereotype and i've ensured,
that none of the possible issue, you mentioned, occurred. It fails
again. Then, i applied the stereotypes and the names programmatically.
That was successfull. Now, it works quite well...
Timothy
Ed Merks schrieb:
> Timothy,
>
> It sounds like the name of this EDatType is likely the empty string,
> which isn't valid. Or maybe the XML name is set to the empty string,
> which marks it as the document root, which it clearly is not.
>
>
> Timothy Marc wrote:
>> Hi,
>>
>> i've tried to convert an UML model into Ecore, which works quite well
>> except one problem. I've defined a PrimitiveType Long, stereotyped it
>> with EcoreProfile eDataType{instanceTypeName = java.lang.Long;
>> dataTypeName = Long}. There are other primitive types too in the
>> model, but for this long type, the generator throws the following
>> exception:
>>
>> java.lang.ClassCastException: org.eclipse.emf.ecore.impl.EDataTypeImpl
>> cannot be cast to org.eclipse.emf.ecore.EClass
>> at
>> org.eclipse.emf.ecore.util.BasicExtendedMetaData.getDocument Root(BasicExtendedMetaData.java:136)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenClassImpl.isD ocumentRoot(GenClassImpl.java:2910)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenFeatureImpl.i nitialize(GenFeatureImpl.java:1528)
>>
>> at
>> org.eclipse.uml2.codegen.ecore.genmodel.impl.GenFeatureImpl. initialize(GenFeatureImpl.java:809)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenClassImpl.ini tialize(GenClassImpl.java:1618)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenPackageImpl.i nitialize(GenPackageImpl.java:2815)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenModelImpl.ini tialize(GenModelImpl.java:2221)
>>
>> at
>> org.eclipse.emf.importer.ModelImporter.prepareGenModelAndEPa ckages(ModelImporter.java:714)
>>
>> at
>> org.eclipse.uml2.uml.ecore.importer.UMLImporter.prepareGenMo delAndEPackages(UMLImporter.java:311)
>>
>> at
>> org.eclipse.emf.importer.ui.contribution.base.ModelImporterW izard.doPerformFinish(ModelImporterWizard.java:149)
>>
>> at
>> org.eclipse.emf.converter.ui.contribution.base.ModelConverte rWizard$1.execute(ModelConverterWizard.java:228)
>>
>> at
>> org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(Worksp aceModifyOperation.java:106
>>
>>
>>
>> I really didn't know, why this particular primitve type causes the
>> exception. Any help would be appreciated.
>>
>> Regards Timothy
|
|
|
Re: InvocationTargetException during conversion of an eDataType [message #497873 is a reply to message #497158] |
Fri, 13 November 2009 10:04 |
Timothy Marc Messages: 547 Registered: July 2009 |
Senior Member |
|
|
Hi Ed,
strange, i've unapplied and reapplied the stereotype and i've ensured,
that none of the possible issue, you mentioned, occurred. It fails
again. Then, i applied the stereotypes and the names programmatically.
That was successfull. Now, it works quite well...
Timothy
Ed Merks schrieb:
> Timothy,
>
> It sounds like the name of this EDatType is likely the empty string,
> which isn't valid. Or maybe the XML name is set to the empty string,
> which marks it as the document root, which it clearly is not.
>
>
> Timothy Marc wrote:
>> Hi,
>>
>> i've tried to convert an UML model into Ecore, which works quite well
>> except one problem. I've defined a PrimitiveType Long, stereotyped it
>> with EcoreProfile eDataType{instanceTypeName = java.lang.Long;
>> dataTypeName = Long}. There are other primitive types too in the
>> model, but for this long type, the generator throws the following
>> exception:
>>
>> java.lang.ClassCastException: org.eclipse.emf.ecore.impl.EDataTypeImpl
>> cannot be cast to org.eclipse.emf.ecore.EClass
>> at
>> org.eclipse.emf.ecore.util.BasicExtendedMetaData.getDocument Root(BasicExtendedMetaData.java:136)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenClassImpl.isD ocumentRoot(GenClassImpl.java:2910)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenFeatureImpl.i nitialize(GenFeatureImpl.java:1528)
>>
>> at
>> org.eclipse.uml2.codegen.ecore.genmodel.impl.GenFeatureImpl. initialize(GenFeatureImpl.java:809)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenClassImpl.ini tialize(GenClassImpl.java:1618)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenPackageImpl.i nitialize(GenPackageImpl.java:2815)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenModelImpl.ini tialize(GenModelImpl.java:2221)
>>
>> at
>> org.eclipse.emf.importer.ModelImporter.prepareGenModelAndEPa ckages(ModelImporter.java:714)
>>
>> at
>> org.eclipse.uml2.uml.ecore.importer.UMLImporter.prepareGenMo delAndEPackages(UMLImporter.java:311)
>>
>> at
>> org.eclipse.emf.importer.ui.contribution.base.ModelImporterW izard.doPerformFinish(ModelImporterWizard.java:149)
>>
>> at
>> org.eclipse.emf.converter.ui.contribution.base.ModelConverte rWizard$1.execute(ModelConverterWizard.java:228)
>>
>> at
>> org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(Worksp aceModifyOperation.java:106
>>
>>
>>
>> I really didn't know, why this particular primitve type causes the
>> exception. Any help would be appreciated.
>>
>> Regards Timothy
|
|
|
Re: InvocationTargetException during conversion of an eDataType [message #497874 is a reply to message #497158] |
Fri, 13 November 2009 10:04 |
Timothy Marc Messages: 547 Registered: July 2009 |
Senior Member |
|
|
Hi Ed,
strange, i've unapplied and reapplied the stereotype and i've ensured,
that none of the possible issue, you mentioned, occurred. It fails
again. Then, i applied the stereotypes and the names programmatically.
That was successfull. Now, it works quite well...
Timothy
Ed Merks schrieb:
> Timothy,
>
> It sounds like the name of this EDatType is likely the empty string,
> which isn't valid. Or maybe the XML name is set to the empty string,
> which marks it as the document root, which it clearly is not.
>
>
> Timothy Marc wrote:
>> Hi,
>>
>> i've tried to convert an UML model into Ecore, which works quite well
>> except one problem. I've defined a PrimitiveType Long, stereotyped it
>> with EcoreProfile eDataType{instanceTypeName = java.lang.Long;
>> dataTypeName = Long}. There are other primitive types too in the
>> model, but for this long type, the generator throws the following
>> exception:
>>
>> java.lang.ClassCastException: org.eclipse.emf.ecore.impl.EDataTypeImpl
>> cannot be cast to org.eclipse.emf.ecore.EClass
>> at
>> org.eclipse.emf.ecore.util.BasicExtendedMetaData.getDocument Root(BasicExtendedMetaData.java:136)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenClassImpl.isD ocumentRoot(GenClassImpl.java:2910)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenFeatureImpl.i nitialize(GenFeatureImpl.java:1528)
>>
>> at
>> org.eclipse.uml2.codegen.ecore.genmodel.impl.GenFeatureImpl. initialize(GenFeatureImpl.java:809)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenClassImpl.ini tialize(GenClassImpl.java:1618)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenPackageImpl.i nitialize(GenPackageImpl.java:2815)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenModelImpl.ini tialize(GenModelImpl.java:2221)
>>
>> at
>> org.eclipse.emf.importer.ModelImporter.prepareGenModelAndEPa ckages(ModelImporter.java:714)
>>
>> at
>> org.eclipse.uml2.uml.ecore.importer.UMLImporter.prepareGenMo delAndEPackages(UMLImporter.java:311)
>>
>> at
>> org.eclipse.emf.importer.ui.contribution.base.ModelImporterW izard.doPerformFinish(ModelImporterWizard.java:149)
>>
>> at
>> org.eclipse.emf.converter.ui.contribution.base.ModelConverte rWizard$1.execute(ModelConverterWizard.java:228)
>>
>> at
>> org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(Worksp aceModifyOperation.java:106
>>
>>
>>
>> I really didn't know, why this particular primitve type causes the
>> exception. Any help would be appreciated.
>>
>> Regards Timothy
|
|
|
Re: InvocationTargetException during conversion of an eDataType [message #497875 is a reply to message #497158] |
Fri, 13 November 2009 10:04 |
Timothy Marc Messages: 547 Registered: July 2009 |
Senior Member |
|
|
Hi Ed,
strange, i've unapplied and reapplied the stereotype and i've ensured,
that none of the possible issue, you mentioned, occurred. It fails
again. Then, i applied the stereotypes and the names programmatically.
That was successfull. Now, it works quite well...
Timothy
Ed Merks schrieb:
> Timothy,
>
> It sounds like the name of this EDatType is likely the empty string,
> which isn't valid. Or maybe the XML name is set to the empty string,
> which marks it as the document root, which it clearly is not.
>
>
> Timothy Marc wrote:
>> Hi,
>>
>> i've tried to convert an UML model into Ecore, which works quite well
>> except one problem. I've defined a PrimitiveType Long, stereotyped it
>> with EcoreProfile eDataType{instanceTypeName = java.lang.Long;
>> dataTypeName = Long}. There are other primitive types too in the
>> model, but for this long type, the generator throws the following
>> exception:
>>
>> java.lang.ClassCastException: org.eclipse.emf.ecore.impl.EDataTypeImpl
>> cannot be cast to org.eclipse.emf.ecore.EClass
>> at
>> org.eclipse.emf.ecore.util.BasicExtendedMetaData.getDocument Root(BasicExtendedMetaData.java:136)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenClassImpl.isD ocumentRoot(GenClassImpl.java:2910)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenFeatureImpl.i nitialize(GenFeatureImpl.java:1528)
>>
>> at
>> org.eclipse.uml2.codegen.ecore.genmodel.impl.GenFeatureImpl. initialize(GenFeatureImpl.java:809)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenClassImpl.ini tialize(GenClassImpl.java:1618)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenPackageImpl.i nitialize(GenPackageImpl.java:2815)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenModelImpl.ini tialize(GenModelImpl.java:2221)
>>
>> at
>> org.eclipse.emf.importer.ModelImporter.prepareGenModelAndEPa ckages(ModelImporter.java:714)
>>
>> at
>> org.eclipse.uml2.uml.ecore.importer.UMLImporter.prepareGenMo delAndEPackages(UMLImporter.java:311)
>>
>> at
>> org.eclipse.emf.importer.ui.contribution.base.ModelImporterW izard.doPerformFinish(ModelImporterWizard.java:149)
>>
>> at
>> org.eclipse.emf.converter.ui.contribution.base.ModelConverte rWizard$1.execute(ModelConverterWizard.java:228)
>>
>> at
>> org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(Worksp aceModifyOperation.java:106
>>
>>
>>
>> I really didn't know, why this particular primitve type causes the
>> exception. Any help would be appreciated.
>>
>> Regards Timothy
|
|
|
Re: InvocationTargetException during conversion of an eDataType [message #497882 is a reply to message #497158] |
Fri, 13 November 2009 10:04 |
Timothy Marc Messages: 547 Registered: July 2009 |
Senior Member |
|
|
Hi Ed,
strange, i've unapplied and reapplied the stereotype and i've ensured,
that none of the possible issue, you mentioned, occurred. It fails
again. Then, i applied the stereotypes and the names programmatically.
That was successfull. Now, it works quite well...
Timothy
Ed Merks schrieb:
> Timothy,
>
> It sounds like the name of this EDatType is likely the empty string,
> which isn't valid. Or maybe the XML name is set to the empty string,
> which marks it as the document root, which it clearly is not.
>
>
> Timothy Marc wrote:
>> Hi,
>>
>> i've tried to convert an UML model into Ecore, which works quite well
>> except one problem. I've defined a PrimitiveType Long, stereotyped it
>> with EcoreProfile eDataType{instanceTypeName = java.lang.Long;
>> dataTypeName = Long}. There are other primitive types too in the
>> model, but for this long type, the generator throws the following
>> exception:
>>
>> java.lang.ClassCastException: org.eclipse.emf.ecore.impl.EDataTypeImpl
>> cannot be cast to org.eclipse.emf.ecore.EClass
>> at
>> org.eclipse.emf.ecore.util.BasicExtendedMetaData.getDocument Root(BasicExtendedMetaData.java:136)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenClassImpl.isD ocumentRoot(GenClassImpl.java:2910)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenFeatureImpl.i nitialize(GenFeatureImpl.java:1528)
>>
>> at
>> org.eclipse.uml2.codegen.ecore.genmodel.impl.GenFeatureImpl. initialize(GenFeatureImpl.java:809)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenClassImpl.ini tialize(GenClassImpl.java:1618)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenPackageImpl.i nitialize(GenPackageImpl.java:2815)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenModelImpl.ini tialize(GenModelImpl.java:2221)
>>
>> at
>> org.eclipse.emf.importer.ModelImporter.prepareGenModelAndEPa ckages(ModelImporter.java:714)
>>
>> at
>> org.eclipse.uml2.uml.ecore.importer.UMLImporter.prepareGenMo delAndEPackages(UMLImporter.java:311)
>>
>> at
>> org.eclipse.emf.importer.ui.contribution.base.ModelImporterW izard.doPerformFinish(ModelImporterWizard.java:149)
>>
>> at
>> org.eclipse.emf.converter.ui.contribution.base.ModelConverte rWizard$1.execute(ModelConverterWizard.java:228)
>>
>> at
>> org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(Worksp aceModifyOperation.java:106
>>
>>
>>
>> I really didn't know, why this particular primitve type causes the
>> exception. Any help would be appreciated.
>>
>> Regards Timothy
|
|
|
Re: InvocationTargetException during conversion of an eDataType [message #497895 is a reply to message #497158] |
Fri, 13 November 2009 10:04 |
Timothy Marc Messages: 547 Registered: July 2009 |
Senior Member |
|
|
Hi Ed,
strange, i've unapplied and reapplied the stereotype and i've ensured,
that none of the possible issue, you mentioned, occurred. It fails
again. Then, i applied the stereotypes and the names programmatically.
That was successfull. Now, it works quite well...
Timothy
Ed Merks schrieb:
> Timothy,
>
> It sounds like the name of this EDatType is likely the empty string,
> which isn't valid. Or maybe the XML name is set to the empty string,
> which marks it as the document root, which it clearly is not.
>
>
> Timothy Marc wrote:
>> Hi,
>>
>> i've tried to convert an UML model into Ecore, which works quite well
>> except one problem. I've defined a PrimitiveType Long, stereotyped it
>> with EcoreProfile eDataType{instanceTypeName = java.lang.Long;
>> dataTypeName = Long}. There are other primitive types too in the
>> model, but for this long type, the generator throws the following
>> exception:
>>
>> java.lang.ClassCastException: org.eclipse.emf.ecore.impl.EDataTypeImpl
>> cannot be cast to org.eclipse.emf.ecore.EClass
>> at
>> org.eclipse.emf.ecore.util.BasicExtendedMetaData.getDocument Root(BasicExtendedMetaData.java:136)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenClassImpl.isD ocumentRoot(GenClassImpl.java:2910)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenFeatureImpl.i nitialize(GenFeatureImpl.java:1528)
>>
>> at
>> org.eclipse.uml2.codegen.ecore.genmodel.impl.GenFeatureImpl. initialize(GenFeatureImpl.java:809)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenClassImpl.ini tialize(GenClassImpl.java:1618)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenPackageImpl.i nitialize(GenPackageImpl.java:2815)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenModelImpl.ini tialize(GenModelImpl.java:2221)
>>
>> at
>> org.eclipse.emf.importer.ModelImporter.prepareGenModelAndEPa ckages(ModelImporter.java:714)
>>
>> at
>> org.eclipse.uml2.uml.ecore.importer.UMLImporter.prepareGenMo delAndEPackages(UMLImporter.java:311)
>>
>> at
>> org.eclipse.emf.importer.ui.contribution.base.ModelImporterW izard.doPerformFinish(ModelImporterWizard.java:149)
>>
>> at
>> org.eclipse.emf.converter.ui.contribution.base.ModelConverte rWizard$1.execute(ModelConverterWizard.java:228)
>>
>> at
>> org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(Worksp aceModifyOperation.java:106
>>
>>
>>
>> I really didn't know, why this particular primitve type causes the
>> exception. Any help would be appreciated.
>>
>> Regards Timothy
|
|
|
Re: InvocationTargetException during conversion of an eDataType [message #497901 is a reply to message #497158] |
Fri, 13 November 2009 10:04 |
Timothy Marc Messages: 547 Registered: July 2009 |
Senior Member |
|
|
Hi Ed,
strange, i've unapplied and reapplied the stereotype and i've ensured,
that none of the possible issue, you mentioned, occurred. It fails
again. Then, i applied the stereotypes and the names programmatically.
That was successfull. Now, it works quite well...
Timothy
Ed Merks schrieb:
> Timothy,
>
> It sounds like the name of this EDatType is likely the empty string,
> which isn't valid. Or maybe the XML name is set to the empty string,
> which marks it as the document root, which it clearly is not.
>
>
> Timothy Marc wrote:
>> Hi,
>>
>> i've tried to convert an UML model into Ecore, which works quite well
>> except one problem. I've defined a PrimitiveType Long, stereotyped it
>> with EcoreProfile eDataType{instanceTypeName = java.lang.Long;
>> dataTypeName = Long}. There are other primitive types too in the
>> model, but for this long type, the generator throws the following
>> exception:
>>
>> java.lang.ClassCastException: org.eclipse.emf.ecore.impl.EDataTypeImpl
>> cannot be cast to org.eclipse.emf.ecore.EClass
>> at
>> org.eclipse.emf.ecore.util.BasicExtendedMetaData.getDocument Root(BasicExtendedMetaData.java:136)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenClassImpl.isD ocumentRoot(GenClassImpl.java:2910)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenFeatureImpl.i nitialize(GenFeatureImpl.java:1528)
>>
>> at
>> org.eclipse.uml2.codegen.ecore.genmodel.impl.GenFeatureImpl. initialize(GenFeatureImpl.java:809)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenClassImpl.ini tialize(GenClassImpl.java:1618)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenPackageImpl.i nitialize(GenPackageImpl.java:2815)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenModelImpl.ini tialize(GenModelImpl.java:2221)
>>
>> at
>> org.eclipse.emf.importer.ModelImporter.prepareGenModelAndEPa ckages(ModelImporter.java:714)
>>
>> at
>> org.eclipse.uml2.uml.ecore.importer.UMLImporter.prepareGenMo delAndEPackages(UMLImporter.java:311)
>>
>> at
>> org.eclipse.emf.importer.ui.contribution.base.ModelImporterW izard.doPerformFinish(ModelImporterWizard.java:149)
>>
>> at
>> org.eclipse.emf.converter.ui.contribution.base.ModelConverte rWizard$1.execute(ModelConverterWizard.java:228)
>>
>> at
>> org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(Worksp aceModifyOperation.java:106
>>
>>
>>
>> I really didn't know, why this particular primitve type causes the
>> exception. Any help would be appreciated.
>>
>> Regards Timothy
|
|
|
Re: InvocationTargetException during conversion of an eDataType [message #497903 is a reply to message #497158] |
Fri, 13 November 2009 10:04 |
Timothy Marc Messages: 547 Registered: July 2009 |
Senior Member |
|
|
Hi Ed,
strange, i've unapplied and reapplied the stereotype and i've ensured,
that none of the possible issue, you mentioned, occurred. It fails
again. Then, i applied the stereotypes and the names programmatically.
That was successfull. Now, it works quite well...
Timothy
Ed Merks schrieb:
> Timothy,
>
> It sounds like the name of this EDatType is likely the empty string,
> which isn't valid. Or maybe the XML name is set to the empty string,
> which marks it as the document root, which it clearly is not.
>
>
> Timothy Marc wrote:
>> Hi,
>>
>> i've tried to convert an UML model into Ecore, which works quite well
>> except one problem. I've defined a PrimitiveType Long, stereotyped it
>> with EcoreProfile eDataType{instanceTypeName = java.lang.Long;
>> dataTypeName = Long}. There are other primitive types too in the
>> model, but for this long type, the generator throws the following
>> exception:
>>
>> java.lang.ClassCastException: org.eclipse.emf.ecore.impl.EDataTypeImpl
>> cannot be cast to org.eclipse.emf.ecore.EClass
>> at
>> org.eclipse.emf.ecore.util.BasicExtendedMetaData.getDocument Root(BasicExtendedMetaData.java:136)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenClassImpl.isD ocumentRoot(GenClassImpl.java:2910)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenFeatureImpl.i nitialize(GenFeatureImpl.java:1528)
>>
>> at
>> org.eclipse.uml2.codegen.ecore.genmodel.impl.GenFeatureImpl. initialize(GenFeatureImpl.java:809)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenClassImpl.ini tialize(GenClassImpl.java:1618)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenPackageImpl.i nitialize(GenPackageImpl.java:2815)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenModelImpl.ini tialize(GenModelImpl.java:2221)
>>
>> at
>> org.eclipse.emf.importer.ModelImporter.prepareGenModelAndEPa ckages(ModelImporter.java:714)
>>
>> at
>> org.eclipse.uml2.uml.ecore.importer.UMLImporter.prepareGenMo delAndEPackages(UMLImporter.java:311)
>>
>> at
>> org.eclipse.emf.importer.ui.contribution.base.ModelImporterW izard.doPerformFinish(ModelImporterWizard.java:149)
>>
>> at
>> org.eclipse.emf.converter.ui.contribution.base.ModelConverte rWizard$1.execute(ModelConverterWizard.java:228)
>>
>> at
>> org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(Worksp aceModifyOperation.java:106
>>
>>
>>
>> I really didn't know, why this particular primitve type causes the
>> exception. Any help would be appreciated.
>>
>> Regards Timothy
|
|
|
Re: InvocationTargetException during conversion of an eDataType [message #497922 is a reply to message #497158] |
Fri, 13 November 2009 10:04 |
Timothy Marc Messages: 547 Registered: July 2009 |
Senior Member |
|
|
Hi Ed,
strange, i've unapplied and reapplied the stereotype and i've ensured,
that none of the possible issue, you mentioned, occurred. It fails
again. Then, i applied the stereotypes and the names programmatically.
That was successfull. Now, it works quite well...
Timothy
Ed Merks schrieb:
> Timothy,
>
> It sounds like the name of this EDatType is likely the empty string,
> which isn't valid. Or maybe the XML name is set to the empty string,
> which marks it as the document root, which it clearly is not.
>
>
> Timothy Marc wrote:
>> Hi,
>>
>> i've tried to convert an UML model into Ecore, which works quite well
>> except one problem. I've defined a PrimitiveType Long, stereotyped it
>> with EcoreProfile eDataType{instanceTypeName = java.lang.Long;
>> dataTypeName = Long}. There are other primitive types too in the
>> model, but for this long type, the generator throws the following
>> exception:
>>
>> java.lang.ClassCastException: org.eclipse.emf.ecore.impl.EDataTypeImpl
>> cannot be cast to org.eclipse.emf.ecore.EClass
>> at
>> org.eclipse.emf.ecore.util.BasicExtendedMetaData.getDocument Root(BasicExtendedMetaData.java:136)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenClassImpl.isD ocumentRoot(GenClassImpl.java:2910)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenFeatureImpl.i nitialize(GenFeatureImpl.java:1528)
>>
>> at
>> org.eclipse.uml2.codegen.ecore.genmodel.impl.GenFeatureImpl. initialize(GenFeatureImpl.java:809)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenClassImpl.ini tialize(GenClassImpl.java:1618)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenPackageImpl.i nitialize(GenPackageImpl.java:2815)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenModelImpl.ini tialize(GenModelImpl.java:2221)
>>
>> at
>> org.eclipse.emf.importer.ModelImporter.prepareGenModelAndEPa ckages(ModelImporter.java:714)
>>
>> at
>> org.eclipse.uml2.uml.ecore.importer.UMLImporter.prepareGenMo delAndEPackages(UMLImporter.java:311)
>>
>> at
>> org.eclipse.emf.importer.ui.contribution.base.ModelImporterW izard.doPerformFinish(ModelImporterWizard.java:149)
>>
>> at
>> org.eclipse.emf.converter.ui.contribution.base.ModelConverte rWizard$1.execute(ModelConverterWizard.java:228)
>>
>> at
>> org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(Worksp aceModifyOperation.java:106
>>
>>
>>
>> I really didn't know, why this particular primitve type causes the
>> exception. Any help would be appreciated.
>>
>> Regards Timothy
|
|
|
Re: InvocationTargetException during conversion of an eDataType [message #497936 is a reply to message #497158] |
Fri, 13 November 2009 10:04 |
Timothy Marc Messages: 547 Registered: July 2009 |
Senior Member |
|
|
Hi Ed,
strange, i've unapplied and reapplied the stereotype and i've ensured,
that none of the possible issue, you mentioned, occurred. It fails
again. Then, i applied the stereotypes and the names programmatically.
That was successfull. Now, it works quite well...
Timothy
Ed Merks schrieb:
> Timothy,
>
> It sounds like the name of this EDatType is likely the empty string,
> which isn't valid. Or maybe the XML name is set to the empty string,
> which marks it as the document root, which it clearly is not.
>
>
> Timothy Marc wrote:
>> Hi,
>>
>> i've tried to convert an UML model into Ecore, which works quite well
>> except one problem. I've defined a PrimitiveType Long, stereotyped it
>> with EcoreProfile eDataType{instanceTypeName = java.lang.Long;
>> dataTypeName = Long}. There are other primitive types too in the
>> model, but for this long type, the generator throws the following
>> exception:
>>
>> java.lang.ClassCastException: org.eclipse.emf.ecore.impl.EDataTypeImpl
>> cannot be cast to org.eclipse.emf.ecore.EClass
>> at
>> org.eclipse.emf.ecore.util.BasicExtendedMetaData.getDocument Root(BasicExtendedMetaData.java:136)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenClassImpl.isD ocumentRoot(GenClassImpl.java:2910)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenFeatureImpl.i nitialize(GenFeatureImpl.java:1528)
>>
>> at
>> org.eclipse.uml2.codegen.ecore.genmodel.impl.GenFeatureImpl. initialize(GenFeatureImpl.java:809)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenClassImpl.ini tialize(GenClassImpl.java:1618)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenPackageImpl.i nitialize(GenPackageImpl.java:2815)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenModelImpl.ini tialize(GenModelImpl.java:2221)
>>
>> at
>> org.eclipse.emf.importer.ModelImporter.prepareGenModelAndEPa ckages(ModelImporter.java:714)
>>
>> at
>> org.eclipse.uml2.uml.ecore.importer.UMLImporter.prepareGenMo delAndEPackages(UMLImporter.java:311)
>>
>> at
>> org.eclipse.emf.importer.ui.contribution.base.ModelImporterW izard.doPerformFinish(ModelImporterWizard.java:149)
>>
>> at
>> org.eclipse.emf.converter.ui.contribution.base.ModelConverte rWizard$1.execute(ModelConverterWizard.java:228)
>>
>> at
>> org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(Worksp aceModifyOperation.java:106
>>
>>
>>
>> I really didn't know, why this particular primitve type causes the
>> exception. Any help would be appreciated.
>>
>> Regards Timothy
|
|
|
Re: InvocationTargetException during conversion of an eDataType [message #497944 is a reply to message #497158] |
Fri, 13 November 2009 10:04 |
Timothy Marc Messages: 547 Registered: July 2009 |
Senior Member |
|
|
Hi Ed,
strange, i've unapplied and reapplied the stereotype and i've ensured,
that none of the possible issue, you mentioned, occurred. It fails
again. Then, i applied the stereotypes and the names programmatically.
That was successfull. Now, it works quite well...
Timothy
Ed Merks schrieb:
> Timothy,
>
> It sounds like the name of this EDatType is likely the empty string,
> which isn't valid. Or maybe the XML name is set to the empty string,
> which marks it as the document root, which it clearly is not.
>
>
> Timothy Marc wrote:
>> Hi,
>>
>> i've tried to convert an UML model into Ecore, which works quite well
>> except one problem. I've defined a PrimitiveType Long, stereotyped it
>> with EcoreProfile eDataType{instanceTypeName = java.lang.Long;
>> dataTypeName = Long}. There are other primitive types too in the
>> model, but for this long type, the generator throws the following
>> exception:
>>
>> java.lang.ClassCastException: org.eclipse.emf.ecore.impl.EDataTypeImpl
>> cannot be cast to org.eclipse.emf.ecore.EClass
>> at
>> org.eclipse.emf.ecore.util.BasicExtendedMetaData.getDocument Root(BasicExtendedMetaData.java:136)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenClassImpl.isD ocumentRoot(GenClassImpl.java:2910)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenFeatureImpl.i nitialize(GenFeatureImpl.java:1528)
>>
>> at
>> org.eclipse.uml2.codegen.ecore.genmodel.impl.GenFeatureImpl. initialize(GenFeatureImpl.java:809)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenClassImpl.ini tialize(GenClassImpl.java:1618)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenPackageImpl.i nitialize(GenPackageImpl.java:2815)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenModelImpl.ini tialize(GenModelImpl.java:2221)
>>
>> at
>> org.eclipse.emf.importer.ModelImporter.prepareGenModelAndEPa ckages(ModelImporter.java:714)
>>
>> at
>> org.eclipse.uml2.uml.ecore.importer.UMLImporter.prepareGenMo delAndEPackages(UMLImporter.java:311)
>>
>> at
>> org.eclipse.emf.importer.ui.contribution.base.ModelImporterW izard.doPerformFinish(ModelImporterWizard.java:149)
>>
>> at
>> org.eclipse.emf.converter.ui.contribution.base.ModelConverte rWizard$1.execute(ModelConverterWizard.java:228)
>>
>> at
>> org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(Worksp aceModifyOperation.java:106
>>
>>
>>
>> I really didn't know, why this particular primitve type causes the
>> exception. Any help would be appreciated.
>>
>> Regards Timothy
|
|
|
Re: InvocationTargetException during conversion of an eDataType [message #497952 is a reply to message #497158] |
Fri, 13 November 2009 10:04 |
Timothy Marc Messages: 547 Registered: July 2009 |
Senior Member |
|
|
Hi Ed,
strange, i've unapplied and reapplied the stereotype and i've ensured,
that none of the possible issue, you mentioned, occurred. It fails
again. Then, i applied the stereotypes and the names programmatically.
That was successfull. Now, it works quite well...
Timothy
Ed Merks schrieb:
> Timothy,
>
> It sounds like the name of this EDatType is likely the empty string,
> which isn't valid. Or maybe the XML name is set to the empty string,
> which marks it as the document root, which it clearly is not.
>
>
> Timothy Marc wrote:
>> Hi,
>>
>> i've tried to convert an UML model into Ecore, which works quite well
>> except one problem. I've defined a PrimitiveType Long, stereotyped it
>> with EcoreProfile eDataType{instanceTypeName = java.lang.Long;
>> dataTypeName = Long}. There are other primitive types too in the
>> model, but for this long type, the generator throws the following
>> exception:
>>
>> java.lang.ClassCastException: org.eclipse.emf.ecore.impl.EDataTypeImpl
>> cannot be cast to org.eclipse.emf.ecore.EClass
>> at
>> org.eclipse.emf.ecore.util.BasicExtendedMetaData.getDocument Root(BasicExtendedMetaData.java:136)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenClassImpl.isD ocumentRoot(GenClassImpl.java:2910)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenFeatureImpl.i nitialize(GenFeatureImpl.java:1528)
>>
>> at
>> org.eclipse.uml2.codegen.ecore.genmodel.impl.GenFeatureImpl. initialize(GenFeatureImpl.java:809)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenClassImpl.ini tialize(GenClassImpl.java:1618)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenPackageImpl.i nitialize(GenPackageImpl.java:2815)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenModelImpl.ini tialize(GenModelImpl.java:2221)
>>
>> at
>> org.eclipse.emf.importer.ModelImporter.prepareGenModelAndEPa ckages(ModelImporter.java:714)
>>
>> at
>> org.eclipse.uml2.uml.ecore.importer.UMLImporter.prepareGenMo delAndEPackages(UMLImporter.java:311)
>>
>> at
>> org.eclipse.emf.importer.ui.contribution.base.ModelImporterW izard.doPerformFinish(ModelImporterWizard.java:149)
>>
>> at
>> org.eclipse.emf.converter.ui.contribution.base.ModelConverte rWizard$1.execute(ModelConverterWizard.java:228)
>>
>> at
>> org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(Worksp aceModifyOperation.java:106
>>
>>
>>
>> I really didn't know, why this particular primitve type causes the
>> exception. Any help would be appreciated.
>>
>> Regards Timothy
|
|
|
Re: InvocationTargetException during conversion of an eDataType [message #497968 is a reply to message #497158] |
Fri, 13 November 2009 10:04 |
Timothy Marc Messages: 547 Registered: July 2009 |
Senior Member |
|
|
Hi Ed,
strange, i've unapplied and reapplied the stereotype and i've ensured,
that none of the possible issue, you mentioned, occurred. It fails
again. Then, i applied the stereotypes and the names programmatically.
That was successfull. Now, it works quite well...
Timothy
Ed Merks schrieb:
> Timothy,
>
> It sounds like the name of this EDatType is likely the empty string,
> which isn't valid. Or maybe the XML name is set to the empty string,
> which marks it as the document root, which it clearly is not.
>
>
> Timothy Marc wrote:
>> Hi,
>>
>> i've tried to convert an UML model into Ecore, which works quite well
>> except one problem. I've defined a PrimitiveType Long, stereotyped it
>> with EcoreProfile eDataType{instanceTypeName = java.lang.Long;
>> dataTypeName = Long}. There are other primitive types too in the
>> model, but for this long type, the generator throws the following
>> exception:
>>
>> java.lang.ClassCastException: org.eclipse.emf.ecore.impl.EDataTypeImpl
>> cannot be cast to org.eclipse.emf.ecore.EClass
>> at
>> org.eclipse.emf.ecore.util.BasicExtendedMetaData.getDocument Root(BasicExtendedMetaData.java:136)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenClassImpl.isD ocumentRoot(GenClassImpl.java:2910)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenFeatureImpl.i nitialize(GenFeatureImpl.java:1528)
>>
>> at
>> org.eclipse.uml2.codegen.ecore.genmodel.impl.GenFeatureImpl. initialize(GenFeatureImpl.java:809)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenClassImpl.ini tialize(GenClassImpl.java:1618)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenPackageImpl.i nitialize(GenPackageImpl.java:2815)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenModelImpl.ini tialize(GenModelImpl.java:2221)
>>
>> at
>> org.eclipse.emf.importer.ModelImporter.prepareGenModelAndEPa ckages(ModelImporter.java:714)
>>
>> at
>> org.eclipse.uml2.uml.ecore.importer.UMLImporter.prepareGenMo delAndEPackages(UMLImporter.java:311)
>>
>> at
>> org.eclipse.emf.importer.ui.contribution.base.ModelImporterW izard.doPerformFinish(ModelImporterWizard.java:149)
>>
>> at
>> org.eclipse.emf.converter.ui.contribution.base.ModelConverte rWizard$1.execute(ModelConverterWizard.java:228)
>>
>> at
>> org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(Worksp aceModifyOperation.java:106
>>
>>
>>
>> I really didn't know, why this particular primitve type causes the
>> exception. Any help would be appreciated.
>>
>> Regards Timothy
|
|
|
Re: InvocationTargetException during conversion of an eDataType [message #497972 is a reply to message #497158] |
Fri, 13 November 2009 10:04 |
Timothy Marc Messages: 547 Registered: July 2009 |
Senior Member |
|
|
Hi Ed,
strange, i've unapplied and reapplied the stereotype and i've ensured,
that none of the possible issue, you mentioned, occurred. It fails
again. Then, i applied the stereotypes and the names programmatically.
That was successfull. Now, it works quite well...
Timothy
Ed Merks schrieb:
> Timothy,
>
> It sounds like the name of this EDatType is likely the empty string,
> which isn't valid. Or maybe the XML name is set to the empty string,
> which marks it as the document root, which it clearly is not.
>
>
> Timothy Marc wrote:
>> Hi,
>>
>> i've tried to convert an UML model into Ecore, which works quite well
>> except one problem. I've defined a PrimitiveType Long, stereotyped it
>> with EcoreProfile eDataType{instanceTypeName = java.lang.Long;
>> dataTypeName = Long}. There are other primitive types too in the
>> model, but for this long type, the generator throws the following
>> exception:
>>
>> java.lang.ClassCastException: org.eclipse.emf.ecore.impl.EDataTypeImpl
>> cannot be cast to org.eclipse.emf.ecore.EClass
>> at
>> org.eclipse.emf.ecore.util.BasicExtendedMetaData.getDocument Root(BasicExtendedMetaData.java:136)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenClassImpl.isD ocumentRoot(GenClassImpl.java:2910)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenFeatureImpl.i nitialize(GenFeatureImpl.java:1528)
>>
>> at
>> org.eclipse.uml2.codegen.ecore.genmodel.impl.GenFeatureImpl. initialize(GenFeatureImpl.java:809)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenClassImpl.ini tialize(GenClassImpl.java:1618)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenPackageImpl.i nitialize(GenPackageImpl.java:2815)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenModelImpl.ini tialize(GenModelImpl.java:2221)
>>
>> at
>> org.eclipse.emf.importer.ModelImporter.prepareGenModelAndEPa ckages(ModelImporter.java:714)
>>
>> at
>> org.eclipse.uml2.uml.ecore.importer.UMLImporter.prepareGenMo delAndEPackages(UMLImporter.java:311)
>>
>> at
>> org.eclipse.emf.importer.ui.contribution.base.ModelImporterW izard.doPerformFinish(ModelImporterWizard.java:149)
>>
>> at
>> org.eclipse.emf.converter.ui.contribution.base.ModelConverte rWizard$1.execute(ModelConverterWizard.java:228)
>>
>> at
>> org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(Worksp aceModifyOperation.java:106
>>
>>
>>
>> I really didn't know, why this particular primitve type causes the
>> exception. Any help would be appreciated.
>>
>> Regards Timothy
|
|
|
Re: InvocationTargetException during conversion of an eDataType [message #497977 is a reply to message #497158] |
Fri, 13 November 2009 10:04 |
Timothy Marc Messages: 547 Registered: July 2009 |
Senior Member |
|
|
Hi Ed,
strange, i've unapplied and reapplied the stereotype and i've ensured,
that none of the possible issue, you mentioned, occurred. It fails
again. Then, i applied the stereotypes and the names programmatically.
That was successfull. Now, it works quite well...
Timothy
Ed Merks schrieb:
> Timothy,
>
> It sounds like the name of this EDatType is likely the empty string,
> which isn't valid. Or maybe the XML name is set to the empty string,
> which marks it as the document root, which it clearly is not.
>
>
> Timothy Marc wrote:
>> Hi,
>>
>> i've tried to convert an UML model into Ecore, which works quite well
>> except one problem. I've defined a PrimitiveType Long, stereotyped it
>> with EcoreProfile eDataType{instanceTypeName = java.lang.Long;
>> dataTypeName = Long}. There are other primitive types too in the
>> model, but for this long type, the generator throws the following
>> exception:
>>
>> java.lang.ClassCastException: org.eclipse.emf.ecore.impl.EDataTypeImpl
>> cannot be cast to org.eclipse.emf.ecore.EClass
>> at
>> org.eclipse.emf.ecore.util.BasicExtendedMetaData.getDocument Root(BasicExtendedMetaData.java:136)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenClassImpl.isD ocumentRoot(GenClassImpl.java:2910)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenFeatureImpl.i nitialize(GenFeatureImpl.java:1528)
>>
>> at
>> org.eclipse.uml2.codegen.ecore.genmodel.impl.GenFeatureImpl. initialize(GenFeatureImpl.java:809)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenClassImpl.ini tialize(GenClassImpl.java:1618)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenPackageImpl.i nitialize(GenPackageImpl.java:2815)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenModelImpl.ini tialize(GenModelImpl.java:2221)
>>
>> at
>> org.eclipse.emf.importer.ModelImporter.prepareGenModelAndEPa ckages(ModelImporter.java:714)
>>
>> at
>> org.eclipse.uml2.uml.ecore.importer.UMLImporter.prepareGenMo delAndEPackages(UMLImporter.java:311)
>>
>> at
>> org.eclipse.emf.importer.ui.contribution.base.ModelImporterW izard.doPerformFinish(ModelImporterWizard.java:149)
>>
>> at
>> org.eclipse.emf.converter.ui.contribution.base.ModelConverte rWizard$1.execute(ModelConverterWizard.java:228)
>>
>> at
>> org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(Worksp aceModifyOperation.java:106
>>
>>
>>
>> I really didn't know, why this particular primitve type causes the
>> exception. Any help would be appreciated.
>>
>> Regards Timothy
|
|
|
Re: InvocationTargetException during conversion of an eDataType [message #497982 is a reply to message #497158] |
Fri, 13 November 2009 10:04 |
Timothy Marc Messages: 547 Registered: July 2009 |
Senior Member |
|
|
Hi Ed,
strange, i've unapplied and reapplied the stereotype and i've ensured,
that none of the possible issue, you mentioned, occurred. It fails
again. Then, i applied the stereotypes and the names programmatically.
That was successfull. Now, it works quite well...
Timothy
Ed Merks schrieb:
> Timothy,
>
> It sounds like the name of this EDatType is likely the empty string,
> which isn't valid. Or maybe the XML name is set to the empty string,
> which marks it as the document root, which it clearly is not.
>
>
> Timothy Marc wrote:
>> Hi,
>>
>> i've tried to convert an UML model into Ecore, which works quite well
>> except one problem. I've defined a PrimitiveType Long, stereotyped it
>> with EcoreProfile eDataType{instanceTypeName = java.lang.Long;
>> dataTypeName = Long}. There are other primitive types too in the
>> model, but for this long type, the generator throws the following
>> exception:
>>
>> java.lang.ClassCastException: org.eclipse.emf.ecore.impl.EDataTypeImpl
>> cannot be cast to org.eclipse.emf.ecore.EClass
>> at
>> org.eclipse.emf.ecore.util.BasicExtendedMetaData.getDocument Root(BasicExtendedMetaData.java:136)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenClassImpl.isD ocumentRoot(GenClassImpl.java:2910)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenFeatureImpl.i nitialize(GenFeatureImpl.java:1528)
>>
>> at
>> org.eclipse.uml2.codegen.ecore.genmodel.impl.GenFeatureImpl. initialize(GenFeatureImpl.java:809)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenClassImpl.ini tialize(GenClassImpl.java:1618)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenPackageImpl.i nitialize(GenPackageImpl.java:2815)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenModelImpl.ini tialize(GenModelImpl.java:2221)
>>
>> at
>> org.eclipse.emf.importer.ModelImporter.prepareGenModelAndEPa ckages(ModelImporter.java:714)
>>
>> at
>> org.eclipse.uml2.uml.ecore.importer.UMLImporter.prepareGenMo delAndEPackages(UMLImporter.java:311)
>>
>> at
>> org.eclipse.emf.importer.ui.contribution.base.ModelImporterW izard.doPerformFinish(ModelImporterWizard.java:149)
>>
>> at
>> org.eclipse.emf.converter.ui.contribution.base.ModelConverte rWizard$1.execute(ModelConverterWizard.java:228)
>>
>> at
>> org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(Worksp aceModifyOperation.java:106
>>
>>
>>
>> I really didn't know, why this particular primitve type causes the
>> exception. Any help would be appreciated.
>>
>> Regards Timothy
|
|
|
Re: InvocationTargetException during conversion of an eDataType [message #497989 is a reply to message #497158] |
Fri, 13 November 2009 10:04 |
Timothy Marc Messages: 547 Registered: July 2009 |
Senior Member |
|
|
Hi Ed,
strange, i've unapplied and reapplied the stereotype and i've ensured,
that none of the possible issue, you mentioned, occurred. It fails
again. Then, i applied the stereotypes and the names programmatically.
That was successfull. Now, it works quite well...
Timothy
Ed Merks schrieb:
> Timothy,
>
> It sounds like the name of this EDatType is likely the empty string,
> which isn't valid. Or maybe the XML name is set to the empty string,
> which marks it as the document root, which it clearly is not.
>
>
> Timothy Marc wrote:
>> Hi,
>>
>> i've tried to convert an UML model into Ecore, which works quite well
>> except one problem. I've defined a PrimitiveType Long, stereotyped it
>> with EcoreProfile eDataType{instanceTypeName = java.lang.Long;
>> dataTypeName = Long}. There are other primitive types too in the
>> model, but for this long type, the generator throws the following
>> exception:
>>
>> java.lang.ClassCastException: org.eclipse.emf.ecore.impl.EDataTypeImpl
>> cannot be cast to org.eclipse.emf.ecore.EClass
>> at
>> org.eclipse.emf.ecore.util.BasicExtendedMetaData.getDocument Root(BasicExtendedMetaData.java:136)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenClassImpl.isD ocumentRoot(GenClassImpl.java:2910)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenFeatureImpl.i nitialize(GenFeatureImpl.java:1528)
>>
>> at
>> org.eclipse.uml2.codegen.ecore.genmodel.impl.GenFeatureImpl. initialize(GenFeatureImpl.java:809)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenClassImpl.ini tialize(GenClassImpl.java:1618)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenPackageImpl.i nitialize(GenPackageImpl.java:2815)
>>
>> at
>> org.eclipse.emf.codegen.ecore.genmodel.impl.GenModelImpl.ini tialize(GenModelImpl.java:2221)
>>
>> at
>> org.eclipse.emf.importer.ModelImporter.prepareGenModelAndEPa ckages(ModelImporter.java:714)
>>
>> at
>> org.eclipse.uml2.uml.ecore.importer.UMLImporter.prepareGenMo delAndEPackages(UMLImporter.java:311)
>>
>> at
>> org.eclipse.emf.importer.ui.contribution.base.ModelImporterW izard.doPerformFinish(ModelImporterWizard.java:149)
>>
>> at
>> org.eclipse.emf.converter.ui.contribution.base.ModelConverte rWizard$1.execute(ModelConverterWizard.java:228)
>>
>> at
>> org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(Worksp aceModifyOperation.java:106
>>
>>
>>
>> I really didn't know, why this particular primitve type causes the
>> exception. Any help would be appreciated.
>>
>> Regards Timothy
|
|
|
Goto Forum:
Current Time: Wed Sep 25 11:51:08 GMT 2024
Powered by FUDForum. Page generated in 0.08810 seconds
|