Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [teneo] problem with composition link
[teneo] problem with composition link [message #614079] Thu, 24 January 2008 17:13
fred is currently offline fredFriend
Messages: 35
Registered: July 2009
Member
Hi Martin and everybody

I'have a problem with an application I'm working on.
It uses GMF, teneo and hibernate
my application works well while doing association link.
but as soon as I use a composition link, a lots of problems arrived.


FIRST CASE : if I create for example a player inside a team, all goes well.
But if i try to drag and drop the player out of the team to cut the
composition link, no error is raised, my player seems to be out of the
team in my diagram, but when i see in database, my player don't exist
anymore, it has been deleted.

SECOND CASE : I create a team from one side.
I create a player for the other side without link.
I try then to drag and drop the player inside my team to create my
composition link.
When I save to commit in database, an error occured and session is closed.
here you can found my output to see trace .
I hope someone will see where is the problem to help me

1035725 [main] DEBUG org.eclipse.emf.teneo.resource.StoreResource -
Validating contents of resource
platform:/resource/test/db_test/teneo.ProtoTournoi approx. 0 will be
checked
1035725 [main] DEBUG org.eclipse.emf.teneo.resource.StoreResource - Found
0 errors
1035725 [main] DEBUG
org.eclipse.emf.teneo.hibernate.resource.HibernateResource - Saving
resource with uri: platform:/resource/test/db_test/teneo.ProtoTournoi
1035725 [main] DEBUG org.hibernate.transaction.JDBCTransaction - begin
1035725 [main] DEBUG org.hibernate.jdbc.ConnectionManager - opening JDBC
connection
1035725 [main] DEBUG
org.hibernate.connection.DriverManagerConnectionProvider - total
checked-out connections: 0
1035725 [main] DEBUG
org.hibernate.connection.DriverManagerConnectionProvider - using pooled
JDBC connection, pool size: 0
1035725 [main] DEBUG org.hibernate.transaction.JDBCTransaction - current
autocommit status: false
1035725 [main] DEBUG org.hibernate.jdbc.JDBCContext - after transaction
begin
1035741 [main] DEBUG org.hibernate.event.def.AbstractSaveEventListener -
persistent instance of: ProtoTournoi.impl.TournoiImpl
1035741 [main] DEBUG
org.hibernate.event.def.DefaultSaveOrUpdateEventListener - ignoring
persistent instance
1035741 [main] DEBUG
org.hibernate.event.def.DefaultSaveOrUpdateEventListener - object already
associated with session: [Tournoi#1]
1035741 [main] DEBUG org.hibernate.event.def.AbstractFlushingEventListener
- flushing session
1035741 [main] DEBUG org.hibernate.event.def.AbstractFlushingEventListener
- processing flush-time cascades
1035741 [main] DEBUG org.hibernate.engine.Cascade - processing cascade
ACTION_SAVE_UPDATE for: Tournoi
1035741 [main] DEBUG org.hibernate.engine.Cascade - cascade
ACTION_SAVE_UPDATE for collection: Tournoi.joueur
1035741 [main] DEBUG org.hibernate.engine.Cascade - done cascade
ACTION_SAVE_UPDATE for collection: Tournoi.joueur
1035741 [main] DEBUG org.hibernate.engine.Cascade - deleting orphans for
collection: Tournoi.joueur
1035741 [main] DEBUG org.hibernate.engine.Cascade - deleting orphaned
entity instance: Joueur
1035741 [main] DEBUG org.hibernate.event.def.DefaultDeleteEventListener -
deleting a persistent instance
1035741 [main] DEBUG org.hibernate.event.def.DefaultDeleteEventListener -
deleting [Joueur#2]
1035741 [main] DEBUG org.hibernate.impl.SessionImpl - setting cache mode
to: GET
1035741 [main] DEBUG org.hibernate.impl.SessionImpl - setting cache mode
to: NORMAL
1035741 [main] DEBUG org.hibernate.impl.SessionImpl - setting cache mode
to: GET
1035741 [main] DEBUG org.hibernate.impl.SessionImpl - setting cache mode
to: NORMAL
1035741 [main] DEBUG org.hibernate.engine.Cascade - done deleting orphans
for collection: Tournoi.joueur
1035741 [main] DEBUG org.hibernate.engine.Cascade - cascade
ACTION_SAVE_UPDATE for collection: Tournoi.equipe
1035741 [main] DEBUG org.hibernate.engine.CascadingAction - cascading to
saveOrUpdate: Equipe
1035741 [main] DEBUG org.hibernate.event.def.AbstractSaveEventListener -
persistent instance of: Equipe
1035741 [main] DEBUG
org.hibernate.event.def.DefaultSaveOrUpdateEventListener - ignoring
persistent instance
1035741 [main] DEBUG
org.hibernate.event.def.DefaultSaveOrUpdateEventListener - object already
associated with session: [Equipe#equipe]
1035741 [main] DEBUG org.hibernate.engine.Cascade - done cascade
ACTION_SAVE_UPDATE for collection: Tournoi.equipe
1035741 [main] DEBUG org.hibernate.engine.Cascade - deleting orphans for
collection: Tournoi.equipe
1035741 [main] DEBUG org.hibernate.engine.Cascade - done deleting orphans
for collection: Tournoi.equipe
1035741 [main] DEBUG org.hibernate.engine.Cascade - cascade
ACTION_SAVE_UPDATE for collection: Tournoi.match
1035741 [main] DEBUG org.hibernate.engine.Cascade - done cascade
ACTION_SAVE_UPDATE for collection: Tournoi.match
1035741 [main] DEBUG org.hibernate.engine.Cascade - deleting orphans for
collection: Tournoi.match
1035741 [main] DEBUG org.hibernate.engine.Cascade - done deleting orphans
for collection: Tournoi.match
1035741 [main] DEBUG org.hibernate.engine.Cascade - cascade
ACTION_SAVE_UPDATE for collection: Tournoi.championnat
1035741 [main] DEBUG org.hibernate.engine.Cascade - done cascade
ACTION_SAVE_UPDATE for collection: Tournoi.championnat
1035741 [main] DEBUG org.hibernate.engine.Cascade - deleting orphans for
collection: Tournoi.championnat
1035741 [main] DEBUG org.hibernate.engine.Cascade - done deleting orphans
for collection: Tournoi.championnat
1035741 [main] DEBUG org.hibernate.engine.Cascade - cascade
ACTION_SAVE_UPDATE for collection: Tournoi.stade
1035741 [main] DEBUG org.hibernate.engine.Cascade - done cascade
ACTION_SAVE_UPDATE for collection: Tournoi.stade
1035741 [main] DEBUG org.hibernate.engine.Cascade - deleting orphans for
collection: Tournoi.stade
1035741 [main] DEBUG org.hibernate.engine.Cascade - done deleting orphans
for collection: Tournoi.stade
1035741 [main] DEBUG org.hibernate.engine.Cascade - cascade
ACTION_SAVE_UPDATE for collection: Tournoi.ville
1035741 [main] DEBUG org.hibernate.engine.Cascade - done cascade
ACTION_SAVE_UPDATE for collection: Tournoi.ville
1035741 [main] DEBUG org.hibernate.engine.Cascade - deleting orphans for
collection: Tournoi.ville
1035741 [main] DEBUG org.hibernate.engine.Cascade - done deleting orphans
for collection: Tournoi.ville
1035741 [main] DEBUG org.hibernate.engine.Cascade - cascade
ACTION_SAVE_UPDATE for collection: Tournoi.historique
1035741 [main] DEBUG org.hibernate.engine.CascadingAction - cascading to
saveOrUpdate: Historique
1035741 [main] DEBUG org.hibernate.event.def.AbstractSaveEventListener -
persistent instance of: Historique
1035741 [main] DEBUG
org.hibernate.event.def.DefaultSaveOrUpdateEventListener - ignoring
persistent instance
1035741 [main] DEBUG
org.hibernate.event.def.DefaultSaveOrUpdateEventListener - object already
associated with session: [Historique#3]
1035741 [main] DEBUG org.hibernate.engine.Cascade - done cascade
ACTION_SAVE_UPDATE for collection: Tournoi.historique
1035741 [main] DEBUG org.hibernate.engine.Cascade - deleting orphans for
collection: Tournoi.historique
1035741 [main] DEBUG org.hibernate.engine.Cascade - done deleting orphans
for collection: Tournoi.historique
1035741 [main] DEBUG org.hibernate.engine.Cascade - cascade
ACTION_SAVE_UPDATE for collection: Tournoi.participant
1035741 [main] DEBUG org.hibernate.engine.Cascade - done cascade
ACTION_SAVE_UPDATE for collection: Tournoi.participant
1035741 [main] DEBUG org.hibernate.engine.Cascade - deleting orphans for
collection: Tournoi.participant
1035741 [main] DEBUG org.hibernate.engine.Cascade - done deleting orphans
for collection: Tournoi.participant
1035741 [main] DEBUG org.hibernate.engine.Cascade - cascade
ACTION_SAVE_UPDATE for collection: Tournoi.participer
1035741 [main] DEBUG org.hibernate.engine.Cascade - done cascade
ACTION_SAVE_UPDATE for collection: Tournoi.participer
1035741 [main] DEBUG org.hibernate.engine.Cascade - deleting orphans for
collection: Tournoi.participer
1035741 [main] DEBUG org.hibernate.engine.Cascade - done deleting orphans
for collection: Tournoi.participer
1035741 [main] DEBUG org.hibernate.engine.Cascade - done processing
cascade ACTION_SAVE_UPDATE for: Tournoi
1035741 [main] DEBUG org.hibernate.engine.Cascade - processing cascade
ACTION_SAVE_UPDATE for: Equipe
1035741 [main] DEBUG org.hibernate.engine.Cascade - cascade
ACTION_SAVE_UPDATE for collection: Equipe.fairePartie
1035741 [main] DEBUG org.hibernate.engine.CascadingAction - cascading to
saveOrUpdate: Joueur
1035741 [main] DEBUG org.hibernate.event.def.AbstractSaveEventListener -
deleted instance of: Joueur
1035741 [main] DEBUG
org.hibernate.event.def.DefaultSaveOrUpdateEventListener - saving
transient instance
1035741 [main] DEBUG org.hibernate.impl.SessionImpl - flushing to force
deletion of re-saved object: [Joueur#2]
1035741 [main] ERROR org.eclipse.emf.teneo.hibernate.HbMapperException -
Exception when saving resource ProtoTournoi
org.hibernate.ObjectDeletedException: deleted object would be re-saved by
cascade (remove deleted object from associations): [Joueur#2]
at org.hibernate.impl.SessionImpl.forceFlush(SessionImpl.java:1 014)
at
org.hibernate.event.def.DefaultSaveOrUpdateEventListener.ent ityIsTransient(DefaultSaveOrUpdateEventListener.java:165)
at
org.hibernate.event.def.DefaultSaveOrUpdateEventListener.per formSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:94)
at
org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onS aveOrUpdate(DefaultSaveOrUpdateEventListener.java:70)
at org.hibernate.impl.SessionImpl.fireSaveOrUpdate(SessionImpl. java:507)
at org.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java :499)
at
org.hibernate.engine.CascadingAction$5.cascade(CascadingActi on.java:218)
at org.hibernate.engine.Cascade.cascadeToOne(Cascade.java:268)
at org.hibernate.engine.Cascade.cascadeAssociation(Cascade.java :216)
at org.hibernate.engine.Cascade.cascadeProperty(Cascade.java:16 9)
at
org.hibernate.engine.Cascade.cascadeCollectionElements(Casca de.java:296)
at org.hibernate.engine.Cascade.cascadeCollection(Cascade.java: 242)
at org.hibernate.engine.Cascade.cascadeAssociation(Cascade.java :219)
at org.hibernate.engine.Cascade.cascadeProperty(Cascade.java:16 9)
at org.hibernate.engine.Cascade.cascade(Cascade.java:130)
at
org.hibernate.event.def.AbstractFlushingEventListener.cascad eOnFlush(AbstractFlushingEventListener.java:131)
at
org.hibernate.event.def.AbstractFlushingEventListener.prepar eEntityFlushes(AbstractFlushingEventListener.java:122)
at
org.hibernate.event.def.AbstractFlushingEventListener.flushE verythingToExecutions(AbstractFlushingEventListener.java:65)
at
org.hibernate.event.def.DefaultFlushEventListener.onFlush(De faultFlushEventListener.java:26)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)
at
org.eclipse.emf.teneo.hibernate.HbSessionWrapper.flush(HbSes sionWrapper.java:161)
at
org.eclipse.emf.teneo.hibernate.resource.HibernateResource.s aveResource(HibernateResource.java:346)
at
org.eclipse.emf.teneo.resource.StoreResource.save(StoreResou rce.java:348)
at
ProtoTournoi.diagram.part.ProtoTournoiDocumentProvider.doSav eDocument(ProtoTournoiDocumentProvider.java:617)
at
org.eclipse.gmf.runtime.diagram.ui.resources.editor.document .AbstractDocumentProvider$1SaveOperation.execute(AbstractDoc umentProvider.java:596)
at
org.eclipse.gmf.runtime.diagram.ui.resources.editor.document .AbstractDocumentProvider$DocumentProviderOperation.run(Abst ractDocumentProvider.java:66)
at
org.eclipse.gmf.runtime.diagram.ui.resources.editor.document .AbstractDocumentProvider.executeOperation(AbstractDocumentP rovider.java:530)
at
org.eclipse.gmf.runtime.diagram.ui.resources.editor.document .AbstractDocumentProvider.saveDocument(AbstractDocumentProvi der.java:579)
at
org.eclipse.gmf.runtime.diagram.ui.resources.editor.parts.Di agramDocumentEditor.performSave(DiagramDocumentEditor.java:8 25)
at
org.eclipse.gmf.runtime.diagram.ui.resources.editor.parts.Di agramDocumentEditor.doSave(DiagramDocumentEditor.java:646)
at org.eclipse.ui.internal.SaveableHelper$1.run(SaveableHelper. java:143)
at org.eclipse.ui.internal.SaveableHelper$4.run(SaveableHelper. java:266)
at
org.eclipse.jface.operation.ModalContext.runInCurrentThread( ModalContext.java:369)
at org.eclipse.jface.operation.ModalContext.run(ModalContext.ja va:313)
at
org.eclipse.jface.window.ApplicationWindow$1.run(Application Window.java:758)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:67)
at
org.eclipse.jface.window.ApplicationWindow.run(ApplicationWi ndow.java:755)
at org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow. java:2451)
at
org.eclipse.ui.internal.SaveableHelper.runProgressMonitorOpe ration(SaveableHelper.java:274)
at
org.eclipse.ui.internal.SaveableHelper.runProgressMonitorOpe ration(SaveableHelper.java:253)
at
org.eclipse.ui.internal.SaveableHelper.savePart(SaveableHelp er.java:148)
at org.eclipse.ui.internal.EditorManager.savePart(EditorManager .java:1345)
at org.eclipse.ui.internal.WorkbenchPage.savePart(WorkbenchPage .java:3202)
at
org.eclipse.ui.internal.WorkbenchPage.saveEditor(WorkbenchPa ge.java:3215)
at org.eclipse.ui.internal.SaveAction.run(SaveAction.java:73)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:498 )
at
org.eclipse.jface.commands.ActionHandler.execute(ActionHandl er.java:119)
at org.eclipse.core.commands.Command.executeWithChecks(Command. java:475)
at
org.eclipse.core.commands.ParameterizedCommand.executeWithCh ecks(ParameterizedCommand.java:429)
at
org.eclipse.ui.internal.handlers.HandlerService.executeComma nd(HandlerService.java:165)
at
org.eclipse.ui.internal.keys.WorkbenchKeyboard.executeComman d(WorkbenchKeyboard.java:470)
at
org.eclipse.ui.internal.keys.WorkbenchKeyboard.press(Workben chKeyboard.java:821)
at
org.eclipse.ui.internal.keys.WorkbenchKeyboard.processKeyEve nt(WorkbenchKeyboard.java:879)
at
org.eclipse.ui.internal.keys.WorkbenchKeyboard.filterKeySequ enceBindings(WorkbenchKeyboard.java:568)
at
org.eclipse.ui.internal.keys.WorkbenchKeyboard.access$3(Work benchKeyboard.java:510)
at
org.eclipse.ui.internal.keys.WorkbenchKeyboard$KeyDownFilter .handleEvent(WorkbenchKeyboard.java:126)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
at org.eclipse.swt.widgets.Display.filterEvent(Display.java:114 1)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:937)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:962)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:947)
at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:975)
at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:971)
at org.eclipse.swt.widgets.Widget.wmChar(Widget.java:1285)
at org.eclipse.swt.widgets.Control.WM_CHAR(Control.java:3772)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:3672 )
at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:291)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4351 )
at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:22 65)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3291)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2389)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:22 19)
at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
at
org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:289)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:461)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
at
org.eclipse.ui.internal.ide.application.IDEApplication.start (IDEApplication.java:106)
at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:169)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:106)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:76)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:363)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:176)
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 org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 508)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:447)
at org.eclipse.equinox.launcher.Main.run(Main.java:1173)
at org.eclipse.equinox.launcher.Main.main(Main.java:1148)
1035741 [main] DEBUG org.hibernate.transaction.JDBCTransaction - rollback
1035741 [main] DEBUG org.hibernate.transaction.JDBCTransaction - rolled
back JDBC Connection
1035741 [main] DEBUG org.hibernate.jdbc.JDBCContext - after transaction
completion
1035741 [main] DEBUG org.hibernate.jdbc.ConnectionManager - aggressively
releasing JDBC connection
1035741 [main] DEBUG org.hibernate.jdbc.ConnectionManager - releasing
JDBC connection [ (open PreparedStatements: 0, globally: 0) (open
ResultSets: 0, globally: 0)]
1035741 [main] DEBUG
org.hibernate.connection.DriverManagerConnectionProvider - returning
connection to pool, pool size: 1
1035741 [main] DEBUG org.hibernate.impl.SessionImpl - after transaction
completion
1035741 [main] DEBUG org.hibernate.impl.SessionImpl - closing session
1035741 [main] DEBUG org.hibernate.jdbc.ConnectionManager - connection
already null in cleanup : no action
Previous Topic:JUnit Test on JET Transform
Next Topic:[Teneo] Enhancing the ECore classes
Goto Forum:
  


Current Time: Sun Sep 20 05:44:02 GMT 2020

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

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

Back to the top