Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » JPOXMappingException: URI <X> does not translate to an eclass
JPOXMappingException: URI <X> does not translate to an eclass [message #128175] Wed, 06 August 2008 18:55 Go to next message
Eclipse UserFriend
Originally posted by: richard.fritzson.gmail.com

Hi,

I've been having pretty good success using Teneo to map a large ecore
model (based on OMG's KDM standard). However, one problem I've had to work
around is my inability to use abstract classes. (To get around this I've
converted all my abstract classes to concrete ones but this is no longer a
reasonable tactic.)

If I create an EReference and specify its EType to be an EClass whose
"abstract" property is "true" I get this error from GenerateJDO :
"JPOXMappingException: URI <X> does not translate to an eclass" where <X>
is the name of the abstract EClass.

This happens even when the abstract EClass has non abstract subclasses.

The simplest example of this can be created by taking the library example
and creating an abstract class Person, making it the superclass of Writer
and changing the EType of a library's Writers to Person.

I'm using Eclipse 3.4, jpox-1.1.9, jdo2 2.0 & bcel-5.2

If anyone has a suggestion for how I can address this, I would appreciate
it.

Thanks.

Rich Fritzson


The stack looks like this:

Aug 6, 2008 2:38:35 PM org.eclipse.emf.teneo.TeneoException <init>
SEVERE: Uri: Person does not translate to an eclass
org.eclipse.emf.teneo.jpox.mapper.JPOXMappingException: Uri: Person does
not translate to an eclass
at
org.eclipse.emf.teneo.jpox.mapper.MappingUtil.getImplNameOfE Class(MappingUtil.java:44)
at
org.eclipse.emf.teneo.jpox.mapper.association.OneToManyMappe r.map(OneToManyMapper.java:122)
at
org.eclipse.emf.teneo.jpox.mapper.property.EClassFeatureMapp er.processPersistableMember(EClassFeatureMapper.java:172)
at
org.eclipse.emf.teneo.jpox.mapper.property.EClassFeatureMapp er.map(EClassFeatureMapper.java:97)
at
org.eclipse.emf.teneo.jpox.mapper.JPOXMappingGenerator.proce ssClassAnnotation(JPOXMappingGenerator.java:257)
at
org.eclipse.emf.teneo.jpox.mapper.JPOXMappingGenerator.gener ate(JPOXMappingGenerator.java:139)
at
org.eclipse.emf.teneo.jpox.mapper.GenerateJDO.createORMapper File(GenerateJDO.java:127)
at
org.eclipse.emf.teneo.jpox.mapper.GenerateJDO.createORMapper File(GenerateJDO.java:92)
at org.eclipse.emf.teneo.jpox.mapper.GenerateJDO.main(GenerateJ DO.java:87)
Re: JPOXMappingException: URI <X> does not translate to an eclass [message #128243 is a reply to message #128175] Thu, 07 August 2008 10:31 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------040005010105050904040000
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit

Hi Richard,
Jpox requires each class to have a java implementation. Did you regenerate the source code after
specifying the abstract super class? Is the genmodel loaded from the ecore file or from the xsd?

I did the same as you did and programmatically generating the jdo file works fine. I have attached
the jdo file and the ecore to this post.
Let me know if you see a difference between what I did and you did.

Btw, support for Teneo is given on the emf newsgroup. I have cc-ed the emf newsgroup.

gr. Martin

Richard Fritzson wrote:
> Hi,
>
> I've been having pretty good success using Teneo to map a large ecore
> model (based on OMG's KDM standard). However, one problem I've had to
> work around is my inability to use abstract classes. (To get around this
> I've converted all my abstract classes to concrete ones but this is no
> longer a reasonable tactic.)
>
> If I create an EReference and specify its EType to be an EClass whose
> "abstract" property is "true" I get this error from GenerateJDO :
> "JPOXMappingException: URI <X> does not translate to an eclass" where
> <X> is the name of the abstract EClass.
>
> This happens even when the abstract EClass has non abstract subclasses.
>
> The simplest example of this can be created by taking the library
> example and creating an abstract class Person, making it the superclass
> of Writer and changing the EType of a library's Writers to Person.
>
> I'm using Eclipse 3.4, jpox-1.1.9, jdo2 2.0 & bcel-5.2
>
> If anyone has a suggestion for how I can address this, I would
> appreciate it.
>
> Thanks.
>
> Rich Fritzson
>
>
> The stack looks like this:
>
> Aug 6, 2008 2:38:35 PM org.eclipse.emf.teneo.TeneoException <init>
> SEVERE: Uri: Person does not translate to an eclass
> org.eclipse.emf.teneo.jpox.mapper.JPOXMappingException: Uri: Person does
> not translate to an eclass
> at
> org.eclipse.emf.teneo.jpox.mapper.MappingUtil.getImplNameOfE Class(MappingUtil.java:44)
>
> at
> org.eclipse.emf.teneo.jpox.mapper.association.OneToManyMappe r.map(OneToManyMapper.java:122)
>
> at
> org.eclipse.emf.teneo.jpox.mapper.property.EClassFeatureMapp er.processPersistableMember(EClassFeatureMapper.java:172)
>
> at
> org.eclipse.emf.teneo.jpox.mapper.property.EClassFeatureMapp er.map(EClassFeatureMapper.java:97)
>
> at
> org.eclipse.emf.teneo.jpox.mapper.JPOXMappingGenerator.proce ssClassAnnotation(JPOXMappingGenerator.java:257)
>
> at
> org.eclipse.emf.teneo.jpox.mapper.JPOXMappingGenerator.gener ate(JPOXMappingGenerator.java:139)
>
> at
> org.eclipse.emf.teneo.jpox.mapper.GenerateJDO.createORMapper File(GenerateJDO.java:127)
>
> at
> org.eclipse.emf.teneo.jpox.mapper.GenerateJDO.createORMapper File(GenerateJDO.java:92)
>
> at
> org.eclipse.emf.teneo.jpox.mapper.GenerateJDO.main(GenerateJ DO.java:87)
>
>
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org

--------------040005010105050904040000
Content-Type: text/xml;
name="library.ecore"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="library.ecore"

<?xml version="1.0" encoding="UTF-8"?>
<ecore:EPackage xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="library"
nsURI="http://www.eclipse.org/emf/teneo/samples/emf/sample/Library" nsPrefix="library">
<eClassifiers xsi:type="ecore:EClass" name="Book">
<eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="name" value="Book"/>
<details key="kind" value="elementOnly"/>
</eAnnotations>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="title" unique="false" lowerBound="1"
eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
<eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="kind" value="element"/>
<details key="name" value="title"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="pages" unique="false" lowerBound="1"
eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//Int" unsettable="true">
<eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="kind" value="element"/>
<details key="name" value="pages"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="category" unique="false"
lowerBound="1" eType="#//BookCategory" defaultValueLiteral="Mystery" unsettable="true">
<eAnnotations source="teneo.jpa">
<details key="appinfo" value="@Enumerated(ORDINAL)"/>
</eAnnotations>
<eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="kind" value="element"/>
<details key="name" value="category"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EReference" name="author" lowerBound="1"
eType="#//Writer" eOpposite="#//Writer/books">
<eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="kind" value="element"/>
<details key="name" value="author"/>
</eAnnotations>
<eAnnotations source="teneo.jpa">
<details key="appinfo" value="@JoinColumn(name=&quot;schrijver&quot;)"/>
</eAnnotations>
</eStructuralFeatures>
</eClassifiers>
<eClassifiers xsi:type="ecore:EEnum" name="BookCategory">
<eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="name" value="BookCategory"/>
</eAnnotations>
<eLiterals name="Mystery"/>
<eLiterals name="ScienceFiction" value="1"/>
<eLiterals name="Biography" value="2"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EDataType" name="BookCategoryObject" instanceClassName="org.eclipse.emf.common.util.Enumerator">
<eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="name" value="BookCategory:Object"/>
<details key="baseType" value="BookCategory"/>
</eAnnotations>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Library">
<eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="name" value="Library"/>
<details key="kind" value="elementOnly"/>
</eAnnotations>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name" unique="false" lowerBound="1"
eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
<eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="kind" value="element"/>
<details key="name" value="name"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EReference" name="writers" upperBound="-1"
eType="#//Person" containment="true">
<eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="kind" value="element"/>
<details key="name" value="writers"/>
</eAnnotations>
<eAnnotations source="teneo.hibernate">
<details key="appinfo" value=" @Fetch(SUBSELECT)&#xA;@ForeignKey(name=&quot;schrijv ers&quot;) "/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EReference" name="books" upperBound="-1"
eType="#//Book" containment="true">
<eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="kind" value="element"/>
<details key="name" value="books"/>
</eAnnotations>
</eStructuralFeatures>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Writer" eSuperTypes="#//Person">
<eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="name" value="Writer"/>
<details key="kind" value="elementOnly"/>
</eAnnotations>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name" unique="false" lowerBound="1"
eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
<eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="kind" value="element"/>
<details key="name" value="name"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EReference" name="books" upperBound="-1"
eType="#//Book" eOpposite="#//Book/author">
<eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="kind" value="element"/>
<details key="name" value="books"/>
</eAnnotations>
<eAnnotations source="teneo.jpa">
<details key="value" value="@OneToMany(mappedBy=&quot;author&quot;)"/>
</eAnnotations>
</eStructuralFeatures>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Person" abstract="true"/>
</ecore:EPackage>

--------------040005010105050904040000
Content-Type: text/xml;
name="mysql_a_o_package.jdo"
Content-Transfer-Encoding: base64
Content-Disposition: inline;
filename="mysql_a_o_package.jdo"

PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPCFET0NU WVBFIGpkbyBT
WVNURU0gImZpbGU6L2phdmF4L2pkby9qZG8uZHRkIj4KCjxqZG8+Cgk8cGFj a2FnZSBuYW1l
PSJvcmcuZWNsaXBzZS5lbWYudGVuZW8uc2FtcGxlcy5lbWYuc2FtcGxlLmxp YnJhcnkuaW1w
bCI+CgkJPGNsYXNzIG5hbWU9Im9yZy5lY2xpcHNlLmVtZi50ZW5lby5zYW1w bGVzLmVtZi5z
YW1wbGUubGlicmFyeS5pbXBsLkJvb2tJbXBsIiByZXF1aXJlcy1leHRlbnQ9 InRydWUiIHBl
cnNpc3RlbmNlLW1vZGlmaWVyPSJwZXJzaXN0ZW5jZS1jYXBhYmxlIiBkZXRh Y2hhYmxlPSJ0
cnVlIiB0YWJsZT0iYm9vayIgaWRlbnRpdHktdHlwZT0iZGF0YXN0b3JlIj4K CQkJPGltcGxl
bWVudHMgbmFtZT0ib3JnLmVjbGlwc2UuZW1mLnRlbmVvLnNhbXBsZXMuZW1m LnNhbXBsZS5s
aWJyYXJ5LkJvb2siLz4KCQkJPGltcGxlbWV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
ZHR5cGUiIHN0cmF0ZWd5PSJ2YWx1ZS1tYXAiIHZhbHVlPSJQZXJzb24iLz4K CQkJPC9pbmhl
cml0YW5jZT4KCQkJPHZlcnNpb24gc3RyYXRlZ3k9InZlcnNpb24tbnVtYmVy IiBjb2x1bW49
ImVfdmVyc2lvbiIvPgoJCTwvY2xhc3M+Cgk8L3BhY2thZ2U+CjwvamRvPg==
--------------040005010105050904040000--
Re: JPOXMappingException: URI <X> does not translate to an eclass [message #128287 is a reply to message #128243] Thu, 07 August 2008 14:31 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: richard.fritzson.gmail.com

Hi Martin,

Thanks for the quick response.

I did regenerate the source code after changing the ecore model. The
genmodel is loaded from the ecore file.

I've looked over your files and reread your note. Here are the differences
I see which might make a difference.

- Judging by your package.jdo your source code seems to contain a
PersonImpl.java file; mine does not. I get a Person.java file containing
the Interface definition, but not a PersonImpl.java file. (For the Writer
class I get both Writer.java and WriterImpl.java.) I assumed this was
standard for an abstract class, but I don't have much experience with this.

- You also wrote that you programmatically generate your jdo file while
I've been right clicking on the model. If I switch to doing this
programmaticallyl, are there particular options I ought to be passing to
the process?

My ecore model doesn't have the extended metadata that yours has, but it
isn't clear to me that this would make a difference.

I appreciate your help with this.

regards,

Rich

Martin Taal wrote:

> Hi Richard,
> Jpox requires each class to have a java implementation. Did you regenerate
the source code after
> specifying the abstract super class? Is the genmodel loaded from the ecore
file or from the xsd?

> I did the same as you did and programmatically generating the jdo file works
fine. I have attached
> the jdo file and the ecore to this post.
> Let me know if you see a difference between what I did and you did.

> Btw, support for Teneo is given on the emf newsgroup. I have cc-ed the emf
newsgroup.

> gr. Martin

> Richard Fritzson wrote:
>> Hi,
>>
>> I've been having pretty good success using Teneo to map a large ecore
>> model (based on OMG's KDM standard). However, one problem I've had to
>> work around is my inability to use abstract classes. (To get around this
>> I've converted all my abstract classes to concrete ones but this is no
>> longer a reasonable tactic.)
>>
>> If I create an EReference and specify its EType to be an EClass whose
>> "abstract" property is "true" I get this error from GenerateJDO :
>> "JPOXMappingException: URI <X> does not translate to an eclass" where
>> <X> is the name of the abstract EClass.
>>
>> This happens even when the abstract EClass has non abstract subclasses.
>>
>> The simplest example of this can be created by taking the library
>> example and creating an abstract class Person, making it the superclass
>> of Writer and changing the EType of a library's Writers to Person.
>>
>> I'm using Eclipse 3.4, jpox-1.1.9, jdo2 2.0 & bcel-5.2
>>
>> If anyone has a suggestion for how I can address this, I would
>> appreciate it.
>>
>> Thanks.
>>
>> Rich Fritzson
>>
>>
Re: JPOXMappingException: URI <X> does not translate to an eclass [message #128326 is a reply to message #128287] Thu, 07 August 2008 14:45 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
Richard,

Comments below.

Richard Fritzson wrote:
> Hi Martin,
> Thanks for the quick response.
>
> I did regenerate the source code after changing the ecore model. The
> genmodel is loaded from the ecore file.
>
> I've looked over your files and reread your note. Here are the
> differences I see which might make a difference.
>
> - Judging by your package.jdo your source code seems to contain a
> PersonImpl.java file; mine does not.
Maybe you marked as it as "isInterface" true so that no Impl is
generated? It's generally better to generate an Impl so that
implementations of derived EClasses can share a common base
implementation class.
> I get a Person.java file containing the Interface definition, but not
> a PersonImpl.java file. (For the Writer class I get both Writer.java
> and WriterImpl.java.) I assumed this was standard for an abstract
> class, but I don't have much experience with this.
>
> - You also wrote that you programmatically generate your jdo file
> while I've been right clicking on the model. If I switch to doing this
> programmaticallyl, are there particular options I ought to be passing
> to the process?
> My ecore model doesn't have the extended metadata that yours has, but
> it isn't clear to me that this would make a difference.
Have a look to see if you've marked your model to make the EClass purely
an interface
>
> I appreciate your help with this.
>
> regards,
>
> Rich
>
> Martin Taal wrote:
>
>> Hi Richard,
>> Jpox requires each class to have a java implementation. Did you
>> regenerate
> the source code after
>> specifying the abstract super class? Is the genmodel loaded from the
>> ecore
> file or from the xsd?
>
>> I did the same as you did and programmatically generating the jdo
>> file works
> fine. I have attached
>> the jdo file and the ecore to this post.
>> Let me know if you see a difference between what I did and you did.
>
>> Btw, support for Teneo is given on the emf newsgroup. I have cc-ed
>> the emf
> newsgroup.
>
>> gr. Martin
>
>> Richard Fritzson wrote:
>>> Hi,
>>>
>>> I've been having pretty good success using Teneo to map a large
>>> ecore model (based on OMG's KDM standard). However, one problem I've
>>> had to work around is my inability to use abstract classes. (To get
>>> around this I've converted all my abstract classes to concrete ones
>>> but this is no longer a reasonable tactic.)
>>>
>>> If I create an EReference and specify its EType to be an EClass
>>> whose "abstract" property is "true" I get this error from
>>> GenerateJDO : "JPOXMappingException: URI <X> does not translate to
>>> an eclass" where <X> is the name of the abstract EClass.
>>>
>>> This happens even when the abstract EClass has non abstract subclasses.
>>>
>>> The simplest example of this can be created by taking the library
>>> example and creating an abstract class Person, making it the
>>> superclass of Writer and changing the EType of a library's Writers
>>> to Person.
>>>
>>> I'm using Eclipse 3.4, jpox-1.1.9, jdo2 2.0 & bcel-5.2
>>>
>>> If anyone has a suggestion for how I can address this, I would
>>> appreciate it.
>>>
>>> Thanks.
>>>
>>> Rich Fritzson
>>>
>>>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: JPOXMappingException: URI <X> does not translate to an eclass [message #128378 is a reply to message #128326] Thu, 07 August 2008 15:26 Go to previous message
Eclipse UserFriend
Originally posted by: richard.fritzson.gmail.com

Ed Merks wrote:

> Richard,
....
> Have a look to see if you've marked your model to make the EClass purely
> an interface


Bingo.

I actually like feeling stupid because it's a sure sign I learned
something. :-)

Now that my simple example works I have alot of editing to do on a much
larger ecore model.

Many thanks for the tip.

Rich
Re: JPOXMappingException: URI <X> does not translate to an eclass [message #620201 is a reply to message #128175] Thu, 07 August 2008 10:31 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------040005010105050904040000
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit

Hi Richard,
Jpox requires each class to have a java implementation. Did you regenerate the source code after
specifying the abstract super class? Is the genmodel loaded from the ecore file or from the xsd?

I did the same as you did and programmatically generating the jdo file works fine. I have attached
the jdo file and the ecore to this post.
Let me know if you see a difference between what I did and you did.

Btw, support for Teneo is given on the emf newsgroup. I have cc-ed the emf newsgroup.

gr. Martin

Richard Fritzson wrote:
> Hi,
>
> I've been having pretty good success using Teneo to map a large ecore
> model (based on OMG's KDM standard). However, one problem I've had to
> work around is my inability to use abstract classes. (To get around this
> I've converted all my abstract classes to concrete ones but this is no
> longer a reasonable tactic.)
>
> If I create an EReference and specify its EType to be an EClass whose
> "abstract" property is "true" I get this error from GenerateJDO :
> "JPOXMappingException: URI <X> does not translate to an eclass" where
> <X> is the name of the abstract EClass.
>
> This happens even when the abstract EClass has non abstract subclasses.
>
> The simplest example of this can be created by taking the library
> example and creating an abstract class Person, making it the superclass
> of Writer and changing the EType of a library's Writers to Person.
>
> I'm using Eclipse 3.4, jpox-1.1.9, jdo2 2.0 & bcel-5.2
>
> If anyone has a suggestion for how I can address this, I would
> appreciate it.
>
> Thanks.
>
> Rich Fritzson
>
>
> The stack looks like this:
>
> Aug 6, 2008 2:38:35 PM org.eclipse.emf.teneo.TeneoException <init>
> SEVERE: Uri: Person does not translate to an eclass
> org.eclipse.emf.teneo.jpox.mapper.JPOXMappingException: Uri: Person does
> not translate to an eclass
> at
> org.eclipse.emf.teneo.jpox.mapper.MappingUtil.getImplNameOfE Class(MappingUtil.java:44)
>
> at
> org.eclipse.emf.teneo.jpox.mapper.association.OneToManyMappe r.map(OneToManyMapper.java:122)
>
> at
> org.eclipse.emf.teneo.jpox.mapper.property.EClassFeatureMapp er.processPersistableMember(EClassFeatureMapper.java:172)
>
> at
> org.eclipse.emf.teneo.jpox.mapper.property.EClassFeatureMapp er.map(EClassFeatureMapper.java:97)
>
> at
> org.eclipse.emf.teneo.jpox.mapper.JPOXMappingGenerator.proce ssClassAnnotation(JPOXMappingGenerator.java:257)
>
> at
> org.eclipse.emf.teneo.jpox.mapper.JPOXMappingGenerator.gener ate(JPOXMappingGenerator.java:139)
>
> at
> org.eclipse.emf.teneo.jpox.mapper.GenerateJDO.createORMapper File(GenerateJDO.java:127)
>
> at
> org.eclipse.emf.teneo.jpox.mapper.GenerateJDO.createORMapper File(GenerateJDO.java:92)
>
> at
> org.eclipse.emf.teneo.jpox.mapper.GenerateJDO.main(GenerateJ DO.java:87)
>
>
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org

--------------040005010105050904040000
Content-Type: text/xml;
name="library.ecore"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="library.ecore"

<?xml version="1.0" encoding="UTF-8"?>
<ecore:EPackage xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="library"
nsURI="http://www.eclipse.org/emf/teneo/samples/emf/sample/Library" nsPrefix="library">
<eClassifiers xsi:type="ecore:EClass" name="Book">
<eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="name" value="Book"/>
<details key="kind" value="elementOnly"/>
</eAnnotations>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="title" unique="false" lowerBound="1"
eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
<eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="kind" value="element"/>
<details key="name" value="title"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="pages" unique="false" lowerBound="1"
eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//Int" unsettable="true">
<eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="kind" value="element"/>
<details key="name" value="pages"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="category" unique="false"
lowerBound="1" eType="#//BookCategory" defaultValueLiteral="Mystery" unsettable="true">
<eAnnotations source="teneo.jpa">
<details key="appinfo" value="@Enumerated(ORDINAL)"/>
</eAnnotations>
<eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="kind" value="element"/>
<details key="name" value="category"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EReference" name="author" lowerBound="1"
eType="#//Writer" eOpposite="#//Writer/books">
<eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="kind" value="element"/>
<details key="name" value="author"/>
</eAnnotations>
<eAnnotations source="teneo.jpa">
<details key="appinfo" value="@JoinColumn(name=&quot;schrijver&quot;)"/>
</eAnnotations>
</eStructuralFeatures>
</eClassifiers>
<eClassifiers xsi:type="ecore:EEnum" name="BookCategory">
<eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="name" value="BookCategory"/>
</eAnnotations>
<eLiterals name="Mystery"/>
<eLiterals name="ScienceFiction" value="1"/>
<eLiterals name="Biography" value="2"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EDataType" name="BookCategoryObject" instanceClassName="org.eclipse.emf.common.util.Enumerator">
<eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="name" value="BookCategory:Object"/>
<details key="baseType" value="BookCategory"/>
</eAnnotations>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Library">
<eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="name" value="Library"/>
<details key="kind" value="elementOnly"/>
</eAnnotations>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name" unique="false" lowerBound="1"
eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
<eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="kind" value="element"/>
<details key="name" value="name"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EReference" name="writers" upperBound="-1"
eType="#//Person" containment="true">
<eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="kind" value="element"/>
<details key="name" value="writers"/>
</eAnnotations>
<eAnnotations source="teneo.hibernate">
<details key="appinfo" value=" @Fetch(SUBSELECT)&#xA;@ForeignKey(name=&quot;schrijv ers&quot;) "/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EReference" name="books" upperBound="-1"
eType="#//Book" containment="true">
<eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="kind" value="element"/>
<details key="name" value="books"/>
</eAnnotations>
</eStructuralFeatures>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Writer" eSuperTypes="#//Person">
<eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="name" value="Writer"/>
<details key="kind" value="elementOnly"/>
</eAnnotations>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name" unique="false" lowerBound="1"
eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
<eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="kind" value="element"/>
<details key="name" value="name"/>
</eAnnotations>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EReference" name="books" upperBound="-1"
eType="#//Book" eOpposite="#//Book/author">
<eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="kind" value="element"/>
<details key="name" value="books"/>
</eAnnotations>
<eAnnotations source="teneo.jpa">
<details key="value" value="@OneToMany(mappedBy=&quot;author&quot;)"/>
</eAnnotations>
</eStructuralFeatures>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Person" abstract="true"/>
</ecore:EPackage>

--------------040005010105050904040000
Content-Type: text/xml;
name="mysql_a_o_package.jdo"
Content-Transfer-Encoding: base64
Content-Disposition: inline;
filename="mysql_a_o_package.jdo"

PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPCFET0NU WVBFIGpkbyBT
WVNURU0gImZpbGU6L2phdmF4L2pkby9qZG8uZHRkIj4KCjxqZG8+Cgk8cGFj a2FnZSBuYW1l
PSJvcmcuZWNsaXBzZS5lbWYudGVuZW8uc2FtcGxlcy5lbWYuc2FtcGxlLmxp YnJhcnkuaW1w
bCI+CgkJPGNsYXNzIG5hbWU9Im9yZy5lY2xpcHNlLmVtZi50ZW5lby5zYW1w bGVzLmVtZi5z
YW1wbGUubGlicmFyeS5pbXBsLkJvb2tJbXBsIiByZXF1aXJlcy1leHRlbnQ9 InRydWUiIHBl
cnNpc3RlbmNlLW1vZGlmaWVyPSJwZXJzaXN0ZW5jZS1jYXBhYmxlIiBkZXRh Y2hhYmxlPSJ0
cnVlIiB0YWJsZT0iYm9vayIgaWRlbnRpdHktdHlwZT0iZGF0YXN0b3JlIj4K CQkJPGltcGxl
bWVudHMgbmFtZT0ib3JnLmVjbGlwc2UuZW1mLnRlbmVvLnNhbXBsZXMuZW1m LnNhbXBsZS5s
aWJyYXJ5LkJvb2siLz4KCQkJPGltcGxlbWVudHMgbmFtZT0ib3JnLmVjbGlw c2UuZW1mLnRl
bmVvLnNhbXBsZXMuZW1mLnNhbXBsZS5saWJyYXJ5LlNlcmlhbGl6YWJsZUVP YmplY3QiLz4K
CQkJPGltcGxlbWVudHMgbmFtZT0ib3JnLmVjbGlwc2UuZW1mLmVjb3JlLkVP YmplY3QiLz4K
CQkJPGltcGxlbWVudHMgbmFtZT0ib3JnLmVjbGlwc2UuZW1mLmNvbW1vbi5u b3RpZnkuTm90
aWZpZXIiLz4KCQkJPGltcGxlbWVudHMgbmFtZT0iamF2YS5pby5TZXJpYWxp emFibGUiLz4K
CQkJPGluaGVyaXRhbmNlIHN0cmF0ZWd5PSJuZXct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nNpc3Rl bmNlLW1vZGlm
aWVyPSJwZXJzaXN0ZW5jZS1jYXBhYmxlIiBkZXRhY2hhYmxlPSJ0cnVlIiB0 YWJsZT0icGVy
c29uIiBpZGVudGl0eS10eXBlPSJkYXRhc3RvcmUiPgoJCQk8aW1wbGVtZW50 cyBuYW1lPSJv
cmcuZWNsaXBzZS5lbWYudGVuZW8uc2FtcGxlcy5lbWYuc2FtcGxlLmxpYnJh cnkuUGVyc29u
Ii8+CgkJCTxpbXBsZW1lbnRzIG5hbWU9Im9yZy5lY2xpcHNlLmVtZi50ZW5l by5zYW1wbGVz
LmVtZi5zYW1wbGUubGlicmFyeS5TZXJpYWxpemFibGVFT2JqZWN0Ii8+CgkJ CTxpbXBsZW1l
bnRzIG5hbWU9Im9yZy5lY2xpcHNlLmVtZi5lY29yZS5FT2JqZWN0Ii8+CgkJ CTxpbXBsZW1l
bnRzIG5hbWU9Im9yZy5lY2xpcHNlLmVtZi5jb21tb24ubm90aWZ5Lk5vdGlm aWVyIi8+CgkJ
CTxpbXBsZW1lbnRzIG5hbWU9ImphdmEuaW8uU2VyaWFsaXphYmxlIi8+CgkJ CTxpbmhlcml0
YW5jZSBzdHJhdGVneT0ibmV3LXRhYmxlIj4KCQkJCTxkaXNjcmltaW5hdG9y IGNvbHVtbj0i
ZHR5cGUiIHN0cmF0ZWd5PSJ2YWx1ZS1tYXAiIHZhbHVlPSJQZXJzb24iLz4K CQkJPC9pbmhl
cml0YW5jZT4KCQkJPHZlcnNpb24gc3RyYXRlZ3k9InZlcnNpb24tbnVtYmVy IiBjb2x1bW49
ImVfdmVyc2lvbiIvPgoJCTwvY2xhc3M+Cgk8L3BhY2thZ2U+CjwvamRvPg==
--------------040005010105050904040000--
Re: JPOXMappingException: URI <X> does not translate to an eclass [message #620204 is a reply to message #128243] Thu, 07 August 2008 14:31 Go to previous message
Eclipse UserFriend
Originally posted by: richard.fritzson.gmail.com

Hi Martin,

Thanks for the quick response.

I did regenerate the source code after changing the ecore model. The
genmodel is loaded from the ecore file.

I've looked over your files and reread your note. Here are the differences
I see which might make a difference.

- Judging by your package.jdo your source code seems to contain a
PersonImpl.java file; mine does not. I get a Person.java file containing
the Interface definition, but not a PersonImpl.java file. (For the Writer
class I get both Writer.java and WriterImpl.java.) I assumed this was
standard for an abstract class, but I don't have much experience with this.

- You also wrote that you programmatically generate your jdo file while
I've been right clicking on the model. If I switch to doing this
programmaticallyl, are there particular options I ought to be passing to
the process?

My ecore model doesn't have the extended metadata that yours has, but it
isn't clear to me that this would make a difference.

I appreciate your help with this.

regards,

Rich

Martin Taal wrote:

> Hi Richard,
> Jpox requires each class to have a java implementation. Did you regenerate
the source code after
> specifying the abstract super class? Is the genmodel loaded from the ecore
file or from the xsd?

> I did the same as you did and programmatically generating the jdo file works
fine. I have attached
> the jdo file and the ecore to this post.
> Let me know if you see a difference between what I did and you did.

> Btw, support for Teneo is given on the emf newsgroup. I have cc-ed the emf
newsgroup.

> gr. Martin

> Richard Fritzson wrote:
>> Hi,
>>
>> I've been having pretty good success using Teneo to map a large ecore
>> model (based on OMG's KDM standard). However, one problem I've had to
>> work around is my inability to use abstract classes. (To get around this
>> I've converted all my abstract classes to concrete ones but this is no
>> longer a reasonable tactic.)
>>
>> If I create an EReference and specify its EType to be an EClass whose
>> "abstract" property is "true" I get this error from GenerateJDO :
>> "JPOXMappingException: URI <X> does not translate to an eclass" where
>> <X> is the name of the abstract EClass.
>>
>> This happens even when the abstract EClass has non abstract subclasses.
>>
>> The simplest example of this can be created by taking the library
>> example and creating an abstract class Person, making it the superclass
>> of Writer and changing the EType of a library's Writers to Person.
>>
>> I'm using Eclipse 3.4, jpox-1.1.9, jdo2 2.0 & bcel-5.2
>>
>> If anyone has a suggestion for how I can address this, I would
>> appreciate it.
>>
>> Thanks.
>>
>> Rich Fritzson
>>
>>
Re: JPOXMappingException: URI <X> does not translate to an eclass [message #620207 is a reply to message #128287] Thu, 07 August 2008 14:45 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
Richard,

Comments below.

Richard Fritzson wrote:
> Hi Martin,
> Thanks for the quick response.
>
> I did regenerate the source code after changing the ecore model. The
> genmodel is loaded from the ecore file.
>
> I've looked over your files and reread your note. Here are the
> differences I see which might make a difference.
>
> - Judging by your package.jdo your source code seems to contain a
> PersonImpl.java file; mine does not.
Maybe you marked as it as "isInterface" true so that no Impl is
generated? It's generally better to generate an Impl so that
implementations of derived EClasses can share a common base
implementation class.
> I get a Person.java file containing the Interface definition, but not
> a PersonImpl.java file. (For the Writer class I get both Writer.java
> and WriterImpl.java.) I assumed this was standard for an abstract
> class, but I don't have much experience with this.
>
> - You also wrote that you programmatically generate your jdo file
> while I've been right clicking on the model. If I switch to doing this
> programmaticallyl, are there particular options I ought to be passing
> to the process?
> My ecore model doesn't have the extended metadata that yours has, but
> it isn't clear to me that this would make a difference.
Have a look to see if you've marked your model to make the EClass purely
an interface
>
> I appreciate your help with this.
>
> regards,
>
> Rich
>
> Martin Taal wrote:
>
>> Hi Richard,
>> Jpox requires each class to have a java implementation. Did you
>> regenerate
> the source code after
>> specifying the abstract super class? Is the genmodel loaded from the
>> ecore
> file or from the xsd?
>
>> I did the same as you did and programmatically generating the jdo
>> file works
> fine. I have attached
>> the jdo file and the ecore to this post.
>> Let me know if you see a difference between what I did and you did.
>
>> Btw, support for Teneo is given on the emf newsgroup. I have cc-ed
>> the emf
> newsgroup.
>
>> gr. Martin
>
>> Richard Fritzson wrote:
>>> Hi,
>>>
>>> I've been having pretty good success using Teneo to map a large
>>> ecore model (based on OMG's KDM standard). However, one problem I've
>>> had to work around is my inability to use abstract classes. (To get
>>> around this I've converted all my abstract classes to concrete ones
>>> but this is no longer a reasonable tactic.)
>>>
>>> If I create an EReference and specify its EType to be an EClass
>>> whose "abstract" property is "true" I get this error from
>>> GenerateJDO : "JPOXMappingException: URI <X> does not translate to
>>> an eclass" where <X> is the name of the abstract EClass.
>>>
>>> This happens even when the abstract EClass has non abstract subclasses.
>>>
>>> The simplest example of this can be created by taking the library
>>> example and creating an abstract class Person, making it the
>>> superclass of Writer and changing the EType of a library's Writers
>>> to Person.
>>>
>>> I'm using Eclipse 3.4, jpox-1.1.9, jdo2 2.0 & bcel-5.2
>>>
>>> If anyone has a suggestion for how I can address this, I would
>>> appreciate it.
>>>
>>> Thanks.
>>>
>>> Rich Fritzson
>>>
>>>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: JPOXMappingException: URI <X> does not translate to an eclass [message #620211 is a reply to message #128326] Thu, 07 August 2008 15:26 Go to previous message
Eclipse UserFriend
Originally posted by: richard.fritzson.gmail.com

Ed Merks wrote:

> Richard,
....
> Have a look to see if you've marked your model to make the EClass purely
> an interface


Bingo.

I actually like feeling stupid because it's a sure sign I learned
something. :-)

Now that my simple example works I have alot of editing to do on a much
larger ecore model.

Many thanks for the tip.

Rich
Previous Topic:common XML framework
Next Topic:Re: EMF Refactoring Plugin
Goto Forum:
  


Current Time: Wed Apr 24 23:55:10 GMT 2024

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

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

Back to the top