Bug 380670 - JPA testing should run on JBoss-7.x
Summary: JPA testing should run on JBoss-7.x
Status: NEW
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard: jboss
Keywords: test
Depends on:
Blocks:
 
Reported: 2012-05-25 10:03 EDT by Kevin Yuan CLA
Modified: 2022-06-09 10:02 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin Yuan CLA 2012-05-25 10:03:15 EDT
Since JBoss-7 has lots of changes comparing to several previous versions (5.x and 6.x). The existing test scripts didn't support it at all. Need to add JBoss-7 support based on existing testing framework.
Comment 1 Craig Ringer CLA 2012-06-20 23:49:12 EDT
Target 2.4? With As7 seeing rapid adoption the lack of EclipseLink testing for it is not ideal.
Comment 2 Kevin Yuan CLA 2012-06-21 15:34:13 EDT
Currently I have manually tested EL 2.4 jpa on JBoss-as-7.1.1.Final with the following two scenarios:
    - Add eclipselink.jar in the application ear (under lib directory) ;
    - Create a module to load eclipselink.jar (under modules\org\eclipse\persistence).
Both scenarios work fine except the following issues:
    - junit.jar must package in the ear under \lib dir;
    - Got "java.lang.ClassCastException" when I test multiple persistence unit, this is our testing framework design require, I will investigate late;
    - Entity classes need to list in the persistene.xml (classload issue?)
Comment 3 Craig Ringer CLA 2012-06-21 23:31:19 EDT
Kevin: The need to explicitly specify classes isn't a classloader issue, it's an issue with the archive scanner. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=383200 .

Yesterday Rich DiCroce wrote the required integration classes. You can get them here:

  https://community.jboss.org/wiki/HowToUseEclipseLinkWithAS7

or in a prepackaged bundle I've put together here:

  https://github.com/ringerc/as7-eclipselink-integration
Comment 4 Craig Ringer CLA 2012-06-21 23:33:41 EDT
BTW, I'm maintaining some Arquillian tests for EclipseLink + AS7 here:

https://github.com/ringerc/scrapcode/tree/master/testcases/javaee/JBossAS7-EclipseLink-Module/as7.eclipselink

and they show a couple of other problems, including a really odd one with static weaving. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=383201 and https://bugs.eclipse.org/bugs/show_bug.cgi?id=383199 .
Comment 5 Tom Ware CLA 2012-06-22 08:00:04 EDT
I admit not to have looked deeply at the issue related to the archiving, but I wonder if it is potentially a container issue with JBoss.  The spec states that the PersistenceUnitRootURL should be set up as follows:

* Returns the URL for the jar file or directory that is the
* root of the persistence unit. (If the persistence unit is
* rooted in the WEB-INF/classes directory, this will be the
* URL of that directory.)
* The URL will either be a file: URL referring to a jar file
* or referring to a directory that contains an exploded jar
* file, or some other URL from which an InputStream in jar
* format can be obtained.
* @return a URL referring to a jar file or directory

If JBoss is giving us something that cannot be decomposed using standard Java File or JarFile objects, the issue may be in the container.
Comment 6 Eclipse Webmaster CLA 2022-06-09 10:02:28 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink