Home » Modeling » EMF » [CDO] Uninitialized cannot be cast to CDOID
[CDO] Uninitialized cannot be cast to CDOID [message #1634564] |
Wed, 25 February 2015 05:32  |
Eclipse User |
|
|
|
Hi
I have a CDO Server with a somewhat big content tree (around 200k objects). The Server is configured supporting audit views and branches and a DBStore backend.
Everything works fine until the server gets into a state where it repeatedly throws a ClassCastException (around 10 times a second), and stops completely until
the client that caused it disconnects, or the server is restarted. The exact Exception is:
java.lang.ClassCastException: org.eclipse.emf.cdo.common.revision.CDORevisionUtil$Uninitialized cannot be cast to org.eclipse.emf.cdo.common.id.CDOID
at org.eclipse.emf.cdo.internal.common.model.CDOTypeImpl$11.writeValue(CDOTypeImpl.java:246)
at org.eclipse.emf.cdo.server.internal.net4j.protocol.LoadChunkIndication.responding(LoadChunkIndication.java:106)
at org.eclipse.emf.cdo.server.internal.net4j.protocol.CDOServerIndication.responding(CDOServerIndication.java:134)
at org.eclipse.net4j.signal.IndicationWithResponse.doExtendedOutput(IndicationWithResponse.java:98)
at org.eclipse.net4j.signal.Signal.doOutput(Signal.java:301)
at org.eclipse.net4j.signal.IndicationWithResponse.execute(IndicationWithResponse.java:67)
at org.eclipse.emf.cdo.server.internal.net4j.protocol.CDOServerReadIndication.execute(CDOServerReadIndication.java:36)
at org.eclipse.net4j.signal.Signal.runSync(Signal.java:256)
at org.eclipse.net4j.signal.Signal.run(Signal.java:149)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
When the exception occurs seems random, but it always does.
After some debugging and reading the code, i suspected that the line
repository.ensureChunk(revision, feature, fromIndex, toIndex + 1);
at LoadChunkIndication.java:99 does not do what it should, and there are still some unitialized objects in the chunk. Because of that i tried to configure the cache to be unchunked via
transaction.options().setRevisionPrefetchingPolicy(CDOUtil.createRevisionPrefetchingPolicy(-1));
and
session.options().setCollectionLoadingPolicy(CDOUtil.createCollectionLoadingPolicy(-1, -1));
and the exception is gone since.
Is this a bug in the CDO Server, or is it due to a special configuration (or Error) on my part?
I'm running CDO 4.3.
Greetings,
Samuel
|
|
|
Re: [CDO] Uninitialized cannot be cast to CDOID [message #1634746 is a reply to message #1634564] |
Wed, 25 February 2015 07:31   |
Eclipse User |
|
|
|
Hi Samuel,
This has been reported before but I've only ever managed to reproduce it in one scenario and that's fixed:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=369646
It has been reported in the newsgroup after that fix but without being able to reproduce it it's very hard for me to
find the cause. More comments below...
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
Am 25.02.2015 um 11:32 schrieb Samuel Leisering:
> Hi
>
> I have a CDO Server with a somewhat big content tree (around 200k objects). The Server is configured supporting audit
> views and branches and a DBStore backend.
>
> Everything works fine until the server gets into a state where it repeatedly throws a ClassCastException (around 10
> times a second), and stops completely until the client that caused it disconnects, or the server is restarted. The
> exact Exception is:
>
> java.lang.ClassCastException: org.eclipse.emf.cdo.common.revision.CDORevisionUtil$Uninitialized cannot be cast to
> org.eclipse.emf.cdo.common.id.CDOID
> at org.eclipse.emf.cdo.internal.common.model.CDOTypeImpl$11.writeValue(CDOTypeImpl.java:246)
> at org.eclipse.emf.cdo.server.internal.net4j.protocol.LoadChunkIndication.responding(LoadChunkIndication.java:106)
> at org.eclipse.emf.cdo.server.internal.net4j.protocol.CDOServerIndication.responding(CDOServerIndication.java:134)
> at org.eclipse.net4j.signal.IndicationWithResponse.doExtendedOutput(IndicationWithResponse.java:98)
> at org.eclipse.net4j.signal.Signal.doOutput(Signal.java:301)
> at org.eclipse.net4j.signal.IndicationWithResponse.execute(IndicationWithResponse.java:67)
> at org.eclipse.emf.cdo.server.internal.net4j.protocol.CDOServerReadIndication.execute(CDOServerReadIndication.java:36)
> at org.eclipse.net4j.signal.Signal.runSync(Signal.java:256)
> at org.eclipse.net4j.signal.Signal.run(Signal.java:149)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
> at java.lang.Thread.run(Unknown Source)
>
>
> When the exception occurs seems random, but it always does.
>
> After some debugging and reading the code, i suspected that the line repository.ensureChunk(revision, feature,
> fromIndex, toIndex + 1); at LoadChunkIndication.java:99 does not do what it should, and there are still some
> unitialized objects in the chunk. Because of that i tried to configure the cache to be unchunked via
> transaction.options().setRevisionPrefetchingPolicy(CDOUtil.createRevisionPrefetchingPolicy(-1));
That's not related to partial collection loading. Can you try without that call? We must try to get a clearer picture of
when it happens and when not.
> and
> session.options().setCollectionLoadingPolicy(CDOUtil.createCollectionLoadingPolicy(-1, -1));
>
> and the exception is gone since.
>
> Is this a bug in the CDO Server, or is it due to a special configuration (or Error) on my part?
Probably for former.
|
|
|
Re: [CDO] Uninitialized cannot be cast to CDOID [message #1634784 is a reply to message #1634746] |
Wed, 25 February 2015 07:59   |
Eclipse User |
|
|
|
Some more questions to understand the context of the problem:
- Are you using branching or auditing in your repo config?
- What has happened on the client side before that problem occurs? For example have you been in the process of switching
the branch of a view/transaction?
- How many client sessions are involved? How many views/transactions per session?
Am 25.02.2015 um 13:31 schrieb Eike Stepper:
> Hi Samuel,
>
> This has been reported before but I've only ever managed to reproduce it in one scenario and that's fixed:
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=369646
>
> It has been reported in the newsgroup after that fix but without being able to reproduce it it's very hard for me to
> find the cause. More comments below...
>
> Cheers
> /Eike
>
> ----
> http://www.esc-net.de
> http://thegordian.blogspot.com
> http://twitter.com/eikestepper
>
>
>
> Am 25.02.2015 um 11:32 schrieb Samuel Leisering:
>> Hi
>>
>> I have a CDO Server with a somewhat big content tree (around 200k objects). The Server is configured supporting audit
>> views and branches and a DBStore backend.
>>
>> Everything works fine until the server gets into a state where it repeatedly throws a ClassCastException (around 10
>> times a second), and stops completely until the client that caused it disconnects, or the server is restarted. The
>> exact Exception is:
>>
>> java.lang.ClassCastException: org.eclipse.emf.cdo.common.revision.CDORevisionUtil$Uninitialized cannot be cast to
>> org.eclipse.emf.cdo.common.id.CDOID
>> at org.eclipse.emf.cdo.internal.common.model.CDOTypeImpl$11.writeValue(CDOTypeImpl.java:246)
>> at org.eclipse.emf.cdo.server.internal.net4j.protocol.LoadChunkIndication.responding(LoadChunkIndication.java:106)
>> at org.eclipse.emf.cdo.server.internal.net4j.protocol.CDOServerIndication.responding(CDOServerIndication.java:134)
>> at org.eclipse.net4j.signal.IndicationWithResponse.doExtendedOutput(IndicationWithResponse.java:98)
>> at org.eclipse.net4j.signal.Signal.doOutput(Signal.java:301)
>> at org.eclipse.net4j.signal.IndicationWithResponse.execute(IndicationWithResponse.java:67)
>> at
>> org.eclipse.emf.cdo.server.internal.net4j.protocol.CDOServerReadIndication.execute(CDOServerReadIndication.java:36)
>> at org.eclipse.net4j.signal.Signal.runSync(Signal.java:256)
>> at org.eclipse.net4j.signal.Signal.run(Signal.java:149)
>> at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
>> at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
>> at java.lang.Thread.run(Unknown Source)
>>
>>
>> When the exception occurs seems random, but it always does.
>>
>> After some debugging and reading the code, i suspected that the line repository.ensureChunk(revision, feature,
>> fromIndex, toIndex + 1); at LoadChunkIndication.java:99 does not do what it should, and there are still some
>> unitialized objects in the chunk. Because of that i tried to configure the cache to be unchunked via
>> transaction.options().setRevisionPrefetchingPolicy(CDOUtil.createRevisionPrefetchingPolicy(-1));
> That's not related to partial collection loading. Can you try without that call? We must try to get a clearer picture
> of when it happens and when not.
>
>> and
>> session.options().setCollectionLoadingPolicy(CDOUtil.createCollectionLoadingPolicy(-1, -1));
>>
>> and the exception is gone since.
>>
>> Is this a bug in the CDO Server, or is it due to a special configuration (or Error) on my part?
> Probably for former.
>
>
|
|
|
Re: [CDO] Uninitialized cannot be cast to CDOID [message #1634978 is a reply to message #1634784] |
Wed, 25 February 2015 09:55   |
Eclipse User |
|
|
|
Hi,
thanks for the fast reply.
- The Repository supports both branching and auditing
- There is no distinguishable case when the client causes this, but it happens in the same transaction and the same branch. I suspect that it is a changing operation that causes this (like moving an item to another container, or adding elements).
- The amount of connected clients varies. I think the most clients that were connected when the bug occured was around 10, but it also happened with only one client connected to a locally running cdo-server with a different DB-Store backend than our production server.
A few things that should also be mentioned after some additional debugging:
- We sucessfully had multiple clients (around 5) connected for hours doing mostly read operations and some small write operations (adding/removing to HashMaps)
- A few changes with structural impact on the model were anough to cause this bug
- We encountered this bug once *with* the Policies set to -1 (after a structural change)
I took a look in the CDOServerBrowser and inspected a broken object. The object contains two HashMaps, which are defined as described here. The contents of both of these HashMaps are UNINITIALIZED. Every other cached object of this type has the correct entries in those maps (as it whould with the used caching policies)
Greetings,
Samuel
Eike Stepper wrote on Wed, 25 February 2015 07:59Some more questions to understand the context of the problem:
- Are you using branching or auditing in your repo config?
- What has happened on the client side before that problem occurs? For example have you been in the process of switching
the branch of a view/transaction?
- How many client sessions are involved? How many views/transactions per session?
Am 25.02.2015 um 13:31 schrieb Eike Stepper:
> Hi Samuel,
>
> This has been reported before but I've only ever managed to reproduce it in one scenario and that's fixed:
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=369646
>
> It has been reported in the newsgroup after that fix but without being able to reproduce it it's very hard for me to
> find the cause. More comments below...
>
> Cheers
> /Eike
>
> ----
> http://www.esc-net.de
> http://thegordian.blogspot.com
> http://twitter.com/eikestepper
>
>
>
> Am 25.02.2015 um 11:32 schrieb Samuel Leisering:
>> Hi
>>
>> I have a CDO Server with a somewhat big content tree (around 200k objects). The Server is configured supporting audit
>> views and branches and a DBStore backend.
>>
>> Everything works fine until the server gets into a state where it repeatedly throws a ClassCastException (around 10
>> times a second), and stops completely until the client that caused it disconnects, or the server is restarted. The
>> exact Exception is:
>>
>> java.lang.ClassCastException: org.eclipse.emf.cdo.common.revision.CDORevisionUtil$Uninitialized cannot be cast to
>> org.eclipse.emf.cdo.common.id.CDOID
>> at org.eclipse.emf.cdo.internal.common.model.CDOTypeImpl$11.writeValue(CDOTypeImpl.java:246)
>> at org.eclipse.emf.cdo.server.internal.net4j.protocol.LoadChunkIndication.responding(LoadChunkIndication.java:106)
>> at org.eclipse.emf.cdo.server.internal.net4j.protocol.CDOServerIndication.responding(CDOServerIndication.java:134)
>> at org.eclipse.net4j.signal.IndicationWithResponse.doExtendedOutput(IndicationWithResponse.java:98)
>> at org.eclipse.net4j.signal.Signal.doOutput(Signal.java:301)
>> at org.eclipse.net4j.signal.IndicationWithResponse.execute(IndicationWithResponse.java:67)
>> at
>> org.eclipse.emf.cdo.server.internal.net4j.protocol.CDOServerReadIndication.execute(CDOServerReadIndication.java:36)
>> at org.eclipse.net4j.signal.Signal.runSync(Signal.java:256)
>> at org.eclipse.net4j.signal.Signal.run(Signal.java:149)
>> at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
>> at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
>> at java.lang.Thread.run(Unknown Source)
>>
>>
>> When the exception occurs seems random, but it always does.
>>
>> After some debugging and reading the code, i suspected that the line repository.ensureChunk(revision, feature,
>> fromIndex, toIndex + 1); at LoadChunkIndication.java:99 does not do what it should, and there are still some
>> unitialized objects in the chunk. Because of that i tried to configure the cache to be unchunked via
>> transaction.options().setRevisionPrefetchingPolicy(CDOUtil.createRevisionPrefetchingPolicy(-1));
> That's not related to partial collection loading. Can you try without that call? We must try to get a clearer picture
> of when it happens and when not.
>
>> and
>> session.options().setCollectionLoadingPolicy(CDOUtil.createCollectionLoadingPolicy(-1, -1));
>>
>> and the exception is gone since.
>>
>> Is this a bug in the CDO Server, or is it due to a special configuration (or Error) on my part?
> Probably for former.
>
>
|
|
| | | | | | | | |
Goto Forum:
Current Time: Wed Jul 23 17:58:09 EDT 2025
Powered by FUDForum. Page generated in 0.04520 seconds
|