|
Re: [CDO] remove object from resource throws UnsupportedOperationException [message #1006060 is a reply to message #1006004] |
Tue, 29 January 2013 16:44 |
|
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?
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
|
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05029 seconds