Tuesday, December 28, 2010

CDO 3.0 with Hibernate Experiences

CDO allows efficient access to EMF repositories over a network, with pluggable persistence backends including Hibernate, which under the hood uses Teneo for its mapping.

CDO 3.0 is released. The newer CDO 4.0 is still in development.

CDO 4.0 should work with Teneo 1.1.2 and Hibernate 3.6.

With CDO 3.0, I'm quite confused which one I should use:
  • Teneo 1.1.2 + Hibernate 3.3.2
  • Teneo 1.2.0 + Hibernate 3.3.2
  • Teneo 1.2.0 + Hibernate 3.6
It seemed the third option is easily out, because for example, CDO 3.0's CDOPropertyGetter, does not support the new members of Hibernate 3.6 Getter interface, which is getMember() :
import org.hibernate.HibernateException;
import org.hibernate.engine.SessionImplementor;
import org.hibernate.property.Getter;
import java.lang.reflect.Method;
import java.util.Map;
/**
* TODO How does this differ from {@link CDORevisionSetter}? Both needed?
*
* @author Martin Taal
*/
public class CDOPropertyGetter extends CDOPropertyHandler implements Getter

(from  org.eclipse.emf.cdo.server.hibernate/src/org/eclipse/emf/cdo/server/internal/hibernate/tuplizer/CDOPropertyGetter.java)

CDO Wiki said CDO 3.0 should work with Teneo 1.2.0 where Teneo wiki said CDO 3.0 only works with Teneo 1.1.2.

I'm now running CDO 3.0 example with Teneo 1.2.0 but with Hibernate 3.3.2 instead of Hibernate 3.6. And it seems to work fine (I haven't tested thoroughly). I guess it's not about the Teneo version but the Hibernate version? (Meaning Teneo 1.2.0 is able to work with either Hibernate 3.3.2 or Hibernate 3.6? I'm not sure yet though.)

Another strange thing is that Teneo 1.2.0 plugins from Teneo 1.2.0 update site is versioned as 1.1.2.v201011240719, not 1.2.0 ...? (the EMF Teneo features are versioned as 1.2.0... which signifies the confusion). Am I doing something wrong or getting from the wrong update site?

Unfortunately the Eclipse newsgroup seems to be down on me right now so I can't post there so I posted it to my blog, hoping that this will provide some information on others wanting to taste CDO. :-)

Another tip: Previously I got an error:

IllegalStateException: Not able to update container columns of CDOResource with id OID:http://www.eclipse.org/emf/CDO/Eresource/2.0.0#CDOResource#1

Turned out it was due to me putting several duplicate Teneo plugins of different versions. (common sense, I know.)

I hope Eike Stepper or Martin Taal steps in (pun not intended) to clarify more on this.

I'll update this post when more information arrives. :)

Update: It seems my suspicion is incorrect, when trying to run the example CDO Client, I got the following error:

!ENTRY org.eclipse.osgi 2 0 2010-12-29 01:25:07.835
!MESSAGE One or more bundles are not resolved because the following root constraints are not resolved:
!SUBENTRY 1 org.eclipse.osgi 2 0 2010-12-29 01:25:07.835
!MESSAGE Bundle reference:file:/home/ceefour/project/AbisPulsa/p2/Teneo/org.eclipse.emf.teneo.hibernate_1.1.2.v201011240719.jar was not resolved.
!SUBENTRY 2 org.eclipse.emf.teneo.hibernate 2 0 2010-12-29 01:25:07.835
!MESSAGE Missing imported package org.hibernate.engine.query_[3.6.0,4.0.0).
!SUBENTRY 1 org.eclipse.osgi 2 0 2010-12-29 01:25:07.836
!MESSAGE Bundle reference:file:/home/ceefour/project/AbisPulsa/workspace/.metadata/.plugins/org.eclipse.pde.core/.bundle_pool/plugins/org.eclipse.emf.query.ocl_2.0.0.v20091215-1624.jar was not resolved.
!SUBENTRY 2 org.eclipse.emf.query.ocl 2 0 2010-12-29 01:25:07.836
!MESSAGE Missing required bundle org.eclipse.ocl_[3.0.0,4.0.0).

So it seems Teneo 1.2.0 (which actually uses the JAR version 1.1.2.v201011240719) requires at least Hibernate 3.6.
Since CDO 3.0 Hibernate Store only implements Hibernate 3.3.2 API, which means that it's impossible to use CDO 3.0 with Teneo 1.2.0, only with Teneo 1.1.2. (so Teneo wiki is correct, CDO wiki is wrong..?)

3 comments:

  1. Your card is just beautiful -- and what a lovely gift. Any woman would be thrilled to receive this.
    Thanks for you inspiration.


    Runescape Gold
    Buy diablo 3 gold

    ReplyDelete
  2. These traits symbolize the Gnomes are appropriate to the roles of a Mage, Rogue but can buy gw2 gold also play as a Warrior or Warlock.

    ReplyDelete
  3. Hence look for Guild Wars 2 Gold, for example, a little daughter lady, to become used by a grizzly from a refreshments. Many of Buy Diablo 3 Gold eliminating the bear, will be delighted Madame alarming and proceeds your ex eat outside. And all sorts of without diablo3bay.

    ReplyDelete