[CDO] Error when deleting a resource from the root [message #1027070] |
Tue, 26 March 2013 10:21  |
Eclipse User |
|
|
|
Hi,
I'm getting an exception when try to delete a resource from the root (not contained into any CDOResourceFolder, directly from the root). I'm using the default CDO Sessions view.
[ERROR] org.eclipse.emf.cdo.common.revision.delta.CDOFeatureDelta$1 cannot be cast to org.eclipse.emf.cdo.eresource.CDOResourceNode
java.lang.ClassCastException: org.eclipse.emf.cdo.common.revision.delta.CDOFeatureDelta$1 cannot be cast to org.eclipse.emf.cdo.eresource.CDOResourceNode
at org.eclipse.emf.internal.cdo.view.AbstractCDOView$ContainerAdapter.notifyChanged(AbstractCDOView.java:1836)
at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374)
at org.eclipse.emf.common.notify.impl.NotificationChainImpl.dispatch(NotificationChainImpl.java:98)
at org.eclipse.emf.common.notify.impl.NotificationChainImpl.dispatch(NotificationChainImpl.java:86)
at org.eclipse.emf.internal.cdo.view.CDOViewImpl.sendDeltaNotifications(CDOViewImpl.java:980)
at org.eclipse.emf.internal.cdo.view.CDOViewImpl.doInvalidate(CDOViewImpl.java:857)
at org.eclipse.emf.internal.cdo.view.CDOViewImpl$InvalidationRunnable.run(CDOViewImpl.java:1591)
at org.eclipse.net4j.util.concurrent.QueueRunner.work(QueueRunner.java:26)
at org.eclipse.net4j.util.concurrent.QueueRunner.work(QueueRunner.java:1)
at org.eclipse.net4j.util.concurrent.QueueWorker.doWork(QueueWorker.java:88)
at org.eclipse.net4j.util.concurrent.QueueWorker.work(QueueWorker.java:79)
at org.eclipse.net4j.util.concurrent.Worker$WorkerThread.run(Worker.java:206)
I'm also using PostgreSQL 9.1 as database server, and CDO version 4.2-M5 (S20130205-0640)
Thanks,
Marc Gil
|
|
|
|
|
|
|
|
Re: [CDO] Error when deleting a resource from the root [message #1034334 is a reply to message #1031768] |
Fri, 05 April 2013 06:05   |
Eclipse User |
|
|
|
Hi Marc,
I've tried exactly the steps you've listed and it works perfectly here. I can delete top level resources, folders and
resources from folders. But I tried with H2 because Mysql is a little more effort here. Before I test with Mysql, can
you pease confirm that it works for you with H2 (just to exclude other differences in your setup)?
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
Am 02.04.2013 08:56, schrieb Marc Gil:
> Hi Eike,
>
> Maybe the your test case works, but it's not the same scenario that the following one:
> 1. Open the CDO Sessions view.
> 2. Open a new Session to the repository (using MySQL DB)
> 3. Open a new Transacion
> 4. Create a resource, for instance a folder
> 5. Remove this resource
>
> The exception is raised:
>
> java.lang.ClassCastException: org.eclipse.emf.cdo.common.revision.delta.CDOFeatureDelta$1 cannot be cast to
> org.eclipse.emf.cdo.eresource.CDOResourceNode
> at org.eclipse.emf.internal.cdo.view.AbstractCDOView$ContainerAdapter.notifyChanged(AbstractCDOView.java:1852)
> at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374)
> at org.eclipse.emf.common.notify.impl.NotificationChainImpl.dispatch(NotificationChainImpl.java:98)
> at org.eclipse.emf.common.notify.impl.NotificationChainImpl.dispatch(NotificationChainImpl.java:86)
> at org.eclipse.emf.internal.cdo.view.CDOViewImpl.sendDeltaNotifications(CDOViewImpl.java:983)
> at org.eclipse.emf.internal.cdo.view.CDOViewImpl.doInvalidate(CDOViewImpl.java:860)
> at org.eclipse.emf.internal.cdo.view.CDOViewImpl$InvalidationRunnable.run(CDOViewImpl.java:1604)
> at org.eclipse.net4j.util.concurrent.QueueRunner.work(QueueRunner.java:26)
> at org.eclipse.net4j.util.concurrent.QueueRunner.work(QueueRunner.java:1)
> at org.eclipse.net4j.util.concurrent.QueueWorker.doWork(QueueWorker.java:88)
> at org.eclipse.net4j.util.concurrent.QueueWorker.work(QueueWorker.java:79)
> at org.eclipse.net4j.util.concurrent.Worker$WorkerThread.run(Worker.java:206)
>
>
> Forget what I said about the listeners, cause I was wrong.
> Does this example works for you?
>
> Cheers,
> Marc
|
|
|
Re: [CDO] Error when deleting a resource from the root [message #1036846 is a reply to message #1034334] |
Mon, 08 April 2013 18:23   |
Eclipse User |
|
|
|
Eike,
Following the steps, if you remove a root element sometimes the exception is not raised, but you can see how the element is marked as Invalid in the CDO View, and if you try to operate with this resource, you only get a lot of exceptions. This does not happen if the removed element is contained into a folder. Maybe you don't get this exception cause the code is treating the exception, but it is raised.
I try it with MySQL 5.5.27, PostgreSQL 9.1.8 and PostgreSQL 9.2.3. I'll try it with H2 as soon as possible and I will tell you the results, but I thing that it will be the same...
Cheers,
Marc
|
|
|
|
|
|
Re: [CDO] Error when deleting a resource from the root [message #1043792 is a reply to message #1038871] |
Thu, 18 April 2013 02:08  |
Eclipse User |
|
|
|
Am 11.04.2013 15:03, schrieb Marc Gil:
> Hi Eike,
>
> I'm not able to have the plugin org.eclipse.emf.cdo.tests loaded. I have imported the M6 version of this plugin into
> my workspace, and I have 2 errors:
> - One error in the MANIFEST.MF, in the Imported Package org.apache.derby.jdbc. You're indicating that the version of
> this package needs to be between 10.0.0 and 11.0.0. The version I have for this plugin, is the 10.5.1.1, but in its
> manifest exports this package without specifying any version (I have this plugin cause I have installed BIRT 3.7.2).
> Maybe you can remove the minimum and maximum version for this package...
Good point! I've now removed all DB dependencies from the core tests:
405933: [Releng] Remove DB dependencies from cdo.tests
https://bugs.eclipse.org/bugs/show_bug.cgi?id=405933
> - The other error is in the class org.eclipse.emf.cdo.tests.EMFCompareTest. In the line 186 "EMFCompare comparator =
> EMFCompare.builder().setMatchEngine(matchEngine).build();". The version of EMF Compare I have installed is the last
> 2.1.0 M6. You're specifying in the org.eclipse.emf.cdo.compare plugin that it has a dependency to
> org.eclipse.emf.compare from [3.0.0 to 4.0.0), but something is wrong here. Maybe you're using another version of EMF
> Compare...
Yes, indeed. There was a confusion with Compare's p2 repos that caused us to build against a wrong version. Our more
recent I-builds fix that.
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
|
|
|
Powered by
FUDForum. Page generated in 0.06369 seconds