Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [Teneo] (newbie): More than one EClass with the same name
[Teneo] (newbie): More than one EClass with the same name [message #604915] Mon, 23 April 2007 08:45
Gonzalo is currently offline GonzaloFriend
Messages: 27
Registered: July 2009
Junior Member
Hello Martin!

I've read an old post with the same issue, but it didn't help me.

I get this error (there's String (java.lang) and String (the generated one
in party.javalang):
Exception in thread "main" java.lang.IllegalArgumentException: There is more
than one EClass with the same name (String in EPackage javalang and
javalang. A different EClassResolver should be used.

When I try to create an instance of "Pdi" (Pdi is a class that extends
Party)...

public static void main(String[] args) {

final String dataStoreName = "SGDDataStore";

final HbDataStore dataStore =
(HbDataStore)HbHelper.INSTANCE.createRegisterDataStore(dataS toreName);

dataStore.setEPackages(new EPackage[] { PartyPackage.eINSTANCE,
PartyPackageImpl.eINSTANCE,

JavalangPackage.eINSTANCE, JavalangPackageImpl.eINSTANCE,
JavautilPackage.eINSTANCE,

JavautilPackageImpl.eINSTANCE, });




dataStore.initialize();


final SessionFactory sessionFactory = dataStore.getSessionFactory();

{

final Session session = sessionFactory.openSession();

session.beginTransaction();


Pdi pdi = PartyFactory.eINSTANCE.createPdi();

pdi.setAddress( "Campus, s/n"); // <----------------- (*)



session.save(pdi);

// (continues)

}

(*) ... Eclipse says: "the method setAddress (String) in the type Party is
not applicable for the arguments String.

There's a conflict between the String in (final String dataStoreName =
"SGDDataStore";) and the String in (pdi.setAddress( "Campus, s/n"); ).

Can you help me? Thanks in advance,

Gonzalo
Previous Topic:EMFT-OQTV 1.0.1 Build Announcements
Next Topic:[teneo] EMF 2.2.1 vs EMF 2.3.x for Teneo 0.8x
Goto Forum:
  


Current Time: Thu Jan 21 15:34:44 GMT 2021

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

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

Back to the top