|Sparse lists seem to cause havoc in Teneo 0.7.5 [message #619219]
||Sun, 08 June 2008 19:31
| Sundeep Prakash
Registered: July 2009
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
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:
- 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.
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).
Powered by FUDForum
. Page generated in 0.01972 seconds