[hibernate-issues] [Hibernate-JIRA] Commented: (METAGEN-44) getting Runtime error message "o.h.e.m.MetadataContext - Unable to locate static metamodel field"

Hardy Ferentschik (JIRA) noreply at atlassian.com
Wed Nov 3 12:01:50 EDT 2010


    [ http://opensource.atlassian.com/projects/hibernate/browse/METAGEN-44?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=38995#action_38995 ] 

Hardy Ferentschik commented on METAGEN-44:
------------------------------------------

Several things here:
# If the metamodel is correct than this is the wrong place to create the issue and you should be creating an issue in Hibernate Core
# Before that try the Hibernate Forum to get some feedback - https://forum.hibernate.org/viewforum.php?f=1
# Before that create a testcase/example which follows these [guidelines|http://www.pscode.org/sscce.html]. The example should be short, self contained and correct (compilable). Looking at your test.jar I had several issues:
** It does not compile out of the box. There are several dependencies in the pom which are not downloadable from the main public repositories
** It is too complex. Why do you provide a multi module setup? 
** Last but not least, after going through the effort of actually removing these dependencies (they are not needed for the classes provided in the test.jar) I was able to compile the project successfully. How would I know what to look for? Where is the failing testcase?

> getting Runtime error message "o.h.e.m.MetadataContext - Unable to locate static metamodel field"
> -------------------------------------------------------------------------------------------------
>
>                 Key: METAGEN-44
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/METAGEN-44
>             Project: Hibernate Metamodel Generator
>          Issue Type: Bug
>    Affects Versions: 1.1.0.CR1
>            Reporter: Young Lee
>            Assignee: Hardy Ferentschik
>         Attachments: test.jar
>
>
> I have a @MappedSuperClass declared as
>     @MappedSuperClass
>     public abstract class IdentifiableComponent<T extends EmbeddableId> extends RecordTimestamp2 implements Serializable
> and my Entity class declared as
>     @Entity
>     public class AppRegistration extends IdentifiableComponent<AppRegistrationId> 
> and the Composite Id class declared as
>     @Embeddable
>     public class AppRegistrationId implements EmbeddableId
> The metamodel is generated properly, but at runtime I get the following error message
>     o.h.e.m.MetadataContext - Unable to locate static metamodel field : com.playspan.lookup.model.AppRegistration_#id
> I've tried adding @IdClass(AppRegistrationId) annotation to the AppRegistration Entity class, but still 
> I get the same error message.
> Please tell me what I am doing wrong.  Thanx in advance.
> Attached is a complete sample buildable maven project with the above classes

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list