Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [CDO/Hibernate] Multiple issues
[CDO/Hibernate] Multiple issues [message #126218] Tue, 24 June 2008 11:36 Go to next message
Stefan Winkler is currently offline Stefan WinklerFriend
Messages: 307
Registered: July 2009
Location: Germany
Senior Member
Hi Eike, hi Martin,

after a few weeks, I'm back from vacation and switched back to work mode
this week.
First, let me give my congratulations for the graduation.

That said, I have persisting problems using CDO/Hibernate, some of which
I have a workaround (which is ok but not satisfying), for some I don't.

Here we go: (I updated to Ganymede (well, RC4 for now to be exact), and
thus to CDO 1.0.0)

Issue 1:
Is it intentional that CDO does not run out of the box when downloaded
binary as part of Ganymede?

=> Workaround: I have to copy the libraries to
eclipse\plugins\org.eclipse.emf.cdo.server.hibernate.librari es_1.0.0.v200806111412\lib


Issue 2:
When starting up, I get a

java.lang.NullPointerException
at
org.eclipse.core.internal.runtime.Activator.getURLConverter( Activator.java:313)
at org.eclipse.core.runtime.FileLocator.resolve(FileLocator.jav a:186)
at
org.eclipse.net4j.internal.util.om.OSGiBundle.getBaseURL(OSG iBundle.java:47)
at
org.eclipse.net4j.internal.util.bundle.AbstractBundle.getInp utStream(AbstractBundle.java:222)
at
org.eclipse.emf.cdo.server.internal.hibernate.HibernatePacka geHandler.initConfiguration(HibernatePackageHandler.java:391 )
at
org.eclipse.emf.cdo.server.internal.hibernate.HibernatePacka geHandler.doActivate(HibernatePackageHandler.java:364)
at
org.eclipse.net4j.util.lifecycle.Lifecycle.activate(Lifecycl e.java:53)
at
org.eclipse.emf.cdo.server.internal.hibernate.HibernateStore .doActivate(HibernateStore.java:197)
at
org.eclipse.net4j.util.lifecycle.Lifecycle.activate(Lifecycl e.java:53)
at
org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(Life cycleUtil.java:69)
at
org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(Life cycleUtil.java:59)
at
org.eclipse.emf.cdo.internal.server.Repository.activateRepos itory(Repository.java:262)
at
org.eclipse.emf.cdo.internal.server.Repository.doActivate(Re pository.java:250)
at
org.eclipse.net4j.util.lifecycle.Lifecycle.activate(Lifecycl e.java:53)
at
org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(Life cycleUtil.java:69)
at
org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(Life cycleUtil.java:59)
at
org.eclipse.emf.cdo.server.CDOServerUtil.addRepository(CDOSe rverUtil.java:67)
at test.cdo.classpath.Activator.getSession(Activator.java:84)
at test.cdo.classpath.Activator.getTransaction(Activator.java:1 03)
at test.cdo.classpath.Activator.getResource(Activator.java:113)
at test.cdo.classpath.ClasspathTest.testClasspath(ClasspathTest .java:9)

because at
org.eclipse.net4j.internal.util.om.OSGiBundle.getBaseURL(OSG iBundle.java:47)

URL entry = getBundleContext().getBundle().getEntry(".");
//$NON-NLS-1$

getEntry(".") returns null ...

=> Workaround: Imprt the Plug-In as source into the workspace

Net4j util seems to not like CDO as JAR bundles...


Issue 3:

org.hibernate.MappingException: entity class not found:
org.eclipse.emf.cdo.internal.protocol.model.CDOModelElementI mpl
at
org.hibernate.mapping.PersistentClass.getMappedClass(Persist entClass.java:99)
at
org.hibernate.tuple.PropertyFactory.getGetter(PropertyFactor y.java:168)
at
org.hibernate.tuple.PropertyFactory.buildIdentifierProperty( PropertyFactory.java:44)
at
org.hibernate.tuple.entity.EntityMetamodel.<init>(EntityMetamodel.java:124)
at
org.hibernate.persister.entity.AbstractEntityPersister.<init >(AbstractEntityPersister.java:434)
at
org.hibernate.persister.entity.JoinedSubclassEntityPersister . <init>(JoinedSubclassEntityPersister.java:91)
at
org.hibernate.persister.PersisterFactory.createClassPersiste r(PersisterFactory.java:58)
at
org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:226)
at
org.hibernate.cfg.Configuration.buildSessionFactory(Configur ation.java:1300)
at
org.eclipse.emf.cdo.server.internal.hibernate.HibernatePacka geHandler.getSessionFactory(HibernatePackageHandler.java:334 )
at
org.eclipse.emf.cdo.server.internal.hibernate.HibernatePacka geHandler.readPackageInfos(HibernatePackageHandler.java:292)
at
org.eclipse.emf.cdo.server.internal.hibernate.HibernatePacka geHandler.getCDOPackageInfos(HibernatePackageHandler.java:21 4)
at
org.eclipse.emf.cdo.server.internal.hibernate.HibernateStore Reader.readPackageInfos(HibernateStoreReader.java:79)
at
org.eclipse.emf.cdo.internal.server.PackageManager.doActivat e(PackageManager.java:72)
at
org.eclipse.net4j.util.lifecycle.Lifecycle.activate(Lifecycl e.java:53)
at
org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(Life cycleUtil.java:69)
at
org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(Life cycleUtil.java:59)
at
org.eclipse.emf.cdo.internal.server.Repository.activateRepos itory(Repository.java:263)
at
org.eclipse.emf.cdo.internal.server.Repository.doActivate(Re pository.java:250)
at
org.eclipse.net4j.util.lifecycle.Lifecycle.activate(Lifecycl e.java:53)
at
org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(Life cycleUtil.java:69)
at
org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(Life cycleUtil.java:59)
at
org.eclipse.emf.cdo.server.CDOServerUtil.addRepository(CDOSe rverUtil.java:67)
at test.cdo.classpath.Activator.getSession(Activator.java:84)
at test.cdo.classpath.Activator.getTransaction(Activator.java:1 03)
at test.cdo.classpath.Activator.getResource(Activator.java:113)
at test.cdo.classpath.ClasspathTest.testClasspath(ClasspathTest .java:9)

Refactoring problem?

meta.hbm.xml reads
<hibernate-mapping package="org.eclipse.emf.cdo.internal.protocol.model">
but should be
<hibernate-mapping package="org.eclipse.emf.cdo.internal.common.model">
now?

=> Workaround: edit meta.hbm.xml (as described) -
org.eclipse.emf.cdo.server.hibernate has been copied into workspace
alreday (see issue 2)


Issue 4:

org.hibernate.MappingException: entity class not found:
org.eclipse.emf.cdo.internal.common.model.CDOClassProxy

This class seems not to exist any more ...

=> no workaround! => STOPPER

Eike, Martin - can you please provide a working meta.hbm.xml file, so I
can continue with 1.0?


--- for now I'm comtinuing with my issues I have with 0.8.0 (as of end
of June) and which I suspect to be in 1.0.0 still:

Issue 5:

When calling getOrCreateResource() in a plugin activator's start()
method, I run into a deadlock.

=> Workaround: always do resource initialization lazyly


Issue 6:

EPackages only containing interfaces are not being taken by the package
manager -> ClassRefs can not be resolved (see Bugzilla – Bug 230387)

=> Workaround: introduce Dummy class in the package in question and
store one Dummy instance in the Database


Issue 7:

With all of these workarounds, I get to store and read my models in one
session alright.
However, when I close my application and reopen it, initialization fails
consistently when trying to get the contents of a resource:
getResource("/test").getContents() seems to not initialize the thread
context variables on the server:

[...]
24.06.2008 13:32:40 org.hibernate.tool.hbm2ddl.SchemaUpdate execute
INFO: schema update complete
Thread-4 [debug] Setting session in threadlocal
Thread-4 [debug.revision] Setting version for
CDOResource@HBM-CDOResource-1v0: v1
Thread-4 [debug] Stored hb list in threadlocal: CDOResource.contents
Thread-4 [debug.session] Registering resource: HBM-CDOResource-1 <-->
/my/test/resource
Thread-4 [debug.protocol] Writing ID: HBM-CDOResource-1
Thread-4 [debug.model] Writing CDOID of type 1 (OBJECT)
Thread-4 [debug] Multiplexing 00 00 00 00 00 00 00 03 01 00 00 00 01 00
00 00 00 00 00 00 01 01 00 0b 43 44 4f 52 65 73 6f 75 72 63 65 00
Thread-4 [debug] Releasing hibernate session
main [debug.model] Reading CDOID of type 1 (OBJECT)
Thread-4 [debug] Clearing session in threadlocal
Thread-4 [debug] Removing hibernate session
Thread-4 [debug] Closing hibernate session
main [debug.protocol] Read ID: HBM-CDOResource-1
[INFO] Legacy system not available
main [debug.object] Setting ID: HBM-CDOResource-1
main [debug.object] Setting view: CDOTransaction(1)
main [debug.object] Setting state PROXY for CDOResource@HBM-CDOResource-1
main [debug.object] PREPARE: CDOResource@HBM-CDOResource-1 -->
CDOTransaction(1)
main [debug.protocol] Writing path: /my/test/resource
main [debug] Multiplexing 00 00 00 00 00 00 00 05 00 04 01 00 11 2f 6d
79 2f 74 65 73 74 2f 72 65 73 6f 75 72 63 65 00
Thread-4 [debug] Created
org.eclipse.emf.cdo.server.internal.hibernate.HibernateStore Reader for
repository repo1
Thread-4 [debug] Created
org.eclipse.emf.cdo.server.internal.hibernate.HibernateStore Reader for
repository repo1
Thread-4 [debug.protocol] Read path: /my/test/resource
Thread-4 [debug.protocol] Writing ID: HBM-CDOResource-1
Thread-4 [debug.model] Writing CDOID of type 1 (OBJECT)
Thread-4 [debug] Multiplexing 00 00 00 00 00 00 00 04 01 00 00 00 01 00
00 00 00 00 00 00 01 01 00 0b 43 44 4f 52 65 73 6f 75 72 63 65 00
main [debug.model] Reading CDOID of type 1 (OBJECT)
main [debug.protocol] Read ID: HBM-CDOResource-1
main [debug.object] Setting ID: HBM-CDOResource-1
main [debug.object] Setting view: CDOTransaction(1)
Thread-4 [debug] Releasing hibernate session
main [debug.view] Registering CDOResource@HBM-CDOResource-1
Thread-4 [debug] Clearing session in threadlocal
Thread-4 [debug] Removing hibernate session
main [debug.object] ATTACH: CDOResource@HBM-CDOResource-1 -->
CDOTransaction(1)
main [debug.object] size(CDOResource@HBM-CDOResource-1, CDOFeature(ID=2,
name=contents, type=OBJECT, referenceType=CDOClass(ID=0, name=CDOObject)))
main [debug.object] READ: org.eclipse.emf.cdo.eresource.impl.CDOResourceImpl
main [debug.protocol] Writing referenceChunk: -1
main [debug.protocol] Writing 1 IDs
main [debug.protocol] Writing ID: HBM-CDOResource-1
main [debug.model] Writing CDOID of type 1 (OBJECT)
main [debug] Multiplexing 00 00 00 00 00 00 00 06 00 07 00 00 00 00 00
00 00 01 01 00 00 00 01 00 00 00 00 00 00 00 01 01 00 0b 43 44 4f 52 65
73 6f 75 72 63 65 00 00 00 00 00
main [debug.protocol] Reading 1 revisions
Thread-4 [debug] Created
org.eclipse.emf.cdo.server.internal.hibernate.HibernateStore Reader for
repository repo1
Thread-4 [debug] Created
org.eclipse.emf.cdo.server.internal.hibernate.HibernateStore Reader for
repository repo1
Thread-4 [debug.protocol] Read referenceChunk: -1
Thread-4 [debug.protocol] Reading 1 IDs
Thread-4 [debug.model] Reading CDOID of type 1 (OBJECT)
Thread-4 [debug.protocol] Read ID: HBM-CDOResource-1
Thread-4 [debug.protocol] Writing 1 revisions
Thread-4 [debug] Releasing hibernate session
Thread-4 [debug] Clearing session in threadlocal
Thread-4 [debug] Removing hibernate session
[ERROR] CommitContext not set
java.lang.IllegalStateException: CommitContext not set
at
org.eclipse.emf.cdo.server.internal.hibernate.HibernateThrea dContext.getCommitContext(HibernateThreadContext.java:69)
at
org.eclipse.emf.cdo.server.internal.hibernate.HibernateUtil. getCDORevision(HibernateUtil.java:117)
at
org.eclipse.emf.cdo.server.internal.hibernate.HibernateStore Reader.readRevision(HibernateStoreReader.java:155)
at
org.eclipse.emf.cdo.internal.server.RevisionManager.loadRevi sion(RevisionManager.java:210)
at
org.eclipse.emf.cdo.internal.protocol.revision.CDORevisionRe solverImpl.getRevision(CDORevisionResolverImpl.java:282)
at
org.eclipse.emf.cdo.internal.protocol.revision.CDORevisionRe solverImpl.getRevision(CDORevisionResolverImpl.java:144)
at
org.eclipse.emf.cdo.internal.server.protocol.LoadRevisionInd ication.getRevision(LoadRevisionIndication.java:171)
at
org.eclipse.emf.cdo.internal.server.protocol.LoadRevisionInd ication.responding(LoadRevisionIndication.java:147)
at
org.eclipse.net4j.signal.IndicationWithResponse.execute(Indi cationWithResponse.java:54)
at
org.eclipse.emf.cdo.internal.server.protocol.CDOReadIndicati on.execute(CDOReadIndication.java:38)
at org.eclipse.net4j.signal.Signal.runSync(Signal.java:143)
at org.eclipse.net4j.signal.Signal.run(Signal.java:124)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unkno wn
Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

