Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 316145 - [DB] Revision list values loads NULL
Summary: [DB] Revision list values loads NULL
Status: CLOSED FIXED
Alias: None
Product: EMF
Classification: Modeling
Component: cdo.db (show other bugs)
Version: 3.0   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Eike Stepper CLA
QA Contact: Eike Stepper CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-08 10:43 EDT by Egidijus Vaisnora CLA
Modified: 2010-06-29 04:36 EDT (History)
2 users (show)

See Also:


Attachments
Short test illustrating problem (2.43 KB, application/octet-stream)
2010-06-08 10:46 EDT, Egidijus Vaisnora CLA
no flags Details
Added checking for NULL result in ResultSet (1.12 KB, text/plain)
2010-06-08 10:54 EDT, Egidijus Vaisnora CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Egidijus Vaisnora CLA 2010-06-08 10:43:17 EDT
Build Identifier: I20100513-1500

If CDOObject contains reference list and revision is not held in cache, then loaded revision contains NULL value in reference null, if revision was loaded with *referenceChunk=0* rule. This leads to NPE.

Reproducible: Always
Comment 1 Egidijus Vaisnora CLA 2010-06-08 10:46:42 EDT
Created attachment 171410 [details]
Short test illustrating problem

Iterating over object contents produces NPE
Comment 2 Victor Roldan Betancort CLA 2010-06-08 10:52:00 EDT
I'm experiencing the same problem, but even with refereceChunk!=0.

This bug is being driving me crazy :(
Comment 3 Egidijus Vaisnora CLA 2010-06-08 10:54:25 EDT
Created attachment 171413 [details]
Added checking for NULL result in ResultSet
Comment 4 Egidijus Vaisnora CLA 2010-06-08 10:58:01 EDT
Yes, because it depends on the result, which was stored in a cache. If in cache there is wrong revision, then you get wrong result on any loading policy. 

It was driving me crazy for a couple of days too, but seems to be finished ;)
Comment 5 Victor Roldan Betancort CLA 2010-06-08 11:09:11 EDT
Thanks Egidijus! This fix is so much welcome :D
Comment 6 Egidijus Vaisnora CLA 2010-06-08 11:24:44 EDT
1) The number of lines I have changed is smaller than 250.
2) I am an author of these changed lines.
3) I apply the EPL to these changed lines.
Comment 7 Eike Stepper CLA 2010-06-08 11:27:04 EDT
THanks guys!

Committed to HEAD
Comment 8 Eike Stepper CLA 2010-06-29 04:36:05 EDT
Available in 3.0 GA:
http://download.eclipse.org/modeling/emf/cdo/updates/3.0-releases/