Bug 818241 - Migrated Seam2.2 dvdstore example fails with "JBAS011437: Found extended persistence context in SFSB invocation call stack but that cannot be used because the transaction already has a transactional context associated with it."
Migrated Seam2.2 dvdstore example fails with "JBAS011437: Found extended pers...
Status: CLOSED CANTFIX
Product: JBoss Enterprise WFK Platform 2
Classification: JBoss
Component: Seam (Show other bugs)
2.0.0.GA
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Marek Novotny
Seam2.2
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-02 10:43 EDT by Marek Schmidt
Modified: 2012-06-19 04:26 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
The Seam 2.2 DVD store example does not activate succesfully after performing the EAP 6 migration steps detailed in the JBoss Enterprise Application Platform 6 documentation.
Story Points: ---
Clone Of:
Environment:
Seam 2.2.5.EAP5 (included in EAP 5.1.2.GA), EAP6.0.0 ER6
Last Closed: 2012-06-19 04:26:50 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Marek Schmidt 2012-05-02 10:43:32 EDT
Description of problem:

Taking the EAP6 migration steps to the Seam2.2 dvdstore example doesn't lead to a working example due to the changes in the JPA 2 spec, as the dvd example is not compliant anymore.

An error is displayed trying to order a dvd:

Caused by javax.servlet.ServletException with message: "#{checkout.createOrder}: javax.ejb.EJBTransactionRolledbackException: JBAS011437: Found extended persistence context in SFSB invocation call stack but that cannot be used because the transaction already has a transactional context associated with it. This can be avoided by changing application code, either eliminate the extended persistence context or the transactional context. See JPA spec 2.0 section 7.6.3.1. Scoped persistence unit name=jboss-seam-dvdstore.ear/jboss-seam-dvdstore.jar#dvdstoreDatabase, persistence context already in transaction =ExtendedEntityManager [jboss-seam-dvdstore.ear/jboss-seam-dvdstore.jar#dvdstoreDatabase], extended persistence context =ExtendedEntityManager [jboss-seam-dvdstore.ear/jboss-seam-dvdstore.jar#dvdstoreDatabase]." 

Version-Release number of selected component (if applicable): Seam 2.2.5.EAP5
Comment 1 Marek Schmidt 2012-05-02 11:07:14 EDT
Just a note that one of the possible fixes for the dvdstore example is changing the persistence context to transactional in CheckoutAction and ShowOrdersAction (and use em.merge in the cancelOrder and detailOrder)
Comment 2 Rebecca Newton 2012-05-13 21:42:35 EDT
Hey Marek, I have two questions: 

1. The possible fix noted - can that be counted as a workaround?
2. Where are the migration steps you're following? Are they from here: http://documentation-stage.bne.redhat.com/docs/en-US/JBoss_Enterprise_Application_Platform/6/html/Beta_Documentation/index.html

Thanks for the bug!
Comment 3 Rebecca Newton 2012-05-13 21:42:35 EDT
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
The Seam 2.2 DVD store example does not activate succesfully after performing the EAP 6 migration steps.
Comment 4 Marek Novotny 2012-05-14 02:37:42 EDT
add 1. that is not considered as Work around but as fix for that usage.

add 2. I think that is correct, general steps from EAP5 to EAP6 for Seam 2.2 like at http://documentation-stage.bne.redhat.com/docs/en-US/JBoss_Enterprise_Application_Platform/6/html/Beta_Documentation/Migrate_Seam_22_Archives_to_JBoss_Enterprise_Application_Platform_6.html
Comment 6 Rebecca Newton 2012-05-14 02:47:10 EDT
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1 +1 @@
-The Seam 2.2 DVD store example does not activate succesfully after performing the EAP 6 migration steps.+The Seam 2.2 DVD store example does not activate succesfully after performing the EAP 6 migration steps detailed in the JBoss Enterprise Application Platform 6-Beta documentation.
Comment 8 Rebecca Newton 2012-06-18 21:49:51 EDT
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1 +1 @@
-The Seam 2.2 DVD store example does not activate succesfully after performing the EAP 6 migration steps detailed in the JBoss Enterprise Application Platform 6-Beta documentation.+The Seam 2.2 DVD store example does not activate succesfully after performing the EAP 6 migration steps detailed in the JBoss Enterprise Application Platform 6 documentation.
Comment 9 Marek Schmidt 2012-06-19 04:26:50 EDT
It is listed as a known issue in the EAP6 Seam 2.2 Migration guide. 

http://documentation-stage.bne.redhat.com/docs/en-US/JBoss_Enterprise_Application_Platform/6/html-single/Migration_Guide/index.html#Seam_22_Archive_Migration_Issues

as

"Dvdstore example create order fails with a javax.ejb.EJBTransactionRolledbackException"

Note You need to log in before you can comment on or make changes to this bug.