|Re: [eclipselink-users] problem with criteria The type [null] is not the expected [EntityType] for the key class [class br.com.thinkit.db.Ativos] - try upgrade past 8141.|
Hi, this is unfortunate - I will try to help narrow down the issue.
You may be experiencing some outstanding issues with the critical child bug 303063 of 266912 that was fixed in rev# 8141 in early Sept 2010, or your issue may be a reproduction of DI 101 depending on the rev# you are running on. It is hard to narrow down your issue unless we know what type of model you are using (IE: is your @Id singular/composite, is it defined on a @MappedSuperclass superclass or chain), and whether you are running on a container, what type of container (GlassFish?) or just SE (where predeploy and deploy happen in sequence).
- check your revision is past 8141 - from my forensic analysis cross-referencing your 152 stack trace line to the 160 expected source - it looks like your rev is pre 8006
- After you refresh past 8141 - verify you are not seeing DI 95 or 101 - that should be fixed
- see if you are experiencing outstanding DI 101
The following issues were fixed surrounding premature metamodel initialization before the metadata was fully processed
However, the fix for 322585 in 8141 will not fix all instances (The Metamodel API must assume that all RelationalDescriptors are initialized - with both their class and className set) - we may have a one or more scenarios where the RelationalDescriptor is not ready to use - these are very difficult to reproduce - see the references for design issue 101
The reproduction of DI 101 could only occur if one of the 3 API calls below is called and the underlying ''RelationalDescriptor'' is invalid
From your stack trace I see that you have called MetamodelImpl.entity() and that the stacktrace indicates you are on line 152.
The current trunk version (8492) is 8 lines ahead and would show as :160
The 8 lines were added in SVN rev# 8006 on Aug 6 - you therefore are using a version before 8006 and the larger fix in 8141
I would like to know if your model reproduced DI 101?
You can also raise an EclipseLink bug so that it can get prioritized and/or voted on.
Daniel Gomes-THINK IT wrote:
Back to the top