JBoss Community

Re: HHH015011: Unable to locate static metamodel field

created by Mariano Kocalka Machala in JBoss AS 7 Development - View the full discussion

Thoughts,

 

About errors at deploy time (static metamodel fields not found), seems like the app server is complaining when either:

a. Class "B" extends class "A" and class "A" is defined as @MappedSuperClass

b. Class "B" embed a property of type "X" where "X" is defined as @Embeddable.

 

No matter with that, the application server log these errors (at deploy time) but the EAR application keep up and running.

 

Therefore, the thing is:

a. We want to build jpa2 criterias queries filtering by those missing fields (see attached code: Agent, TaxAgent, Document, DocumentType and also see sample query code at point 5)

b. If path expresions are built over static metamodel properties the query throws a NPE (and makes sense since at deploy time the appserver has signaled that some static metamodel fields were missing)

c. If path expresions are built over "strings" (bypassing static metamodel properties) the query is executed without errors (but this is just a fix/workaround and should not be used in this way)

 

Hope this help in order to describe the issue we are facing.

 

Let me know your thoughts,

Regards !

Reply to this message by going to Community

Start a new discussion in JBoss AS 7 Development at Community