Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [CDO] remove object from resource throws UnsupportedOperationException
[CDO] remove object from resource throws UnsupportedOperationException [message #1006004] Tue, 29 January 2013 14:22 Go to next message
Ricky de Klerck is currently offline Ricky de Klerck
Messages: 295
Registered: January 2011
Senior Member
Hi,

I'm trying to remove an object from a CDOResource, but when doing a resource.save() an exception is thrown..

This is the code:

IStructuredSelection sel = (IStructuredSelection) tableViewer.getSelection();
if(sel.getFirstElement() != null){
	Person p = (Person) sel.getFirstElement();
	personResource.getContents().remove(p);
					
	try {
		personResource.save(null);
	} catch (IOException e1) {
		e1.printStackTrace();
	}
}


And this is the exception:

Caused by: java.lang.UnsupportedOperationException
	at org.eclipse.emf.cdo.internal.net4j.protocol.CommitDelegationRequest.getObjectType(CommitDelegationRequest.java:59)
	at org.eclipse.emf.cdo.internal.net4j.protocol.CommitTransactionRequest.requestingCommit(CommitTransactionRequest.java:222)
	at org.eclipse.emf.cdo.internal.net4j.protocol.CommitTransactionRequest.requesting(CommitTransactionRequest.java:128)
	at org.eclipse.emf.cdo.internal.net4j.protocol.CDOClientRequestWithMonitoring.requesting(CDOClientRequestWithMonitoring.java:91)
	at org.eclipse.net4j.signal.RequestWithMonitoring.requesting(RequestWithMonitoring.java:165)
	at org.eclipse.net4j.signal.RequestWithConfirmation.doExtendedOutput(RequestWithConfirmation.java:119)
	at org.eclipse.net4j.signal.Signal.doOutput(Signal.java:298)
	at org.eclipse.net4j.signal.RequestWithConfirmation.doExecute(RequestWithConfirmation.java:104)
	at org.eclipse.net4j.signal.RequestWithMonitoring.doExecute(RequestWithMonitoring.java:235)
	at org.eclipse.net4j.signal.SignalActor.execute(SignalActor.java:53)
	at org.eclipse.net4j.signal.Signal.runSync(Signal.java:253)
	at org.eclipse.net4j.signal.SignalProtocol.startSignal(SignalProtocol.java:431)
	at org.eclipse.net4j.signal.RequestWithConfirmation.doSend(RequestWithConfirmation.java:89)
	at org.eclipse.net4j.signal.RequestWithConfirmation.send(RequestWithConfirmation.java:75)
	at org.eclipse.net4j.signal.RequestWithMonitoring.send(RequestWithMonitoring.java:110)
	at org.eclipse.emf.cdo.internal.net4j.protocol.CDOClientProtocol.send(CDOClientProtocol.java:518)
	at org.eclipse.emf.cdo.internal.net4j.protocol.CDOClientProtocol.commitDelegation(CDOClientProtocol.java:405)
	at org.eclipse.emf.cdo.internal.server.syncing.SynchronizableRepository$WriteThroughCommitContext.commit(SynchronizableRepository.java:975)
	at org.eclipse.emf.cdo.spi.server.InternalCommitContext$2.runLoop(InternalCommitContext.java:56)
	at org.eclipse.emf.cdo.spi.server.InternalCommitContext$2.runLoop(InternalCommitContext.java:1)
	at org.eclipse.net4j.util.om.monitor.ProgressDistributor.run(ProgressDistributor.java:96)
	at org.eclipse.emf.cdo.internal.server.Repository.commitUnsynced(Repository.java:917)
	at org.eclipse.emf.cdo.internal.server.Repository.commit(Repository.java:910)
	at org.eclipse.emf.cdo.server.internal.net4j.protocol.CommitTransactionIndication.indicatingCommit(CommitTransactionIndication.java:295)
	at org.eclipse.emf.cdo.server.internal.net4j.protocol.CommitTransactionIndication.indicating(CommitTransactionIndication.java:97)
	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)


