Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [CDO] HibernateStore UnsupportedOperationException
[CDO] HibernateStore UnsupportedOperationException [message #989518] Thu, 06 December 2012 15:20 Go to next message
Stephan Krusche is currently offline Stephan KruscheFriend
Messages: 18
Registered: September 2012
Junior Member
Hi,

I am using CDO 4.1 with the HibernateStore Configuration with EMF 2.8.0, EclipseLink 2.4.0, Teneo 2.0.0 and Hibernate 4.1.1.
When I create new objects in my CDO Client, add them to a resource (in my empty database) and commit them, everything works fine. I can also change values of these attributes and commit these changes without problems.
However creating new objects and adding them to a resource that already consists of objects (of the same type) leads to a UnsupportedOperationException on the CDO HibernateStore:

[ERROR] UnsupportedOperationException
java.lang.UnsupportedOperationException
	at org.eclipse.emf.cdo.server.internal.hibernate.tuplizer.CDORevisionLazyInitializer.getPersistentClass(CDORevisionLazyInitializer.java:40)
	at org.hibernate.proxy.HibernateProxyHelper.getClassWithoutInitializingProxy(HibernateProxyHelper.java:44)
	at org.hibernate.type.AnyType.toLoggableString(AnyType.java:201)
	at org.hibernate.type.CollectionType.renderLoggableString(CollectionType.java:193)
	at org.hibernate.type.CollectionType.toLoggableString(CollectionType.java:184)
	at org.hibernate.internal.util.EntityPrinter.toString(EntityPrinter.java:79)
	at org.hibernate.internal.util.EntityPrinter.toString(EntityPrinter.java:121)
	at org.hibernate.event.internal.AbstractFlushingEventListener.logFlushResults(AbstractFlushingEventListener.java:131)
	at org.hibernate.event.internal.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:107)
	at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:51)
	at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1127)
	at org.eclipse.emf.cdo.server.internal.hibernate.HibernateStoreAccessor.doWrite(HibernateStoreAccessor.java:700)
	at org.eclipse.emf.cdo.spi.server.StoreAccessorBase.write(StoreAccessorBase.java:149)
	at org.eclipse.emf.cdo.internal.server.TransactionCommitContext.write(TransactionCommitContext.java:487)
	at org.eclipse.emf.cdo.spi.server.InternalCommitContext$1.runLoop(InternalCommitContext.java:43)
	at org.eclipse.emf.cdo.spi.server.InternalCommitContext$1.runLoop(InternalCommitContext.java:1)
	at org.eclipse.net4j.util.om.monitor.ProgressDistributor.run(ProgressDistributor.java:96)
	at org.eclipse.emf.cdo.server.internal.net4j.protocol.CommitTransactionIndication.indicatingCommit(CommitTransactionIndication.java:262)
	at org.eclipse.emf.cdo.server.internal.net4j.protocol.CommitTransactionIndication.indicating(CommitTransactionIndication.java:96)
	at org.eclipse.emf.cdo.server.internal.net4j.protocol.CDOServerIndicationWithMonitoring.indicating(CDOServerIndicationWithMonitoring.java:109)
	at org.eclipse.net4j.signal.IndicationWithMonitoring.indicating(IndicationWithMonitoring.java:86)
	at org.eclipse.net4j.signal.IndicationWithResponse.doExtendedInput(IndicationWithResponse.java:92)
	at org.eclipse.net4j.signal.Signal.doInput(Signal.java:328)
	at org.eclipse.net4j.signal.IndicationWithResponse.execute(IndicationWithResponse.java:65)
	at org.eclipse.net4j.signal.IndicationWithMonitoring.execute(IndicationWithMonitoring.java:65)
	at org.eclipse.net4j.signal.Signal.runSync(Signal.java:253)
	at org.eclipse.net4j.signal.Signal.run(Signal.java:149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
	at java.lang.Thread.run(Thread.java:680)



On CDO Client side I get the following exception:

Error: org.eclipse.emf.cdo.util.CommitException: Rollback in HibernateStore: java.lang.UnsupportedOperationException
	at org.eclipse.emf.cdo.server.internal.hibernate.tuplizer.CDORevisionLazyInitializer.getPersistentClass(CDORevisionLazyInitializer.java:40)
	at org.hibernate.proxy.HibernateProxyHelper.getClassWithoutInitializingProxy(HibernateProxyHelper.java:44)
	at org.hibernate.type.AnyType.toLoggableString(AnyType.java:201)
	at org.hibernate.type.CollectionType.renderLoggableString(CollectionType.java:193)
	at org.hibernate.type.CollectionType.toLoggableString(CollectionType.java:184)
	at org.hibernate.internal.util.EntityPrinter.toString(EntityPrinter.java:79)
	at org.hibernate.internal.util.EntityPrinter.toString(EntityPrinter.java:121)
	at org.hibernate.event.internal.AbstractFlushingEventListener.logFlushResults(AbstractFlushingEventListener.java:131)
	at org.hibernate.event.internal.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:107)
	at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:51)
	at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1127)
	at org.eclipse.emf.cdo.server.internal.hibernate.HibernateStoreAccessor.doWrite(HibernateStoreAccessor.java:700)
	at org.eclipse.emf.cdo.spi.server.StoreAccessorBase.write(StoreAccessorBase.java:149)
	at org.eclipse.emf.cdo.internal.server.TransactionCommitContext.write(TransactionCommitContext.java:487)
	at org.eclipse.emf.cdo.spi.server.InternalCommitContext$1.runLoop(InternalCommitContext.java:43)
	at org.eclipse.emf.cdo.spi.server.InternalCommitContext$1.runLoop(InternalCommitContext.java:1)
	at org.eclipse.net4j.util.om.monitor.ProgressDistributor.run(ProgressDistributor.java:96)
	at org.eclipse.emf.cdo.server.internal.net4j.protocol.CommitTransactionIndication.indicatingCommit(CommitTransactionIndication.java:262)
	at org.eclipse.emf.cdo.server.internal.net4j.protocol.CommitTransactionIndication.indicating(CommitTransactionIndication.java:96)
	at org.eclipse.emf.cdo.server.internal.net4j.protocol.CDOServerIndicationWithMonitoring.indicating(CDOServerIndicationWithMonitoring.java:109)
	at org.eclipse.net4j.signal.IndicationWithMonitoring.indicating(IndicationWithMonitoring.java:86)
	at org.eclipse.net4j.signal.IndicationWithResponse.doExtendedInput(IndicationWithResponse.java:92)
	at org.eclipse.net4j.signal.Signal.doInput(Signal.java:328)
	at org.eclipse.net4j.signal.IndicationWithResponse.execute(IndicationWithResponse.java:65)
	at org.eclipse.net4j.signal.IndicationWithMonitoring.execute(IndicationWithMonitoring.java:65)
	at org.eclipse.net4j.signal.Signal.runSync(Signal.java:253)
	at org.eclipse.net4j.signal.Signal.run(Signal.java:149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
	at java.lang.Thread.run(Thread.java:680)

	at org.eclipse.emf.internal.cdo.transaction.CDOSingleTransactionStrategyImpl.commit(CDOSingleTransactionStrategyImpl.java:85)
	at org.eclipse.emf.internal.cdo.transaction.CDOTransactionImpl.commit(CDOTransactionImpl.java:1134)
	at org.eclipse.emf.internal.cdo.transaction.CDOTransactionImpl.commit(CDOTransactionImpl.java:1154)



Does anyone have an idea why I get this exception and how can I avoid it?

Thanks for help
Stephan

[Updated on: Thu, 06 December 2012 15:28]

Report message to a moderator

Re: [CDO] HibernateStore UnsupportedOperationException [message #989523 is a reply to message #989518] Thu, 06 December 2012 15:39 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Stephan,
Which version of the CDO Hibernate store are you using?

The past month I spend considerable time on this store and currently all testcases pass (1040+). Can you try the latest
4.2 build here:
http://download.eclipse.org/modeling/emf/cdo/drops/I20121206-0553/

gr. Martin

On 12/06/2012 04:21 PM, Stephan Krusche wrote:
> Hi,
>
> when I create new objects in my CDO Client, add them to a resource (in my empty database) and commit them, everything
> works fine. I can also change values of these attributes and commit these changes without problems.
> However creating new objects and adding them to a resource that already consists of objects (of the same type) leads to
> a UnsupportedOperationException on the CDO HibernateStore:
>
> [ERROR] UnsupportedOperationException
> java.lang.UnsupportedOperationException
> at
> org.eclipse.emf.cdo.server.internal.hibernate.tuplizer.CDORevisionLazyInitializer.getPersistentClass(CDORevisionLazyInitializer.java:40)
>
> at org.hibernate.proxy.HibernateProxyHelper.getClassWithoutInitializingProxy(HibernateProxyHelper.java:44)
> at org.hibernate.type.AnyType.toLoggableString(AnyType.java:201)
> at org.hibernate.type.CollectionType.renderLoggableString(CollectionType.java:193)
> at org.hibernate.type.CollectionType.toLoggableString(CollectionType.java:184)
> at org.hibernate.internal.util.EntityPrinter.toString(EntityPrinter.java:79)
> at org.hibernate.internal.util.EntityPrinter.toString(EntityPrinter.java:121)
> at org.hibernate.event.internal.AbstractFlushingEventListener.logFlushResults(AbstractFlushingEventListener.java:131)
> at
> org.hibernate.event.internal.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:107)
>
> at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:51)
> at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1127)
> at org.eclipse.emf.cdo.server.internal.hibernate.HibernateStoreAccessor.doWrite(HibernateStoreAccessor.java:700)
> at org.eclipse.emf.cdo.spi.server.StoreAccessorBase.write(StoreAccessorBase.java:149)
> at org.eclipse.emf.cdo.internal.server.TransactionCommitContext.write(TransactionCommitContext.java:487)
> at org.eclipse.emf.cdo.spi.server.InternalCommitContext$1.runLoop(InternalCommitContext.java:43)
> at org.eclipse.emf.cdo.spi.server.InternalCommitContext$1.runLoop(InternalCommitContext.java:1)
> at org.eclipse.net4j.util.om.monitor.ProgressDistributor.run(ProgressDistributor.java:96)
> at
> org.eclipse.emf.cdo.server.internal.net4j.protocol.CommitTransactionIndication.indicatingCommit(CommitTransactionIndication.java:262)
>
> at
> org.eclipse.emf.cdo.server.internal.net4j.protocol.CommitTransactionIndication.indicating(CommitTransactionIndication.java:96)
>
> at
> org.eclipse.emf.cdo.server.internal.net4j.protocol.CDOServerIndicationWithMonitoring.indicating(CDOServerIndicationWithMonitoring.java:109)
>
> at org.eclipse.net4j.signal.IndicationWithMonitoring.indicating(IndicationWithMonitoring.java:86)
> at org.eclipse.net4j.signal.IndicationWithResponse.doExtendedInput(IndicationWithResponse.java:92)
> at org.eclipse.net4j.signal.Signal.doInput(Signal.java:328)
> at org.eclipse.net4j.signal.IndicationWithResponse.execute(IndicationWithResponse.java:65)
> at org.eclipse.net4j.signal.IndicationWithMonitoring.execute(IndicationWithMonitoring.java:65)
> at org.eclipse.net4j.signal.Signal.runSync(Signal.java:253)
> at org.eclipse.net4j.signal.Signal.run(Signal.java:149)
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> at java.lang.Thread.run(Thread.java:680)
>
>
> On CDO Client side I get the following exception:
>
> Error: org.eclipse.emf.cdo.util.CommitException: Rollback in HibernateStore: java.lang.UnsupportedOperationException
> at
> org.eclipse.emf.cdo.server.internal.hibernate.tuplizer.CDORevisionLazyInitializer.getPersistentClass(CDORevisionLazyInitializer.java:40)
>
> at org.hibernate.proxy.HibernateProxyHelper.getClassWithoutInitializingProxy(HibernateProxyHelper.java:44)
> at org.hibernate.type.AnyType.toLoggableString(AnyType.java:201)
> at org.hibernate.type.CollectionType.renderLoggableString(CollectionType.java:193)
> at org.hibernate.type.CollectionType.toLoggableString(CollectionType.java:184)
> at org.hibernate.internal.util.EntityPrinter.toString(EntityPrinter.java:79)
> at org.hibernate.internal.util.EntityPrinter.toString(EntityPrinter.java:121)
> at org.hibernate.event.internal.AbstractFlushingEventListener.logFlushResults(AbstractFlushingEventListener.java:131)
> at
> org.hibernate.event.internal.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:107)
>
> at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:51)
> at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1127)
> at org.eclipse.emf.cdo.server.internal.hibernate.HibernateStoreAccessor.doWrite(HibernateStoreAccessor.java:700)
> at org.eclipse.emf.cdo.spi.server.StoreAccessorBase.write(StoreAccessorBase.java:149)
> at org.eclipse.emf.cdo.internal.server.TransactionCommitContext.write(TransactionCommitContext.java:487)
> at org.eclipse.emf.cdo.spi.server.InternalCommitContext$1.runLoop(InternalCommitContext.java:43)
> at org.eclipse.emf.cdo.spi.server.InternalCommitContext$1.runLoop(InternalCommitContext.java:1)
> at org.eclipse.net4j.util.om.monitor.ProgressDistributor.run(ProgressDistributor.java:96)
> at
> org.eclipse.emf.cdo.server.internal.net4j.protocol.CommitTransactionIndication.indicatingCommit(CommitTransactionIndication.java:262)
>
> at
> org.eclipse.emf.cdo.server.internal.net4j.protocol.CommitTransactionIndication.indicating(CommitTransactionIndication.java:96)
>
> at
> org.eclipse.emf.cdo.server.internal.net4j.protocol.CDOServerIndicationWithMonitoring.indicating(CDOServerIndicationWithMonitoring.java:109)
>
> at org.eclipse.net4j.signal.IndicationWithMonitoring.indicating(IndicationWithMonitoring.java:86)
> at org.eclipse.net4j.signal.IndicationWithResponse.doExtendedInput(IndicationWithResponse.java:92)
> at org.eclipse.net4j.signal.Signal.doInput(Signal.java:328)
> at org.eclipse.net4j.signal.IndicationWithResponse.execute(IndicationWithResponse.java:65)
> at org.eclipse.net4j.signal.IndicationWithMonitoring.execute(IndicationWithMonitoring.java:65)
> at org.eclipse.net4j.signal.Signal.runSync(Signal.java:253)
> at org.eclipse.net4j.signal.Signal.run(Signal.java:149)
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> at java.lang.Thread.run(Thread.java:680)
>
> at
> org.eclipse.emf.internal.cdo.transaction.CDOSingleTransactionStrategyImpl.commit(CDOSingleTransactionStrategyImpl.java:85)
> at org.eclipse.emf.internal.cdo.transaction.CDOTransactionImpl.commit(CDOTransactionImpl.java:1134)
> at org.eclipse.emf.internal.cdo.transaction.CDOTransactionImpl.commit(CDOTransactionImpl.java:1154)
>
>
> Does anyone have an idea why I get this exception and how can I avoid it?
>
> Thanks for help
> Stephan


--

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@xxxxxxxx - mtaal@xxxxxxxx
Web: www.springsite.com - www.elver.org
Re: [CDO] HibernateStore UnsupportedOperationException [message #989524 is a reply to message #989523] Thu, 06 December 2012 15:50 Go to previous messageGo to next message
Stephan Krusche is currently offline Stephan KruscheFriend
Messages: 18
Registered: September 2012
Junior Member
Hi Martin,

I am using the following plugins in my target platform:
- CDO 4.1
- EMF 2.8.0
- EclipseLink 2.4.0
- Teneo 2.0.0
- Hibernate 4.1.1.


When I try out CDO 4.2, do I need to upgrade EMF, EclipseLink, Teneo or Hibernate?


Thanks and best regards
Stephan

[Updated on: Thu, 06 December 2012 15:51]

Report message to a moderator

Re: [CDO] HibernateStore UnsupportedOperationException [message #989566 is a reply to message #989524] Thu, 06 December 2012 18:50 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Stephan,
It makes sense to upgrade to latest CDO 4.2 build (at least for the hibernate store, see the update site link in my
previous post).

You don't need to upgrade EMF. You need the latest build of Teneo though. Hibernate 4.1.1 is fine, not sure why you need
EclipseLink though (as you already have hibernate there).

gr. Martin

On 12/06/2012 04:50 PM, Stephan Krusche wrote:
> Hi Martin,
>
> I am using the following version:
> - CDO 4.1
> - EMF 2.8.0
> - EclipseLink 2.4.0 - Teneo 2.0.0
> - Hibernate 4.1.1.
>
>
> When I try out CDO 4.2, do I need to upgrade EMF, EclipseLink, Teneo or Hibernate?
>
>
> Thanks and best regards
> Stephan


--

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@xxxxxxxx - mtaal@xxxxxxxx
Web: www.springsite.com - www.elver.org
Re: [CDO] HibernateStore UnsupportedOperationException [message #989569 is a reply to message #989518] Thu, 06 December 2012 19:13 Go to previous message
Stephan Krusche is currently offline Stephan KruscheFriend
Messages: 18
Registered: September 2012
Junior Member
Hi Martin,

thanks for the help. It is now working with the new version 4.2 of CDO Smile
You're doing a great job in maintaining this complex framework!

I also upgraded to Eclipse Platform 4.3 M3, EMF 2.9.0 M3 and Teneo 2.0.1.

And you are right, EclipseLink was not required. I was confused a bit Wink

Thanks again for the quick response and best regards
Stephan
Previous Topic:[CDO] Transaction commit & Threads
Next Topic:[CDO] Announce: Oracle support temporarily disabled in 4.2
Goto Forum:
  


Current Time: Fri Apr 19 10:37:53 GMT 2024

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

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

Back to the top