These are the issues we are facing with criteria/metamodel APIs and Jboss-as-7.1.0

As you can see from the attached example (zip file), we are extending an @Entity (TaxAgent) from a @MappedSuperclass (Agent)

Agent has an @Embedded attribute (document), and this generates two errors:

1. When deploying there "Unable to locate static metamodel field" errors. Note that this errors act at two levels, first the document field cannot be found in TaxAgent_ but also, the documentType field cannot be found inside our embeddable, Document_.

2. When trying to create a path expression from the root object (taxAgent) to TaxAgent_.document an exception is thrown (which is below).

I'm not sure of the cause. I asked about this problem and there are a few issues (some related to HHH-5024).

From a recent IRC discussion about this:

Part of the problem is that there are just lots of incorrect mappings that crop up there. People trying to override mapping information incorrectly. More defensive checking is really what is needed there.

I suspect that it might be easier for you to help contribute a Hibernate patch/fix to add the defensive error checking.