=> no workaround => STOPPER!


Should I open bugs for these issues?
Can you provide quick fixes to my two stoppers?


Cheers,
Stefan
Re: [CDO/Hibernate] Multiple issues [message #126233 is a reply to message #126218] Tue, 24 June 2008 12:34 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Stefan,
Sorry to hear that you have all these issues.
Regarding issue 3 and 4, I checked this in cvs on the 15th of june. So this should be solved in the
next build, or can you cvs?
I also solved another issue related to cdopackage persistence. So maybe this is related to one of
your other issues....

btw, I cross-posted to the emf newsgroup because cdo is graduating/has graduated.

gr. Martin

Stefan Winkler wrote:
> Hi Eike, hi Martin,
>
> after a few weeks, I'm back from vacation and switched back to work mode
> this week.
> First, let me give my congratulations for the graduation.
>
> That said, I have persisting problems using CDO/Hibernate, some of which
> I have a workaround (which is ok but not satisfying), for some I don't.
>
> Here we go: (I updated to Ganymede (well, RC4 for now to be exact), and
> thus to CDO 1.0.0)
>
> Issue 1:
> Is it intentional that CDO does not run out of the box when downloaded
> binary as part of Ganymede?
>
> => Workaround: I have to copy the libraries to
> eclipse\plugins\org.eclipse.emf.cdo.server.hibernate.librari es_1.0.0.v200806111412\lib
>
>
>
> Issue 2:
> When starting up, I get a
>
> java.lang.NullPointerException
> at
> org.eclipse.core.internal.runtime.Activator.getURLConverter( Activator.java:313)
>
> at org.eclipse.core.runtime.FileLocator.resolve(FileLocator.jav a:186)
> at
> org.eclipse.net4j.internal.util.om.OSGiBundle.getBaseURL(OSG iBundle.java:47)
>
> at
> org.eclipse.net4j.internal.util.bundle.AbstractBundle.getInp utStream(AbstractBundle.java:222)
>
> at
> org.eclipse.emf.cdo.server.internal.hibernate.HibernatePacka geHandler.initConfiguration(HibernatePackageHandler.java:391 )
>
> at
> org.eclipse.emf.cdo.server.internal.hibernate.HibernatePacka geHandler.doActivate(HibernatePackageHandler.java:364)
>
> at
> org.eclipse.net4j.util.lifecycle.Lifecycle.activate(Lifecycl e.java:53)
> at
> org.eclipse.emf.cdo.server.internal.hibernate.HibernateStore .doActivate(HibernateStore.java:197)
>
> at
> org.eclipse.net4j.util.lifecycle.Lifecycle.activate(Lifecycl e.java:53)
> at
> org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(Life cycleUtil.java:69)
>
> at
> org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(Life cycleUtil.java:59)
>
> at
> org.eclipse.emf.cdo.internal.server.Repository.activateRepos itory(Repository.java:262)
>
> at
> org.eclipse.emf.cdo.internal.server.Repository.doActivate(Re pository.java:250)
>
> at
> org.eclipse.net4j.util.lifecycle.Lifecycle.activate(Lifecycl e.java:53)
> at
> org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(Life cycleUtil.java:69)
>
> at
> org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(Life cycleUtil.java:59)
>
> at
> org.eclipse.emf.cdo.server.CDOServerUtil.addRepository(CDOSe rverUtil.java:67)
>
> at test.cdo.classpath.Activator.getSession(Activator.java:84)
> at test.cdo.classpath.Activator.getTransaction(Activator.java:1 03)
> at test.cdo.classpath.Activator.getResource(Activator.java:113)
> at test.cdo.classpath.ClasspathTest.testClasspath(ClasspathTest .java:9)
>
> because at
> org.eclipse.net4j.internal.util.om.OSGiBundle.getBaseURL(OSG iBundle.java:47)
>
>
> URL entry = getBundleContext().getBundle().getEntry(".");
> //$NON-NLS-1$
>
> getEntry(".") returns null ...
>
> => Workaround: Imprt the Plug-In as source into the workspace
>
> Net4j util seems to not like CDO as JAR bundles...
>
>
> Issue 3:
>
> org.hibernate.MappingException: entity class not found:
> org.eclipse.emf.cdo.internal.protocol.model.CDOModelElementI mpl
> at
> org.hibernate.mapping.PersistentClass.getMappedClass(Persist entClass.java:99)
>
> at
> org.hibernate.tuple.PropertyFactory.getGetter(PropertyFactor y.java:168)
> at
> org.hibernate.tuple.PropertyFactory.buildIdentifierProperty( PropertyFactory.java:44)
>
> at
> org.hibernate.tuple.entity.EntityMetamodel.<init>(EntityMetamodel.java:124)
> at
> org.hibernate.persister.entity.AbstractEntityPersister.<init >(AbstractEntityPersister.java:434)
>
> at
> org.hibernate.persister.entity.JoinedSubclassEntityPersister . <init>(JoinedSubclassEntityPersister.java:91)
>
> at
> org.hibernate.persister.PersisterFactory.createClassPersiste r(PersisterFactory.java:58)
>
> at
> org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:226)
> at
> org.hibernate.cfg.Configuration.buildSessionFactory(Configur ation.java:1300)
>
> at
> org.eclipse.emf.cdo.server.internal.hibernate.HibernatePacka geHandler.getSessionFactory(HibernatePackageHandler.java:334 )
>
> at
> org.eclipse.emf.cdo.server.internal.hibernate.HibernatePacka geHandler.readPackageInfos(HibernatePackageHandler.java:292)
>
> at
> org.eclipse.emf.cdo.server.internal.hibernate.HibernatePacka geHandler.getCDOPackageInfos(HibernatePackageHandler.java:21 4)
>
> at
> org.eclipse.emf.cdo.server.internal.hibernate.HibernateStore Reader.readPackageInfos(HibernateStoreReader.java:79)
>
> at
> org.eclipse.emf.cdo.internal.server.PackageManager.doActivat e(PackageManager.java:72)
>
> at
> org.eclipse.net4j.util.lifecycle.Lifecycle.activate(Lifecycl e.java:53)
> at
> org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(Life cycleUtil.java:69)
>
> at
> org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(Life cycleUtil.java:59)
>
> at
> org.eclipse.emf.cdo.internal.server.Repository.activateRepos itory(Repository.java:263)
>
> at
> org.eclipse.emf.cdo.internal.server.Repository.doActivate(Re pository.java:250)
>
> at
> org.eclipse.net4j.util.lifecycle.Lifecycle.activate(Lifecycl e.java:53)
> at
> org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(Life cycleUtil.java:69)
>
> at
> org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(Life cycleUtil.java:59)
>
> at
> org.eclipse.emf.cdo.server.CDOServerUtil.addRepository(CDOSe rverUtil.java:67)
>
> at test.cdo.classpath.Activator.getSession(Activator.java:84)
> at test.cdo.classpath.Activator.getTransaction(Activator.java:1 03)
> at test.cdo.classpath.Activator.getResource(Activator.java:113)
> at test.cdo.classpath.ClasspathTest.testClasspath(ClasspathTest .java:9)
>
> Refactoring problem?
>
> meta.hbm.xml reads
> <hibernate-mapping package="org.eclipse.emf.cdo.internal.protocol.model">
> but should be
> <hibernate-mapping package="org.eclipse.emf.cdo.internal.common.model">
> now?
>
> => Workaround: edit meta.hbm.xml (as described) -
> org.eclipse.emf.cdo.server.hibernate has been copied into workspace
> alreday (see issue 2)
>
>
> Issue 4:
>
> org.hibernate.MappingException: entity class not found:
> org.eclipse.emf.cdo.internal.common.model.CDOClassProxy
>
> This class seems not to exist any more ...
>
> => no workaround! => STOPPER
>
> Eike, Martin - can you please provide a working meta.hbm.xml file, so I
> can continue with 1.0?
>
>
> --- for now I'm comtinuing with my issues I have with 0.8.0 (as of end
> of June) and which I suspect to be in 1.0.0 still:
>
> Issue 5:
>
> When calling getOrCreateResource() in a plugin activator's start()
> method, I run into a deadlock.
>
> => Workaround: always do resource initialization lazyly
>
>
> Issue 6:
>
> EPackages only containing interfaces are not being taken by the package
> manager -> ClassRefs can not be resolved (see Bugzilla – Bug 230387)
>
> => Workaround: introduce Dummy class in the package in question and
> store one Dummy instance in the Database
>
>
> Issue 7:
>
> With all of these workarounds, I get to store and read my models in one
> session alright.
> However, when I close my application and reopen it, initialization fails
> consistently when trying to get the contents of a resource:
> getResource("/test").getContents() seems to not initialize the thread
> context variables on the server:
>
> [...]
> 24.06.2008 13:32:40 org.hibernate.tool.hbm2ddl.SchemaUpdate execute
> INFO: schema update complete
> Thread-4 [debug] Setting session in threadlocal
> Thread-4 [debug.revision] Setting version for
> CDOResource@HBM-CDOResource-1v0: v1
> Thread-4 [debug] Stored hb list in threadlocal: CDOResource.contents
> Thread-4 [debug.session] Registering resource: HBM-CDOResource-1 <-->
> /my/test/resource
> Thread-4 [debug.protocol] Writing ID: HBM-CDOResource-1
> Thread-4 [debug.model] Writing CDOID of type 1 (OBJECT)
> Thread-4 [debug] Multiplexing 00 00 00 00 00 00 00 03 01 00 00 00 01 00
> 00 00 00 00 00 00 01 01 00 0b 43 44 4f 52 65 73 6f 75 72 63 65 00
> Thread-4 [debug] Releasing hibernate session
> main [debug.model] Reading CDOID of type 1 (OBJECT)
> Thread-4 [debug] Clearing session in threadlocal
> Thread-4 [debug] Removing hibernate session
> Thread-4 [debug] Closing hibernate session
> main [debug.protocol] Read ID: HBM-CDOResource-1
> [INFO] Legacy system not available
> main [debug.object] Setting ID: HBM-CDOResource-1
> main [debug.object] Setting view: CDOTransaction(1)
> main [debug.object] Setting state PROXY for CDOResource@HBM-CDOResource-1
> main [debug.object] PREPARE: CDOResource@HBM-CDOResource-1 -->
> CDOTransaction(1)
> main [debug.protocol] Writing path: /my/test/resource
> main [debug] Multiplexing 00 00 00 00 00 00 00 05 00 04 01 00 11 2f 6d
> 79 2f 74 65 73 74 2f 72 65 73 6f 75 72 63 65 00
> Thread-4 [debug] Created
> org.eclipse.emf.cdo.server.internal.hibernate.HibernateStore Reader for
> repository repo1
> Thread-4 [debug] Created
> org.eclipse.emf.cdo.server.internal.hibernate.HibernateStore Reader for
> repository repo1
> Thread-4 [debug.protocol] Read path: /my/test/resource
> Thread-4 [debug.protocol] Writing ID: HBM-CDOResource-1
> Thread-4 [debug.model] Writing CDOID of type 1 (OBJECT)
> Thread-4 [debug] Multiplexing 00 00 00 00 00 00 00 04 01 00 00 00 01 00
> 00 00 00 00 00 00 01 01 00 0b 43 44 4f 52 65 73 6f 75 72 63 65 00
> main [debug.model] Reading CDOID of type 1 (OBJECT)
> main [debug.protocol] Read ID: HBM-CDOResource-1
> main [debug.object] Setting ID: HBM-CDOResource-1
> main [debug.object] Setting view: CDOTransaction(1)
> Thread-4 [debug] Releasing hibernate session
> main [debug.view] Registering CDOResource@HBM-CDOResource-1
> Thread-4 [debug] Clearing session in threadlocal
> Thread-4 [debug] Removing hibernate session
> main [debug.object] ATTACH: CDOResource@HBM-CDOResource-1 -->
> CDOTransaction(1)
> main [debug.object] size(CDOResource@HBM-CDOResource-1, CDOFeature(ID=2,
> name=contents, type=OBJECT, referenceType=CDOClass(ID=0, name=CDOObject)))
> main [debug.object] READ:
> org.eclipse.emf.cdo.eresource.impl.CDOResourceImpl
> main [debug.protocol] Writing referenceChunk: -1
> main [debug.protocol] Writing 1 IDs
> main [debug.protocol] Writing ID: HBM-CDOResource-1
> main [debug.model] Writing CDOID of type 1 (OBJECT)
> main [debug] Multiplexing 00 00 00 00 00 00 00 06 00 07 00 00 00 00 00
> 00 00 01 01 00 00 00 01 00 00 00 00 00 00 00 01 01 00 0b 43 44 4f 52 65
> 73 6f 75 72 63 65 00 00 00 00 00
> main [debug.protocol] Reading 1 revisions
> Thread-4 [debug] Created
> org.eclipse.emf.cdo.server.internal.hibernate.HibernateStore Reader for
> repository repo1
> Thread-4 [debug] Created
> org.eclipse.emf.cdo.server.internal.hibernate.HibernateStore Reader for
> repository repo1
> Thread-4 [debug.protocol] Read referenceChunk: -1
> Thread-4 [debug.protocol] Reading 1 IDs
> Thread-4 [debug.model] Reading CDOID of type 1 (OBJECT)
> Thread-4 [debug.protocol] Read ID: HBM-CDOResource-1
> Thread-4 [debug.protocol] Writing 1 revisions
> Thread-4 [debug] Releasing hibernate session
> Thread-4 [debug] Clearing session in threadlocal
> Thread-4 [debug] Removing hibernate session
> [ERROR] CommitContext not set
> java.lang.IllegalStateException: CommitContext not set
> at
> org.eclipse.emf.cdo.server.internal.hibernate.HibernateThrea dContext.getCommitContext(HibernateThreadContext.java:69)
>
> at
> org.eclipse.emf.cdo.server.internal.hibernate.HibernateUtil. getCDORevision(HibernateUtil.java:117)
>
> at
> org.eclipse.emf.cdo.server.internal.hibernate.HibernateStore Reader.readRevision(HibernateStoreReader.java:155)
>
> at
> org.eclipse.emf.cdo.internal.server.RevisionManager.loadRevi sion(RevisionManager.java:210)
>
> at
> org.eclipse.emf.cdo.internal.protocol.revision.CDORevisionRe solverImpl.getRevision(CDORevisionResolverImpl.java:282)
>
> at
> org.eclipse.emf.cdo.internal.protocol.revision.CDORevisionRe solverImpl.getRevision(CDORevisionResolverImpl.java:144)
>
> at
> org.eclipse.emf.cdo.internal.server.protocol.LoadRevisionInd ication.getRevision(LoadRevisionIndication.java:171)
>
> at
> org.eclipse.emf.cdo.internal.server.protocol.LoadRevisionInd ication.responding(LoadRevisionIndication.java:147)
>
> at
> org.eclipse.net4j.signal.IndicationWithResponse.execute(Indi cationWithResponse.java:54)
>
> at
> org.eclipse.emf.cdo.internal.server.protocol.CDOReadIndicati on.execute(CDOReadIndication.java:38)
>
> at org.eclipse.net4j.signal.Signal.runSync(Signal.java:143)
> at org.eclipse.net4j.signal.Signal.run(Signal.java:124)
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unkno wn
> Source)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
> at java.lang.Thread.run(Unknown Source)
>
> => no workaround => STOPPER!
>
>
> Should I open bugs for these issues?
> Can you provide quick fixes to my two stoppers?
>
>
> Cheers,
> Stefan


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: [CDO/Hibernate] Multiple issues [message #619297 is a reply to message #126218] Tue, 24 June 2008 12:34 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Stefan,
Sorry to hear that you have all these issues.
Regarding issue 3 and 4, I checked this in cvs on the 15th of june. So this should be solved in the
next build, or can you cvs?
I also solved another issue related to cdopackage persistence. So maybe this is related to one of
your other issues....

btw, I cross-posted to the emf newsgroup because cdo is graduating/has graduated.

gr. Martin

Stefan Winkler wrote:
> Hi Eike, hi Martin,
>
> after a few weeks, I'm back from vacation and switched back to work mode
> this week.
> First, let me give my congratulations for the graduation.
>
> That said, I have persisting problems using CDO/Hibernate, some of which
> I have a workaround (which is ok but not satisfying), for some I don't.
>
> Here we go: (I updated to Ganymede (well, RC4 for now to be exact), and
> thus to CDO 1.0.0)
>
> Issue 1:
> Is it intentional that CDO does not run out of the box when downloaded
> binary as part of Ganymede?
>
> => Workaround: I have to copy the libraries to
> eclipse\plugins\org.eclipse.emf.cdo.server.hibernate.librari es_1.0.0.v200806111412\lib
>
>
>
> Issue 2:
> When starting up, I get a
>
> java.lang.NullPointerException
> at
> org.eclipse.core.internal.runtime.Activator.getURLConverter( Activator.java:313)
>
> at org.eclipse.core.runtime.FileLocator.resolve(FileLocator.jav a:186)
> at
> org.eclipse.net4j.internal.util.om.OSGiBundle.getBaseURL(OSG iBundle.java:47)
>
> at
> org.eclipse.net4j.internal.util.bundle.AbstractBundle.getInp utStream(AbstractBundle.java:222)
>
> at
> org.eclipse.emf.cdo.server.internal.hibernate.HibernatePacka geHandler.initConfiguration(HibernatePackageHandler.java:391 )
>
> at
> org.eclipse.emf.cdo.server.internal.hibernate.HibernatePacka geHandler.doActivate(HibernatePackageHandler.java:364)
>
> at
> org.eclipse.net4j.util.lifecycle.Lifecycle.activate(Lifecycl e.java:53)
> at
> org.eclipse.emf.cdo.server.internal.hibernate.HibernateStore .doActivate(HibernateStore.java:197)
>
> at
> org.eclipse.net4j.util.lifecycle.Lifecycle.activate(Lifecycl e.java:53)
> at
> org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(Life cycleUtil.java:69)
>
> at
> org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(Life cycleUtil.java:59)
>
> at
> org.eclipse.emf.cdo.internal.server.Repository.activateRepos itory(Repository.java:262)
>
> at
> org.eclipse.emf.cdo.internal.server.Repository.doActivate(Re pository.java:250)
>
> at
> org.eclipse.net4j.util.lifecycle.Lifecycle.activate(Lifecycl e.java:53)
> at
> org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(Life cycleUtil.java:69)
>
> at
> org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(Life cycleUtil.java:59)
>
> at
> org.eclipse.emf.cdo.server.CDOServerUtil.addRepository(CDOSe rverUtil.java:67)
>
> at test.cdo.classpath.Activator.getSession(Activator.java:84)
> at test.cdo.classpath.Activator.getTransaction(Activator.java:1 03)
> at test.cdo.classpath.Activator.getResource(Activator.java:113)
> at test.cdo.classpath.ClasspathTest.testClasspath(ClasspathTest .java:9)
>
> because at
> org.eclipse.net4j.internal.util.om.OSGiBundle.getBaseURL(OSG iBundle.java:47)
>
>
> URL entry = getBundleContext().getBundle().getEntry(".");
> //$NON-NLS-1$
>
> getEntry(".") returns null ...
>
> => Workaround: Imprt the Plug-In as source into the workspace
>
> Net4j util seems to not like CDO as JAR bundles...
>
>
> Issue 3:
>
> org.hibernate.MappingException: entity class not found:
> org.eclipse.emf.cdo.internal.protocol.model.CDOModelElementI mpl
> at
> org.hibernate.mapping.PersistentClass.getMappedClass(Persist entClass.java:99)
>
> at
> org.hibernate.tuple.PropertyFactory.getGetter(PropertyFactor y.java:168)
> at
> org.hibernate.tuple.PropertyFactory.buildIdentifierProperty( PropertyFactory.java:44)
>
> at
> org.hibernate.tuple.entity.EntityMetamodel.<init>(EntityMetamodel.java:124)
> at
> org.hibernate.persister.entity.AbstractEntityPersister.<init >(AbstractEntityPersister.java:434)
>
> at
> org.hibernate.persister.entity.JoinedSubclassEntityPersister . <init>(JoinedSubclassEntityPersister.java:91)
>
> at
> org.hibernate.persister.PersisterFactory.createClassPersiste r(PersisterFactory.java:58)
>
> at
> org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:226)
> at
> org.hibernate.cfg.Configuration.buildSessionFactory(Configur ation.java:1300)
>
> at
> org.eclipse.emf.cdo.server.internal.hibernate.HibernatePacka geHandler.getSessionFactory(HibernatePackageHandler.java:334 )
>
> at
> org.eclipse.emf.cdo.server.internal.hibernate.HibernatePacka geHandler.readPackageInfos(HibernatePackageHandler.java:292)
>
> at
> org.eclipse.emf.cdo.server.internal.hibernate.HibernatePacka geHandler.getCDOPackageInfos(HibernatePackageHandler.java:21 4)
>
> at
> org.eclipse.emf.cdo.server.internal.hibernate.HibernateStore Reader.readPackageInfos(HibernateStoreReader.java:79)
>
> at
> org.eclipse.emf.cdo.internal.server.PackageManager.doActivat e(PackageManager.java:72)
>
> at
> org.eclipse.net4j.util.lifecycle.Lifecycle.activate(Lifecycl e.java:53)
> at
> org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(Life cycleUtil.java:69)
>
> at
> org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(Life cycleUtil.java:59)
>
> at
> org.eclipse.emf.cdo.internal.server.Repository.activateRepos itory(Repository.java:263)
>
> at
> org.eclipse.emf.cdo.internal.server.Repository.doActivate(Re pository.java:250)
>
> at
> org.eclipse.net4j.util.lifecycle.Lifecycle.activate(Lifecycl e.java:53)
> at
> org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(Life cycleUtil.java:69)
>
> at
> org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(Life cycleUtil.java:59)
>
> at
> org.eclipse.emf.cdo.server.CDOServerUtil.addRepository(CDOSe rverUtil.java:67)
>
> at test.cdo.classpath.Activator.getSession(Activator.java:84)
> at test.cdo.classpath.Activator.getTransaction(Activator.java:1 03)
> at test.cdo.classpath.Activator.getResource(Activator.java:113)
> at test.cdo.classpath.ClasspathTest.testClasspath(ClasspathTest .java:9)
>
> Refactoring problem?
>
> meta.hbm.xml reads
> <hibernate-mapping package="org.eclipse.emf.cdo.internal.protocol.model">
> but should be
> <hibernate-mapping package="org.eclipse.emf.cdo.internal.common.model">
> now?
>
> => Workaround: edit meta.hbm.xml (as described) -
> org.eclipse.emf.cdo.server.hibernate has been copied into workspace
> alreday (see issue 2)
>
>
> Issue 4:
>
> org.hibernate.MappingException: entity class not found:
> org.eclipse.emf.cdo.internal.common.model.CDOClassProxy
>
> This class seems not to exist any more ...
>
> => no workaround! => STOPPER
>
> Eike, Martin - can you please provide a working meta.hbm.xml file, so I
> can continue with 1.0?
>
>
> --- for now I'm comtinuing with my issues I have with 0.8.0 (as of end
> of June) and which I suspect to be in 1.0.0 still:
>
> Issue 5:
>
> When calling getOrCreateResource() in a plugin activator's start()
> method, I run into a deadlock.
>
> => Workaround: always do resource initialization lazyly
>
>
> Issue 6:
>
> EPackages only containing interfaces are not being taken by the package
> manager -> ClassRefs can not be resolved (see Bugzilla – Bug 230387)
>
> => Workaround: introduce Dummy class in the package in question and
> store one Dummy instance in the Database
>
>
> Issue 7:
>
> With all of these workarounds, I get to store and read my models in one
> session alright.
> However, when I close my application and reopen it, initialization fails
> consistently when trying to get the contents of a resource:
> getResource("/test").getContents() seems to not initialize the thread
> context variables on the server:
>
> [...]
> 24.06.2008 13:32:40 org.hibernate.tool.hbm2ddl.SchemaUpdate execute
> INFO: schema update complete
> Thread-4 [debug] Setting session in threadlocal
> Thread-4 [debug.revision] Setting version for
> CDOResource@HBM-CDOResource-1v0: v1
> Thread-4 [debug] Stored hb list in threadlocal: CDOResource.contents
> Thread-4 [debug.session] Registering resource: HBM-CDOResource-1 <-->
> /my/test/resource
> Thread-4 [debug.protocol] Writing ID: HBM-CDOResource-1
> Thread-4 [debug.model] Writing CDOID of type 1 (OBJECT)
> Thread-4 [debug] Multiplexing 00 00 00 00 00 00 00 03 01 00 00 00 01 00
> 00 00 00 00 00 00 01 01 00 0b 43 44 4f 52 65 73 6f 75 72 63 65 00
> Thread-4 [debug] Releasing hibernate session
> main [debug.model] Reading CDOID of type 1 (OBJECT)
> Thread-4 [debug] Clearing session in threadlocal
> Thread-4 [debug] Removing hibernate session
> Thread-4 [debug] Closing hibernate session
> main [debug.protocol] Read ID: HBM-CDOResource-1
> [INFO] Legacy system not available
> main [debug.object] Setting ID: HBM-CDOResource-1
> main [debug.object] Setting view: CDOTransaction(1)
> main [debug.object] Setting state PROXY for CDOResource@HBM-CDOResource-1
> main [debug.object] PREPARE: CDOResource@HBM-CDOResource-1 -->
> CDOTransaction(1)
> main [debug.protocol] Writing path: /my/test/resource
> main [debug] Multiplexing 00 00 00 00 00 00 00 05 00 04 01 00 11 2f 6d
> 79 2f 74 65 73 74 2f 72 65 73 6f 75 72 63 65 00
> Thread-4 [debug] Created
> org.eclipse.emf.cdo.server.internal.hibernate.HibernateStore Reader for
> repository repo1
> Thread-4 [debug] Created
> org.eclipse.emf.cdo.server.internal.hibernate.HibernateStore Reader for
> repository repo1
> Thread-4 [debug.protocol] Read path: /my/test/resource
> Thread-4 [debug.protocol] Writing ID: HBM-CDOResource-1
> Thread-4 [debug.model] Writing CDOID of type 1 (OBJECT)
> Thread-4 [debug] Multiplexing 00 00 00 00 00 00 00 04 01 00 00 00 01 00
> 00 00 00 00 00 00 01 01 00 0b 43 44 4f 52 65 73 6f 75 72 63 65 00
> main [debug.model] Reading CDOID of type 1 (OBJECT)
> main [debug.protocol] Read ID: HBM-CDOResource-1
> main [debug.object] Setting ID: HBM-CDOResource-1
> main [debug.object] Setting view: CDOTransaction(1)
> Thread-4 [debug] Releasing hibernate session
> main [debug.view] Registering CDOResource@HBM-CDOResource-1
> Thread-4 [debug] Clearing session in threadlocal
> Thread-4 [debug] Removing hibernate session
> main [debug.object] ATTACH: CDOResource@HBM-CDOResource-1 -->
> CDOTransaction(1)
> main [debug.object] size(CDOResource@HBM-CDOResource-1, CDOFeature(ID=2,
> name=contents, type=OBJECT, referenceType=CDOClass(ID=0, name=CDOObject)))
> main [debug.object] READ:
> org.eclipse.emf.cdo.eresource.impl.CDOResourceImpl
> main [debug.protocol] Writing referenceChunk: -1
> main [debug.protocol] Writing 1 IDs
> main [debug.protocol] Writing ID: HBM-CDOResource-1
> main [debug.model] Writing CDOID of type 1 (OBJECT)
> main [debug] Multiplexing 00 00 00 00 00 00 00 06 00 07 00 00 00 00 00
> 00 00 01 01 00 00 00 01 00 00 00 00 00 00 00 01 01 00 0b 43 44 4f 52 65
> 73 6f 75 72 63 65 00 00 00 00 00
> main [debug.protocol] Reading 1 revisions
> Thread-4 [debug] Created
> org.eclipse.emf.cdo.server.internal.hibernate.HibernateStore Reader for
> repository repo1
> Thread-4 [debug] Created
> org.eclipse.emf.cdo.server.internal.hibernate.HibernateStore Reader for
> repository repo1
> Thread-4 [debug.protocol] Read referenceChunk: -1
> Thread-4 [debug.protocol] Reading 1 IDs
> Thread-4 [debug.model] Reading CDOID of type 1 (OBJECT)
> Thread-4 [debug.protocol] Read ID: HBM-CDOResource-1
> Thread-4 [debug.protocol] Writing 1 revisions
> Thread-4 [debug] Releasing hibernate session
> Thread-4 [debug] Clearing session in threadlocal
> Thread-4 [debug] Removing hibernate session
> [ERROR] CommitContext not set
> java.lang.IllegalStateException: CommitContext not set
> at
> org.eclipse.emf.cdo.server.internal.hibernate.HibernateThrea dContext.getCommitContext(HibernateThreadContext.java:69)
>
> at
> org.eclipse.emf.cdo.server.internal.hibernate.HibernateUtil. getCDORevision(HibernateUtil.java:117)
>
> at
> org.eclipse.emf.cdo.server.internal.hibernate.HibernateStore Reader.readRevision(HibernateStoreReader.java:155)
>
> at
> org.eclipse.emf.cdo.internal.server.RevisionManager.loadRevi sion(RevisionManager.java:210)
>
> at
> org.eclipse.emf.cdo.internal.protocol.revision.CDORevisionRe solverImpl.getRevision(CDORevisionResolverImpl.java:282)
>
> at
> org.eclipse.emf.cdo.internal.protocol.revision.CDORevisionRe solverImpl.getRevision(CDORevisionResolverImpl.java:144)
>
> at
> org.eclipse.emf.cdo.internal.server.protocol.LoadRevisionInd ication.getRevision(LoadRevisionIndication.java:171)
>
> at
> org.eclipse.emf.cdo.internal.server.protocol.LoadRevisionInd ication.responding(LoadRevisionIndication.java:147)
>
> at
> org.eclipse.net4j.signal.IndicationWithResponse.execute(Indi cationWithResponse.java:54)
>
> at
> org.eclipse.emf.cdo.internal.server.protocol.CDOReadIndicati on.execute(CDOReadIndication.java:38)
>
> at org.eclipse.net4j.signal.Signal.runSync(Signal.java:143)
> at org.eclipse.net4j.signal.Signal.run(Signal.java:124)
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unkno wn
> Source)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
> at java.lang.Thread.run(Unknown Source)
>
> => no workaround => STOPPER!
>
>
> Should I open bugs for these issues?
> Can you provide quick fixes to my two stoppers?
>
>
> Cheers,
> Stefan


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Previous Topic:[CDO/Hibernate] Multiple issues
Next Topic:Hibernate flush causes transactional domain error
Goto Forum:
  


Current Time: Fri Apr 26 14:51:58 GMT 2024

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

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

Back to the top