[Teneo] Implementation classes only [message #422631] |
Thu, 11 September 2008 13:37 |
Eclipse User |
|
|
|
Originally posted by: luzi.anderegg.ergon.ch
Hi,
I have an EMF model with "Suppress Interfaces" set to true in the
corresponding genmodel (that is only implementation classes and no
interfaces are generated). When I run my program with assertions
enabled, my program stops with the following output:
at org.eclipse.emf.teneo.ERuntime.isSelfOrSuperContained(ERunti me.java:176)
at
org.eclipse.emf.teneo.ERuntime.computeContainedClasses(ERunt ime.java:152)
at org.eclipse.emf.teneo.ERuntime.register(ERuntime.java:92)
at
org.eclipse.emf.teneo.annotations.mapper.AnnotationGenerator .map(AnnotationGenerator.java:89)
at
org.eclipse.emf.teneo.annotations.mapper.PersistenceMappingB uilder.buildMapping(PersistenceMappingBuilder.java:142)
at
org.eclipse.emf.teneo.annotations.mapper.PersistenceMappingB uilder.buildMapping(PersistenceMappingBuilder.java:66)
at
org.eclipse.emf.teneo.hibernate.HbDataStore.mapEPackages(HbD ataStore.java:609)
at
org.eclipse.emf.teneo.hibernate.HbSessionDataStore.mapModel( HbSessionDataStore.java:155)
at
org.eclipse.emf.teneo.hibernate.HbSessionDataStore.initializ e(HbSessionDataStore.java:73)
Regards,
Luzi
|
|
|
Re: [Teneo] Implementation classes only [message #422632 is a reply to message #422631] |
Thu, 11 September 2008 14:31 |
Eclipse User |
|
|
|
Originally posted by: luzi.anderegg.ergon.ch
as a small addendum: I tried the same thing with the library sample by
only generating implementation classes and the same assertion arises.
Does Teneo incorporate the feature "suppress interfaces"?
Thanks for any information
Luzi
|
|
|
|
|
|
|
|
Re: [Teneo] Implementation classes only [message #422829 is a reply to message #422722] |
Tue, 16 September 2008 15:45 |
Eclipse User |
|
|
|
Originally posted by: luzi.anderegg.ergon.ch
Hi Martin
thanks for the quick fix. The assertion doesn't fail anymore as it is
not here anymore :-).
My application now fails at another point (see below). Do you have any
ideas about this one?
Regards,
Luzi
java.lang.IllegalArgumentException: The class 'DataPoint' is not a valid
classifier
at
ch.belimo.bd.commissioning.businessmodel.system.SystemFactor y.create(SystemFactory.java:99)
at org.eclipse.emf.ecore.util.EcoreUtil.create(EcoreUtil.java:3 169)
at
org.eclipse.emf.teneo.hibernate.tuplizer.EMFInstantiator.ins tantiate(EMFInstantiator.java:85)
at
org.hibernate.tuple.entity.AbstractEntityTuplizer.instantiat e(AbstractEntityTuplizer.java:351)
at
org.hibernate.persister.entity.AbstractEntityPersister.insta ntiate(AbstractEntityPersister.java:3611)
at org.hibernate.impl.SessionImpl.instantiate(SessionImpl.java: 1275)
at org.hibernate.impl.SessionImpl.instantiate(SessionImpl.java: 1264)
at org.hibernate.loader.Loader.instanceNotYetLoaded(Loader.java :1299)
at org.hibernate.loader.Loader.getRow(Loader.java:1206)
at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java: 580)
at org.hibernate.loader.Loader.doQuery(Loader.java:701)
at
org.hibernate.loader.Loader.doQueryAndInitializeNonLazyColle ctions(Loader.java:236)
at org.hibernate.loader.Loader.loadCollection(Loader.java:1994)
at
org.hibernate.loader.collection.CollectionLoader.initialize( CollectionLoader.java:36)
at
org.hibernate.persister.collection.AbstractCollectionPersist er.initialize(AbstractCollectionPersister.java:565)
at
org.hibernate.event.def.DefaultInitializeCollectionEventList ener.onInitializeCollection(DefaultInitializeCollectionEvent Listener.java:63)
at
org.eclipse.emf.teneo.hibernate.mapping.EMFInitializeCollect ionEventListener.onInitializeCollection(EMFInitializeCollect ionEventListener.java:61)
at
org.hibernate.impl.SessionImpl.initializeCollection(SessionI mpl.java:1716)
at
org.hibernate.collection.AbstractPersistentCollection.initia lize(AbstractPersistentCollection.java:344)
at
org.hibernate.collection.AbstractPersistentCollection.read(A bstractPersistentCollection.java:86)
at org.hibernate.collection.PersistentList.toArray(PersistentLi st.java:123)
at
org.eclipse.emf.teneo.hibernate.mapping.elist.HibernatePersi stableEList.doLoad(HibernatePersistableEList.java:138)
at
org.eclipse.emf.teneo.mapping.elist.PersistableEList.load(Pe rsistableEList.java:207)
at
org.eclipse.emf.teneo.mapping.elist.PersistableEList.delegat eSize(PersistableEList.java:443)
at
org.eclipse.emf.common.util.DelegatingEList.size(DelegatingE List.java:224)
at
org.eclipse.emf.common.util.DelegatingEList$EIterator.hasNex t(DelegatingEList.java:1050)
at
org.eclipse.emf.edit.provider.ItemProviderAdapter.getChildre n(ItemProviderAdapter.java:340)
at
org.eclipse.emf.edit.provider.ItemProviderAdapter.hasChildre n(ItemProviderAdapter.java:397)
at
org.eclipse.emf.edit.provider.ItemProviderAdapter.hasChildre n(ItemProviderAdapter.java:384)
at
org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvid er.hasChildren(AdapterFactoryContentProvider.java:198)
at
org.eclipse.jface.viewers.AbstractTreeViewer.isExpandable(Ab stractTreeViewer.java:2076)
Bruno Ziswiler wrote:
> Hi Martin
>
> Thanks for your quick answer. I entered the issue into Bugzilla (#247256).
>
>
> Regards
> Bruno
>
>
> Martin Taal wrote:
>> Hi Bruno,
>> If you enter a bugzilla I will do a fix right away and include it in a
>> build which I will also do very quickly (same day). I don't have a
>> quicker workaround at the moment.
>>
>> gr. Martin
>>
>> Bruno Ziswiler wrote:
>>> Hi Martin
>>>
>>> I'm in the team with Luzi. Thanks for your kind reply. We will enter
>>> the issue into bugzilla.
>>>
>>> Is the fix obvious to you? What would be a work-around so we are able
>>> to proceed with our project?
>>>
>>>
>>> Thanks,
>>> Bruno
>>>
>>>
>>> Martin Taal wrote:
>>>> Hi Luzi,
>>>> I tested this and this is indeed a bug. Can you enter a bugzilla for
>>>> this? Then I will solve this in the next build.
>>>>
>>>> gr. Martin
>>>>
>>>> Luzi Anderegg wrote:
>>>>> as a small addendum: I tried the same thing with the library sample by
>>>>> only generating implementation classes and the same assertion arises.
>>>>>
>>>>> Does Teneo incorporate the feature "suppress interfaces"?
>>>>>
>>>>> Thanks for any information
>>>>> Luzi
>>>>
>>>>
>>
>>
|
|
|
|
Re: [Teneo] Implementation classes only [message #422844 is a reply to message #422832] |
Wed, 17 September 2008 07:53 |
Eclipse User |
|
|
|
Originally posted by: luzi.anderegg.ergon.ch
The class 'DataPoint' is actually only an interface. I cannot exactly
reconstruct how the code computes this class. I originally thought that
there could be a relation to the assertion failure.
|
|
|
|
Re: [Teneo] Implementation classes only [message #422850 is a reply to message #422845] |
Wed, 17 September 2008 08:58 |
Eclipse User |
|
|
|
Originally posted by: luzi.anderegg.ergon.ch
Sorry Martin, I meant that DataPoint is modelled in EMF as an interface
(set 'interface' property to true). Therefore, the factory has no case
in the switch statement for this eClass.
Martin Taal wrote:
> Hi Luzi,
> The code in EcoreUtil uses an eClass (not a java Class). So I mean the
> eClass DataPoint not the class DataPoint. Can you check what eClass is
> passed and why it can't find its own factory?
>
> gr. Martin
>
> Luzi Anderegg wrote:
>> The class 'DataPoint' is actually only an interface. I cannot exactly
>> reconstruct how the code computes this class. I originally thought
>> that there could be a relation to the assertion failure.
>
>
|
|
|
|
|
Re: [Teneo] Implementation classes only [message #422887 is a reply to message #422881] |
Wed, 17 September 2008 21:33 |
Martin Taal Messages: 5468 Registered: July 2009 |
Senior Member |
|
|
Hi Luzi,
Can you send me the model and a small testcase? Then I can try it out myself.
gr. Martin
luciano wrote:
> Hi Martin,
>
>> Hi Luzi,
>> I tried to reproduce your case by adapting one of the testcases to
>> contain a
> list of eclass with
>> interface=true and this worked fine for me.
> In my case, it worked well for a quite a long time. The problems started
> when when I introduced some more references from a new class.
>> Can it be possible that you changed the model by setting interface to
>> true
> and then rerunned your
>> testcase on an existing database which had instances of the eclass
>> which was
> changed to interface to
>> true? (guessing here...)
> No, I cleaned up the database. When I look into the database, all the
> names seems to be correct. That's why. I thought some computation of the
> mapping may be wrong.
>
> Luzi
>
--
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
|
|
|
Powered by
FUDForum. Page generated in 0.04259 seconds