What am I doing wrong here?
Re: [CDO] remove object from resource throws UnsupportedOperationException [message #1006060 is a reply to message #1006004] Tue, 29 January 2013 16:44 Go to previous messageGo to next message
Eike Stepper is currently offline Eike Stepper
Messages: 5524
Registered: July 2009
Senior Member
Am 29.01.2013 15:22, schrieb Ricky de Klerck:
> Hi,
>
> I'm trying to remove an object from a CDOResource, but when doing a resource.save() an exception is thrown..
>
> This is the code:
>
> IStructuredSelection sel = (IStructuredSelection) tableViewer.getSelection();
> if(sel.getFirstElement() != null){
> Person p = (Person) sel.getFirstElement();
> personResource.getContents().remove(p);
>
> try {
> personResource.save(null);
> } catch (IOException e1) {
> e1.printStackTrace();
> }
> }
>
> And this is the exception:
>
> Caused by: java.lang.UnsupportedOperationException
> at org.eclipse.emf.cdo.internal.net4j.protocol.CommitDelegationRequest.getObjectType(CommitDelegationRequest.java:59)
That's weird. What CDO version are you using? Am I reight that this exception occurs in an offline clone repository?

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper



> at
> org.eclipse.emf.cdo.internal.net4j.protocol.CommitTransactionRequest.requestingCommit(CommitTransactionRequest.java:222)
> at org.eclipse.emf.cdo.internal.net4j.protocol.CommitTransactionRequest.requesting(CommitTransactionRequest.java:128)
> at
> org.eclipse.emf.cdo.internal.net4j.protocol.CDOClientRequestWithMonitoring.requesting(CDOClientRequestWithMonitoring.java:91)
> at org.eclipse.net4j.signal.RequestWithMonitoring.requesting(RequestWithMonitoring.java:165)
> at org.eclipse.net4j.signal.RequestWithConfirmation.doExtendedOutput(RequestWithConfirmation.java:119)
> at org.eclipse.net4j.signal.Signal.doOutput(Signal.java:298)
> at org.eclipse.net4j.signal.RequestWithConfirmation.doExecute(RequestWithConfirmation.java:104)
> at org.eclipse.net4j.signal.RequestWithMonitoring.doExecute(RequestWithMonitoring.java:235)
> at org.eclipse.net4j.signal.SignalActor.execute(SignalActor.java:53)
> at org.eclipse.net4j.signal.Signal.runSync(Signal.java:253)
> at org.eclipse.net4j.signal.SignalProtocol.startSignal(SignalProtocol.java:431)
> at org.eclipse.net4j.signal.RequestWithConfirmation.doSend(RequestWithConfirmation.java:89)
> at org.eclipse.net4j.signal.RequestWithConfirmation.send(RequestWithConfirmation.java:75)
> at org.eclipse.net4j.signal.RequestWithMonitoring.send(RequestWithMonitoring.java:110)
> at org.eclipse.emf.cdo.internal.net4j.protocol.CDOClientProtocol.send(CDOClientProtocol.java:518)
> at org.eclipse.emf.cdo.internal.net4j.protocol.CDOClientProtocol.commitDelegation(CDOClientProtocol.java:405)
> at
> org.eclipse.emf.cdo.internal.server.syncing.SynchronizableRepository$WriteThroughCommitContext.commit(SynchronizableRepository.java:975)
> at org.eclipse.emf.cdo.spi.server.InternalCommitContext$2.runLoop(InternalCommitContext.java:56)
> at org.eclipse.emf.cdo.spi.server.InternalCommitContext$2.runLoop(InternalCommitContext.java:1)
> at org.eclipse.net4j.util.om.monitor.ProgressDistributor.run(ProgressDistributor.java:96)
> at org.eclipse.emf.cdo.internal.server.Repository.commitUnsynced(Repository.java:917)
> at org.eclipse.emf.cdo.internal.server.Repository.commit(Repository.java:910)
> at
> org.eclipse.emf.cdo.server.internal.net4j.protocol.CommitTransactionIndication.indicatingCommit(CommitTransactionIndication.java:295)
> at
> org.eclipse.emf.cdo.server.internal.net4j.protocol.CommitTransactionIndication.indicating(CommitTransactionIndication.java:97)
> 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)
>
> What am I doing wrong here?
Re: [CDO] remove object from resource throws UnsupportedOperationException [message #1006179 is a reply to message #1006060] Wed, 30 January 2013 11:17 Go to previous messageGo to next message
Ricky de Klerck is currently offline Ricky de Klerck
Messages: 295
Registered: January 2011
Senior Member
I'm using CDO version 4.2.0.. And you're indeed right that it occurs in the clone repository, but it's still ONLINE.
Re: [CDO] remove object from resource throws UnsupportedOperationException [message #1006181 is a reply to message #1006179] Wed, 30 January 2013 11:26 Go to previous messageGo to next message
Eike Stepper is currently offline Eike Stepper
Messages: 5524
Registered: July 2009
Senior Member
Am 30.01.2013 12:17, schrieb Ricky de Klerck:
> I'm using CDO version 4.2.0.. And you're indeed right that it occurs in the clone repository, but it's still ONLINE.
Hmm, then I need to write a test case to analyze the problem. Please put a new bugzilla into the queue.

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
Re: [CDO] remove object from resource throws UnsupportedOperationException [message #1006183 is a reply to message #1006004] Wed, 30 January 2013 11:36 Go to previous messageGo to next message
Ricky de Klerck is currently offline Ricky de Klerck
Messages: 295
Registered: January 2011
Senior Member
Ok, I will do that. Which component should I choose when entering the bug?
Re: [CDO] remove object from resource throws UnsupportedOperationException [message #1006185 is a reply to message #1006183] Wed, 30 January 2013 11:43 Go to previous messageGo to next message
Eike Stepper is currently offline Eike Stepper
Messages: 5524
Registered: July 2009
Senior Member
Am 30.01.2013 12:36, schrieb Ricky de Klerck:
> Ok, I will do that. Which component should I choose when entering the bug?
Please use cdo.core.

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
Re: [CDO] remove object from resource throws UnsupportedOperationException [message #1006188 is a reply to message #1006004] Wed, 30 January 2013 11:55 Go to previous messageGo to next message
Ricky de Klerck is currently offline Ricky de Klerck
Messages: 295
Registered: January 2011
Senior Member
The bug is created: https://bugs.eclipse.org/bugs/show_bug.cgi?id=399474
Re: [CDO] remove object from resource throws UnsupportedOperationException [message #1015328 is a reply to message #1006185] Thu, 28 February 2013 09:03 Go to previous messageGo to next message
Ricky de Klerck is currently offline Ricky de Klerck
Messages: 295
Registered: January 2011
Senior Member
Eike,

Any news on this bug yet? It's a really important feature for us.

Regards,
Ricky de Klerck
Re: [CDO] remove object from resource throws UnsupportedOperationException [message #1015330 is a reply to message #1015328] Thu, 28 February 2013 09:16 Go to previous messageGo to next message
Eike Stepper is currently offline Eike Stepper
Messages: 5524
Registered: July 2009
Senior Member
Am 28.02.2013 10:03, schrieb Ricky de Klerck:
> Eike,
>
> Any news on this bug yet?
No, any important news would appear on the bugzilla.

> It's a really important feature for us.
I believe it. You surely understand that I have my own priorities, that is customers first ;-)

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
Re: [CDO] remove object from resource throws UnsupportedOperationException [message #1015371 is a reply to message #1015330] Thu, 28 February 2013 11:42 Go to previous message
Ricky de Klerck is currently offline Ricky de Klerck
Messages: 295
Registered: January 2011
Senior Member
I will keep an eye on bugzilla then and of course I understand!
Previous Topic:Problem with ExtendedMetaData
Next Topic:[CDO] Cannot connect to my repository (following some samples)
Goto Forum:
  


Current Time: Sat Sep 20 22:11:54 GMT 2014

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

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