Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [CDO Teneo] Storing XMIResource content into HibernateStore
[CDO Teneo] Storing XMIResource content into HibernateStore [message #510477] Wed, 27 January 2010 10:31 Go to previous message
Bjoern Sundin is currently offline Bjoern Sundin
Messages: 47
Registered: July 2009
Member
Hi Martin,

I'm testing to migrate a Teneo 1.0.1 application to CDO 3.0 backed by a HibernateStore

I have the following use case:

1. Load previously exported XMI into an XMIResource
2. Transfer XMIResource content to the CDOResource (backed by a HibernateStore)
3. Save CDOResource and so persist data into an empty database

This was working in the old application as well as when using CDO 3.0 and a DBStore. Using the HibernateStore, however, the
following exception is thrown while save is invoked:

java.lang.IllegalStateException: Current id and new id are different 65536/229747
at org.eclipse.emf.cdo.server.internal.hibernate.tuplizer.CDOID PropertySetter.set(CDOIDPropertySetter.java:77)
at org.hibernate.tuple.entity.AbstractEntityTuplizer.setIdentif ier(AbstractEntityTuplizer.java:227)
at org.hibernate.persister.entity.AbstractEntityPersister.setId entifier(AbstractEntityPersister.java:3610)
at org.hibernate.event.def.AbstractSaveEventListener.performSav e(AbstractSaveEventListener.java:194)
at org.hibernate.event.def.AbstractSaveEventListener.saveWithGe neratedId(AbstractSaveEventListener.java:144)
at
org.hibernate.event.def.DefaultSaveOrUpdateEventListener.sav eWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener .java:210)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.ent ityIsTransient(DefaultSaveOrUpdateEventListener.java:195)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.per formSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:117)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onS aveOrUpdate(DefaultSaveOrUpdateEventListener.java:93)
at org.hibernate.impl.SessionImpl.fireSaveOrUpdate(SessionImpl. java:535)
at org.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java :527)
at org.eclipse.emf.cdo.server.internal.hibernate.HibernateStore Accessor.write(HibernateStoreAccessor.java:505)
at org.eclipse.emf.cdo.internal.server.TransactionCommitContext Impl.write(TransactionCommitContextImpl.java:274)
at org.eclipse.emf.cdo.server.internal.net4j.protocol.CommitTra nsactionIndication$1.runLoop(CommitTransactionIndication.jav a:72)
at org.eclipse.emf.cdo.server.internal.net4j.protocol.CommitTra nsactionIndication$1.runLoop(CommitTransactionIndication.jav a:1)
at org.eclipse.net4j.util.om.monitor.ProgressDistributor.run(Pr ogressDistributor.java:96)
at
org.eclipse.emf.cdo.server.internal.net4j.protocol.CommitTra nsactionIndication.indicatingCommit(CommitTransactionIndicat ion.java:280)
at org.eclipse.emf.cdo.server.internal.net4j.protocol.CommitTra nsactionIndication.indicating(CommitTransactionIndication.ja va:173)
at org.eclipse.emf.cdo.server.internal.net4j.protocol.CommitTra nsactionIndication.indicating(CommitTransactionIndication.ja va:139)
at org.eclipse.net4j.signal.IndicationWithMonitoring.indicating (IndicationWithMonitoring.java:84)
at org.eclipse.net4j.signal.IndicationWithResponse.doExtendedIn put(IndicationWithResponse.java:90)
at org.eclipse.net4j.signal.Signal.doInput(Signal.java:311)
at org.eclipse.net4j.signal.IndicationWithResponse.execute(Indi cationWithResponse.java:63)
at org.eclipse.net4j.signal.IndicationWithMonitoring.execute(In dicationWithMonitoring.java:63)
at org.eclipse.net4j.signal.Signal.runSync(Signal.java:238)
at org.eclipse.net4j.signal.Signal.run(Signal.java:146)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Threa dPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoo lExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)

Halting at a breakpoint in CDOIDPropertySetter at line 77 I could verify that the object being processed ('Systemattributes') is
using a syntetic id. Could this be a problem?

I attach an zip with the configuration, logs with hbm mapping and stacktraces and the xmi I used.in case this could be of any help


Thanks in advanced!
Bjoern


 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic:XSDEcoreBuilder and reusing existing types
Next Topic:[CDO UI] Customizing CDO object text in an editor
Goto Forum:
  


Current Time: Wed Aug 20 00:54:19 EDT 2014

Powered by FUDForum. Page generated in 0.02204 seconds