| Summary: | jpa/cacheable tests failed on Java EE with AssertionFailedError and TransactionRequiredException | ||
|---|---|---|---|
| Product: | z_Archived | Reporter: | Yiping Zhao <yiping.zhao> |
| Component: | Eclipselink | Assignee: | Project Inbox <eclipselink.orm-inbox> |
| Status: | CLOSED WONTFIX | QA Contact: | |
| Severity: | normal | ||
| Priority: | P2 | CC: | christopher.delahunt, michael.f.obrien, tom.ware |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
|
Description
Yiping Zhao
The TransactionRequiredException is likely a test framework issue due to restrictions on the SessionBeans running the tests. Assertion failures should be triaged. Deferring 2.1.2 is closed. This should be triaged in a group effor by QA and Dev based on the fact that this may be a framework issue. The first tests are framework issues:
CacheableModelJunitTestDisableSelective.testEMPropertiesOnCommit1 and testEMPropertiesOnCommit2 will not work on a server because it tries to get two seperate entityManagers from em.createDSEntityManager(). On a server, I believe they return the one assocated to the transaction - so they will be the same, causing the test to fail - it checks to see if something read in one is cached in the other. Since they are the same em, it is and so fails.
b) Glassfish TransactionRequiredException message :
<testcase classname="org.eclipse.persistence.testing.tests.jpa.cacheable.CacheableModelJunitTestDisableSelective"
name="testEMPropertiesOnCommit1" time="0.297">
<error
type="javax.persistence.TransactionRequiredException">javax.persistence.TransactionRequiredException
at
com.sun.enterprise.container.common.impl.EntityManagerWrapper.doTxRequiredCheck(EntityManagerWrapper.java:152)
at
com.sun.enterprise.container.common.impl.EntityManagerWrapper.setProperty(EntityManagerWrapper.java:785)
at org.eclipse.persistence.testing.tests.jpa.cacheable.CacheableModelJunitTestDisableSelective.testEMPropertiesOnCommit1(CacheableModelJunitTestDisableSelective.java:228)
Looks like a Glassfish bug - they are not allowing em1.setProperties() outside a transaction. It follows the commitTransaction(em1) call, and needs to be investigated what this means/does in the framework on Glassfish and if a bug should be filed. If this is fixed though, the same tests might still fail in the same way they do on Websphere and Weblogic due to the test made for using multiple EntityManager instances.
3) testCachingOnUNSPECIFIED failing on Websphere. This failure implies that Websphere is handling the <shared-cache-mode>UNSPECIFIED</shared-cache-mode> persistence unit property differently (such as interpreting it to mean ALL instead, or that there is a test config failure causing the wrong persistence unit to be used. I could not find any mention of a Websphere issue, so it is likely a config issue where PU. This should show up in the logging as a config message should be logged if ALL is being used and the entity specifies @Cacheable(false).
Glassfish transactionRequiredException is fixed in bug http://java.net/jira/browse/GLASSFISH-14054 The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink |