[Teneo] (newbie): More than one EClass with the same name [message #604915] |
Mon, 23 April 2007 08:45 |
Gonzalo 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
|
|
|
Powered by
FUDForum. Page generated in 0.02699 seconds