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..?)

9 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. Welcome to mmoggg website to buy WoW Gold Kaufen, offer a lot, of course, Diablo 3 Gold or Cheap Diablo 3 Gold and RS Gold, to be purchased at any time, at any time shipment, and look forward to your visit!

    ReplyDelete
  3. 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
  4. That is really cool. Thanks for finding it. Some really good ideas there, this is going to be a real time sink. I am a china tour lover,You can learn more: China tour operator | China tour packages | China city travel

    ReplyDelete
  5. 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
  6. Adobe Acrobat 9 Pro Download is the complete PDF solution for business and technical professionals.
    Microsoft Project 2010 Download has a shiny new interface, but that's not all. Under the hood, it contains powerful new scheduling, task management, and view improvements that give you greater control over how you manage and present your projects.
    Adobe Acrobat 9 Pro Extended Download provides advanced diagramming tools to help you simplify complexity with intuitive and professional-looking diagrams, dynamic and data-driven visuals, and new ways to share via a browser in real time.

    ReplyDelete
  7. I'm learning Chinese language because I believe it's the only way to really learn about China.When I was searching for a place to learn to speak Chinese, I called several schools. Hanbridge was the best because they had excellent teachers and a very friendly and welcoming spirit . I really appreciate the opportunity to learn here and would recommend Hanbridge to others.

    ReplyDelete
  8. Nice article, thanks for the information. It's very complete information. I will bookmark for next reference
    jaring futsal | jaring golf | jaring pengaman proyek |
    jaring pengaman bangunan | jaring pengaman gedung
    http://www.jual-jaring.blogspot.com/
    http://www.agen-jaring.blogspot.com/
    http://www.pancasamudera-safetynet.blogspot.com/
    http://www.toko-jaring.blogspot.com/
    http://www.pusat-jaring.blogspot.com/
    http://jualjaringpengaman.blogspot.com/
    https://pancasamudera.wordpress.com/
    https://pasangjaringfutsal.wordpress.com/
    https://jualtambangmurah.wordpress.com/
    https://tokojaring.wordpress.com/
    https://jualjaringfutsal.wordpress.com/
    https://jaringfutsal.wordpress.com/


    ReplyDelete