[jboss-jira] [JBoss JIRA] Commented: (JBAS-8103) Entity (annotations) not being scanned in jars configured through jar-file in persistence.xml
jaikiran pai (JIRA)
jira-events at lists.jboss.org
Mon Jun 14 10:45:46 EDT 2010
[ https://jira.jboss.org/browse/JBAS-8103?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12535586#action_12535586 ]
jaikiran pai commented on JBAS-8103:
------------------------------------
>> Perhaps the scanning's Scanner impl should be grouped per classloader?
I guess, that wouldn't work in all scenarios, since an .ear could have .war files with each .war having a separate classloader.
Maybe they should be grouped by top-level deployment?
> Entity (annotations) not being scanned in jars configured through jar-file in persistence.xml
> -----------------------------------------------------------------------------------------------
>
> Key: JBAS-8103
> URL: https://jira.jboss.org/browse/JBAS-8103
> Project: JBoss Application Server
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Deployers
> Reporter: jaikiran pai
> Assignee: Ales Justin
> Fix For: 6.0.0.M4
>
>
> This looks related to JBAS-8060 - some of the persistence unit testcases in EJB3 testsuite are failing due to entities not being mapped. The packaging is a .ear file with 2 (or more) jars:
> app.ear
> |
> | --- puone.jar
> | |
> | |--- META-INF
> | | | ---- persistence.xml
> |
> |--- util.jar
> The util.jar contains some classes mapped as @Entity and the persistence.xml points to this jar, through jar-file element:
> <jar-file>util.jar</jar-file>
> The testcase fails with:
> Caused by: org.hibernate.MappingException: Unknown entity: org.jboss.ejb3.test.factory.Util
> at org.hibernate.impl.SessionFactoryImpl.getEntityPersister(SessionFactoryImpl.java:704)
> The org.jboss.ejb3.test.factory.Util resides in util.jar and is as follows:
> package org.jboss.ejb3.test.factory;
> import java.io.Serializable;
> import javax.persistence.Entity;
> import javax.persistence.Id;
> /**
> * Comment
> *
> * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
> * @version $Revision$
> */
> @Entity
> public class Util implements Serializable
> {
> ...
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list