Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsSparse lists seem to cause havoc in Teneo 0.7.5
https://www.eclipse.org/forums/index.php/mv/msg/194534/619219/#msg_619219
We have Teneo-0.7.5 in production in some customer sites. There is this
problem that keeps cropping up, and while I cant share the exact details,
I thought I would bring the essential problem to your attention so that
you could consider fixing it in the 0.8 line, if you can figure out why
exactly it is happening. I cant provide an easy test case without getting
a ton of EMF models and DB data from the customer, and that wont be
possible.
Essential problem is that upon saving a Teneo resource, in these somewhat
random cases (i.e. I cant characterize the Hibernate query that forms
these resources very clearly), we get NPEs. The NPEs always occur in the
following three methods:
1)
org.eclipse.emf.teneo.resource.NonLoadingDiagnostician.doVal idateContents
- The NPE doesnt actually happen here, but this method has a line "result
&= validate(child, diagnostics, context);". The "validate" call to EMF
Ecore does not like Null "child" objects. Question is - why is Teneo
sending it nulls.
2) org.eclipse.emf.teneo.resource.attachedHelper
3) org.eclipse.emf.teneo.resource.detachedHelper
Both of the above methods also NPE on getting Null objects.
We have gotten around the problem by putting null checks in cases 2 and 3.
But I dont exactly understand why the nulls come in the first place
especially when the code is not expecting them. My guess is that Hibernate
is perhaps returning sparse lists in its queries (i.e. some elements are
null) and this creates trouble when you assemble EMF resources using these
objects(?). Is this a possibility? If so, should you be guarding against
such cases? Of course, if all of this is gone in 0.8, that's great (I
havent been able to test these cases with 0.8 because I need to migrate
the problematic data).