[jboss-jira] [JBoss JIRA] Commented: (AS7-1234) Hibernate does not read/use metadata for orm.xml defined entites
jaikiran pai (JIRA)
jira-events at lists.jboss.org
Sat Jul 9 00:02:23 EDT 2011
[ https://issues.jboss.org/browse/AS7-1234?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12613255#comment-12613255 ]
jaikiran pai commented on AS7-1234:
-----------------------------------
Scott, Tomaz appears to be creating a "module" out of the entity jar and placing it in the JBOSS_HOME/modules location and referencing it via the "Dependencies" in the MANIFEST.MF. We, by default, don't create indexes for the modules. There was a similar issue here AS7-944.
Tomaz, you'll first have to build a index for the "module" of your entity jar using the Jandex Ant task (https://issues.jboss.org/browse/AS7-944?focusedCommentId=12609000&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-12609000). Give it a try and let us know if it works. I'm not sure if Stuart pushed his commits to upstream.
> Hibernate does not read/use metadata for orm.xml defined entites
> ----------------------------------------------------------------
>
> Key: AS7-1234
> URL: https://issues.jboss.org/browse/AS7-1234
> Project: Application Server 7
> Issue Type: Bug
> Components: JPA / Hibernate
> Affects Versions: 7.0.0.Beta3, 7.0.0.CR1, 7.0.0.Final, 7.0.1.Final, 7.1.0.Alpha1
> Environment: windows 7, sql server 2008 r2
> Reporter: Tomaz Cerar
> Assignee: Scott Marlow
>
> I have setup where we have "common" entities defined in global lib/module that application(war/ear) in then dependent on.
> Then I declare this entities in orm.xml of my application just by class name.
> for instance:
> {code:xml}
> <entity class="com.company.module.Article"/>
> <entity class="com.company.module.Binary"/>
> <entity class="com.company.module.Category"/>
> {code}
> Up until as7/hibernate 4 this worked with no problems, but now it dies with exception "no id defined on entity Article". If I defined id in orm.xml it then finds id field but fails to find anything that is annotated on classes.
> It looks like metadata is not read for this classes and hibernate sees them as just plain pojo with no annotations.
> I am guessing that problem has to do something with integration with AS7 that now has jandex index for all annotations...
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list