|
Re: [Teneo]Can't persist EStringToStringMapEntry instances [message #78504 is a reply to message #78475] |
Thu, 05 April 2007 14:51 |
Martin Taal Messages: 5468 Registered: July 2009 |
Senior Member |
|
|
Hi Mike,
The epackage of the type you use should also be persisted to get this working correctly. In your
case this means the ecore package itself. If you only want to use the EStringToStringMap then you
can make all the types in the ecore package (except this EStringToStringMapEntry) transient using an
xml annotation file. However this seems like a fair amount of work for just having an
EStringToStringMap. So maybe it is easier to use your own custom EStringToStringMapEntry.
gr. Martin
Michael Kanaley wrote:
> Hello Martin,
> I have attached a bundle that you can directly import into Eclipse.
> I have removed hibernate and other third party JARs to keep the attachment
> small so it will not run until you put all the jars in the lib directory.
> It uses HSQLDB and the latest 0.7.5 Teneo: 0.7.5.v200703301226
> I can send you the jars if necessary.
> It will add a launcher called MapTests.
>
> This model plugin has one class called TableWithMap that has a single
> EReference called "members" of type EStringToStringMapEntry that has
> upperbound of -1.
> Basically, a list of EStringToStringMapEntrys.
> EStringToStringMapEntry is a model object that ships in the ECore model.
>
> When I try to persist an instance of this model, the following exception is
> thrown.
> Please let me know if this is a bug and I will file a bugzilla.
> I would also be interesting in any workaround, if possible.
> Thanks,
> -mike
>
> java.lang.IllegalArgumentException: No EClass found using
> EStringToStringMapEntry
> at
> org.eclipse.emf.teneo.ecore.DefaultEClassNameStrategy.toECla ss(DefaultEClassNameStrategy.java:78)
> at
> org.eclipse.emf.teneo.hibernate.HbDataStore.setRefersToOfSup ers(HbDataStore.java:815)
> at
> org.eclipse.emf.teneo.hibernate.HbDataStore.computeReferers( HbDataStore.java:803)
> at
> org.eclipse.emf.teneo.hibernate.HbDataStore.initialize(HbDat aStore.java:163)
> at test.teneo.MapTests.createHbDataStore(MapTests.java:72)
> at test.teneo.MapTests.testSaving(MapTests.java:86)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at junit.framework.TestCase.runTest(TestCase.java:154)
> at junit.framework.TestCase.runBare(TestCase.java:127)
> at junit.framework.TestResult$1.protect(TestResult.java:106)
> at junit.framework.TestResult.runProtected(TestResult.java:124)
> at junit.framework.TestResult.run(TestResult.java:109)
> at junit.framework.TestCase.run(TestCase.java:118)
> at junit.framework.TestSuite.runTest(TestSuite.java:208)
> at junit.framework.TestSuite.run(TestSuite.java:203)
> at
> org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestRefer ence.run(JUnit3TestReference.java:128)
> at
> org.eclipse.jdt.internal.junit.runner.TestExecution.run(Test Execution.java:38)
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunner.java:460)
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunner.java:673)
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(R emoteTestRunner.java:386)
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main( RemoteTestRunner.java:196)
>
>
>
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
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
|
|
|
Re: [Teneo]Can't persist EStringToStringMapEntry instances [message #604371 is a reply to message #78475] |
Thu, 05 April 2007 14:51 |
Martin Taal Messages: 5468 Registered: July 2009 |
Senior Member |
|
|
Hi Mike,
The epackage of the type you use should also be persisted to get this working correctly. In your
case this means the ecore package itself. If you only want to use the EStringToStringMap then you
can make all the types in the ecore package (except this EStringToStringMapEntry) transient using an
xml annotation file. However this seems like a fair amount of work for just having an
EStringToStringMap. So maybe it is easier to use your own custom EStringToStringMapEntry.
gr. Martin
Michael Kanaley wrote:
> Hello Martin,
> I have attached a bundle that you can directly import into Eclipse.
> I have removed hibernate and other third party JARs to keep the attachment
> small so it will not run until you put all the jars in the lib directory.
> It uses HSQLDB and the latest 0.7.5 Teneo: 0.7.5.v200703301226
> I can send you the jars if necessary.
> It will add a launcher called MapTests.
>
> This model plugin has one class called TableWithMap that has a single
> EReference called "members" of type EStringToStringMapEntry that has
> upperbound of -1.
> Basically, a list of EStringToStringMapEntrys.
> EStringToStringMapEntry is a model object that ships in the ECore model.
>
> When I try to persist an instance of this model, the following exception is
> thrown.
> Please let me know if this is a bug and I will file a bugzilla.
> I would also be interesting in any workaround, if possible.
> Thanks,
> -mike
>
> java.lang.IllegalArgumentException: No EClass found using
> EStringToStringMapEntry
> at
> org.eclipse.emf.teneo.ecore.DefaultEClassNameStrategy.toECla ss(DefaultEClassNameStrategy.java:78)
> at
> org.eclipse.emf.teneo.hibernate.HbDataStore.setRefersToOfSup ers(HbDataStore.java:815)
> at
> org.eclipse.emf.teneo.hibernate.HbDataStore.computeReferers( HbDataStore.java:803)
> at
> org.eclipse.emf.teneo.hibernate.HbDataStore.initialize(HbDat aStore.java:163)
> at test.teneo.MapTests.createHbDataStore(MapTests.java:72)
> at test.teneo.MapTests.testSaving(MapTests.java:86)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at junit.framework.TestCase.runTest(TestCase.java:154)
> at junit.framework.TestCase.runBare(TestCase.java:127)
> at junit.framework.TestResult$1.protect(TestResult.java:106)
> at junit.framework.TestResult.runProtected(TestResult.java:124)
> at junit.framework.TestResult.run(TestResult.java:109)
> at junit.framework.TestCase.run(TestCase.java:118)
> at junit.framework.TestSuite.runTest(TestSuite.java:208)
> at junit.framework.TestSuite.run(TestSuite.java:203)
> at
> org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestRefer ence.run(JUnit3TestReference.java:128)
> at
> org.eclipse.jdt.internal.junit.runner.TestExecution.run(Test Execution.java:38)
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunner.java:460)
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunner.java:673)
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(R emoteTestRunner.java:386)
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main( RemoteTestRunner.java:196)
>
>
>
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
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
|
|
|
Powered by
FUDForum. Page generated in 0.23888 seconds