From: George T. <geo...@fr...> - 2005-09-04 16:48:52
|
Hello again Eventually, the only solution I found, in order to remove an AssociationR= ole from Association, is the following: 1. I replicate the previous association with a new one (without the specified AssociationRole) 2. I move the Reifier into the new association 3. I remove the old association completely If anybody has some ideas on this problem, or would like to ask for something, I would like to read it Cheers George ----- Original Message ----- From: "George Tryfon" <geo...@fr...> To: <tm4...@li...> Sent: Friday, September 02, 2005 10:09 PM Subject: [TM4J-users] more on AssociationRole in hibernate / MySQL > Hello again, > > (I am attaching this as a plain text also, for easier reading) > > I have a problem with Associations and after some days of confusion I found > out that: > > In my hibernate/MySQL server (I have a client server application using RMI) > > The server is trying to delete an AssociationRole, because of a clients RMI > call > > here is my code (in the server): > > Association a =3D m_associationRole.getAssociation (); > m_associationRole.remove (); > System.out.println ("comes up to this point"); > Set<AssociationRole> set =3D a.getAssociationRoles (); > System.out.println ("never comes here!"); > This generaly should work OK but: > > If for some reason a previous (different) RMI call from the client (or > another client), used this specific Association that holds the > AssociationRole > > As a result, I have the following Exception: > > > comes up to this point > > org.tm4j.topicmap.ProviderTransactionException: Error updating data object. > > Cause: net.sf.hibernate.ObjectNotFoundException: The object with that i= d was > deleted: 4028802.....bbb600002, of class: > org.tm4j.topicmap.hibernate.MemberDataObject > > Cause:The object with that id was deleted: 4028802.....bbb600002, of class: > org.tm4j.topicmap.hibernate.MemberDataObject > > at org.tm4j.topicpam.hibernate.HibernateProviderTransaction.load(Unknow= n > Source) > > at org.tm4j.topicmap.hibernate.PersistenceWrapper.load(Unknown Source) > > at org.tm4j.topicmap.hibernate.PersistenceWrapper.load(Unknown Source) > > at org.tm4j.topicmap.hibernate.MemberImpl.getPlayers(Unknown Source) > > at org.tm4j.topicmap.hibernate.MemberImpl.getPlayers(Unknown Source) > > at > org.tm4j.tmapi.core.TMAPIAssociationImpl.getAssociationRoles(TMAPIAssocia= tio > nImpl.java:79) > > 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(Unkown Source) > > at sun.rmi.server.UnicastServerRef.dispatch(Unkown Source) > > at sun.rmi.transport.Transport$1.run(Unkown Source) > > at java.security.AccessController.doPrivileged(Native Method) > > at sun.rmi.transport.Transport.serviceCall(Unkown Source) > > at sun.rmi.transport.tcp.TCPTransport.handleMessage(Unkown Source) > > at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unkown Sour= ce) > > at java.lang.Thread.run(Unkown Source) > > caused by: net.sf.hibernate.ObjectNotFoundException: The object with th= at id > was deleted: 4028802.....bbb600002, of class: > org.tm4j.topicmap.hibernate.MemberDataObject > > at net.sf.hibernate.impl.SessionImpl.doLoad(SessionImpl.java:2060) > > at net.sf.hibernate.impl.SessionImpl.doLoadByClass(SessionImpl.java:195= 5) > > at net.sf.hibernate.impl.SessionImpl.load(SessionImpl.java:1884) > > ... 18 more > > > > > > I close and restart the client, I try to access the AssociationRoles an= d I > get: > > > java.rmi.UnmarshalException: Error unmarshaling return; nested exceptio= n is: > > java.lang.ClassNotFoundException: > org.tm4j.topicmap.ProviderTransactionException > > at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:217) > > at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:126) > > at etm.server.rmi.tmapi.EtmAssociationImp_Stub.getAssociationRoles(Unkn= own > Source) > > at > etm.client.tmapi.AssociationImp.getAssociationRoles(AssociationImp.java:7= 0) > > at yellow.ui.graph.PanGraph.expandAssociation(PanGraph.java:629) > > at > yellow.actions.node.ExpandTopicRolesAction$1TThread.run(ExpandTopicRolesA= cti > on.java:104) > > Caused by: java.lang.ClassNotFoundException: > org.tm4j.topicmap.ProviderTransactionException > > at java.net.URLClassLoader$1.run(URLClassLoader.java:200) > > at java.security.AccessController.doPrivileged(Native Method) > > at java.net.URLClassLoader.findClass(URLClassLoader.java:188) > > at java.lang.ClassLoader.loadClass(ClassLoader.java:306) > > at java.lang.ClassLoader.loadClass(ClassLoader.java:251) > > at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) > > at java.lang.Class.forName0(Native Method) > > at java.lang.Class.forName(Class.java:242) > > at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:430) > > at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:165) > > at java.rmi.server.RMIClassLoader$2.loadClass(RMIClassLoader.java:620) > > at java.rmi.server.RMIClassLoader.loadClass(RMIClassLoader.java:247) > > at > sun.rmi.server.MarshalInputStream.resolveClass(MarshalInputStream.java:19= 7) > > at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:15= 38) > > at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1460) > > at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1693) > > at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299) > > at java.io.ObjectInputStream.readObject(ObjectInputStream.java:339) > > at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:215) > > ... 5 more > > > > I need to restart the server in order for the Association to work OK. > > (I have no similar problems with Topics, or deleting the full Associati= on, > or Occurrences) > > I am not a hibernate expert and I don't know if someone that knows hibernate > could have any ideas on this > It seems to me there is a problem with sessions or something like this > > any ideas? > Cheers > George > > > > > ____________________________________________________________________ > http://www.freemail.gr - =E4=F9=F1=E5=DC=ED =F5=F0=E7=F1=E5=F3=DF=E1 =E7= =EB=E5=EA=F4=F1=EF=ED=E9=EA=EF=FD =F4=E1=F7=F5=E4=F1=EF=EC=E5=DF=EF=F5. > http://www.freemail.gr - free email service for the Greek-speaking. ____________________________________________________________________ http://www.freemail.gr - =E4=F9=F1=E5=DC=ED =F5=F0=E7=F1=E5=F3=DF=E1 =E7=EB= =E5=EA=F4=F1=EF=ED=E9=EA=EF=FD =F4=E1=F7=F5=E4=F1=EF=EC=E5=DF=EF=F5. http://www.freemail.gr - free email service for the Greek-speaking. |