Bug 292277

Summary: "testCreateEntityManagerFactory2" failed with "junit.framework.AssertionFailedError: PersistenceException is expected" on WebSphere 7.0.0.5
Product: z_Archived Reporter: Yiping Zhao <yiping.zhao>
Component: EclipselinkAssignee: Nobody - feel free to take it <nobody>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P2 CC: edwin.tang, kevin.yuan
Version: unspecifiedKeywords: test
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Yiping Zhao CLA 2009-10-14 10:57:29 EDT
This test is in org.eclipse.persistence.testing.tests.jpa.advanced.EntityManagerJUnitTestSuite. It failed at "emf = Persistence.createEntityManagerFactory("default123");", WebSphere 7.0.0.5 returns null as for created EntityManagerFactory, but it doesn't throw PersistenceException as the test designed. 

Note: 

1. As for conversation with Tom, the ejb3.0 spec didn't say that the PersistenceException must throw at this situation, just EclipseLink's implementation beyond the spec. So this test should not run on WebSphere 7.0.0.5

2. I put javax.persistence_2.0_preview.jar and rename it to be javax.j2ee.persistence.jar under WAS7_INSTALL/plugins, the test passed.
Comment 1 Peter Krogh CLA 2009-11-27 13:40:48 EST
This bug fix did not make the cut off for 2.0.0. We are deferring the bugs to Future where we can properly sort them all together based on community votes and severity. We will then assign them accordingly to future patch sets and releases.
Comment 2 Peter Krogh CLA 2009-11-30 11:35:43 EST
Changing the priority of the bugs that have been recently triaged to future.  Targetting them to P2 will differentiate them from the P3s that have been triaged into future earlier.
Comment 3 Yiping Zhao CLA 2010-02-04 14:36:26 EST
By fixing the bug, add following condition is teh beginning of the test to exclude it from running on WebSphere:

if (getServerSession().getServerPlatform() != null && getServerSession().getServerPlatform() instanceof WebSphere_7_Platform){
            warning("The test <testCreateEntityManagerFactory2> is not supported on WebSphere, because the ejb3.0 spec doesn't say that the PersistenceException must throw at this situation, just EclipseLink's implementation beyond the spec. So this test should not run on WebSphere 7.0.0.5");
            return;
        }

The change has been checked in Main as revision 6499, 2.0.1 as revision 6498, 1.2 as revision 6500 and 1.1.0 as revision 6501.

code is reviewed by Edwin Tang.
Comment 4 Eclipse Webmaster CLA 2022-06-09 10:27:39 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink