Skip to main content



      Home
Home » Modeling » EMF » [Teneo/Hibernate/GMF] DuplicateMappingException => QualifyingEntityNameStrategy => Ill
[Teneo/Hibernate/GMF] DuplicateMappingException => QualifyingEntityNameStrategy => Ill [message #794446] Thu, 09 February 2012 04:47 Go to next message
Eclipse UserFriend
Hello again,

i try to get teneo to work with gmf.
So i set the appropiate EPackages for the datastore.

final EPackage[] ePackages = new EPackage[] {
MyFirstPackage.eINSTANCE,
MySecondPackage.eINSTANCE,
NotationPackage.eINSTANCE, EcorePackage.eINSTANCE,
XMLTypePackage.eINSTANCE };


OneOfMyClasses is contained in both models in different implementation
(don't ask me why)

So i got these Exception:

Caused by: org.hibernate.DuplicateMappingException: Duplicate
class/entity mapping
OneOfMyClasses


I read that i should use a different naming strategy in this case:

datastore.getExtensionManager().registerExtension(
EntityNameStrategy.class.getName(),
QualifyingEntityNameStrategy.class.getName()
);

But now i get a new Exception:

java.lang.IllegalArgumentException: Illegal eClassStr for this resolver
(no dot separating the epackage nsprefix and name): AnyType_mixed

Maybe one of you has a clue what i should do now?

Greetings
Matthias
Re: [Teneo/Hibernate/GMF] DuplicateMappingException => QualifyingEntityNameStrategy => [message #794516 is a reply to message #794446] Thu, 09 February 2012 06:47 Go to previous message
Eclipse UserFriend
Hi Matthias,
Hmm, sounds like a bug, can you enter a bugzilla? In the meantime, you can go back to the previous namingstrategy and
annotate one of the OneOfMyClasses eclasses with an @Entity(name="MyUniquName") annotation.
http://wiki.eclipse.org/Teneo/Hibernate#Model_Relational_Mapping_with_EJB3.2FJPA_Annotations

gr. Martin

On 02/09/2012 10:47 AM, Matthias Kloppenborg wrote:
> Hello again,
>
> i try to get teneo to work with gmf.
> So i set the appropiate EPackages for the datastore.
>
> final EPackage[] ePackages = new EPackage[] {
> MyFirstPackage.eINSTANCE,
> MySecondPackage.eINSTANCE,
> NotationPackage.eINSTANCE, EcorePackage.eINSTANCE,
> XMLTypePackage.eINSTANCE };
>
>
> OneOfMyClasses is contained in both models in different implementation (don't ask me why)
>
> So i got these Exception:
>
> Caused by: org.hibernate.DuplicateMappingException: Duplicate
> class/entity mapping
> OneOfMyClasses
>
>
> I read that i should use a different naming strategy in this case:
>
> datastore.getExtensionManager().registerExtension(
> EntityNameStrategy.class.getName(),
> QualifyingEntityNameStrategy.class.getName()
> );
>
> But now i get a new Exception:
>
> java.lang.IllegalArgumentException: Illegal eClassStr for this resolver (no dot separating the epackage nsprefix and
> name): AnyType_mixed
>
> Maybe one of you has a clue what i should do now?
>
> Greetings
> Matthias


--

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
Previous Topic:[Compare] Issue in EMFCompareEObjectCopier?
Next Topic:[CDO] CDO DBSTORE Performance with bigger databases
Goto Forum:
  


Current Time: Mon Aug 11 09:40:35 EDT 2025

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

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

Back to the top